Commit 9d1d73e9 authored by 汪欢's avatar 汪欢

list

parent 6fc1c15a
......@@ -6,29 +6,22 @@
<image class="yuan_jiao_ju_xing71744" src={{resList['1a960b92-d4b6-40fe-8e31-9658a5d904ec'].url}} />
<view class="zu135">
<view class="zu13434" a:for="{{orderList}}" a:for-index="idx" a:for-item="item">
<!-- <label class="tu_ceng09_yue15_ri43">09 月 15日</label>
<label class="tu_ceng10012042">100-120</label>
<label class="tu_ceng10012041">100-120</label>
<label class="tu_ceng10012040">100-120</label>
<label class="tu_ceng20039">200</label>
<label class="tu_ceng20038">200</label>
<label class="tu_ceng20037">200</label>
<label class="tu_ceng09_yue15_ri36">09 月 15日</label>
<label class="tu_ceng09_yue15_ri35">09 月 15日</label>
<label class="tu_ceng100120_kao_bei4">100-120</label>
<label class="tu_ceng200_kao_bei4">200</label>
<label class="tu_ceng09_yue15_ri_kao_bei4">09 月 15日</label>
<label class="tu_ceng100120_kao_bei5">100-120</label>
<label class="tu_ceng200_kao_bei5">200</label>
<label class="tu_ceng09_yue15_ri_kao_bei5">09 月 15日</label> -->
<!--<label class="tu_ceng09_yue15_ri43">09 月 15日</label><label class="tu_ceng10012042">100-120</label><label class="tu_ceng10012041">100-120</label><label class="tu_ceng10012040">100-120</label><label class="tu_ceng20039">200</label><label class="tu_ceng20038">200</label><label class="tu_ceng20037">200</label><label class="tu_ceng09_yue15_ri36">09 月 15日</label><label class="tu_ceng09_yue15_ri35">09 月 15日</label><label class="tu_ceng100120_kao_bei4">100-120</label><label class="tu_ceng200_kao_bei4">200</label><label class="tu_ceng09_yue15_ri_kao_bei4">09 月 15日</label><label class="tu_ceng100120_kao_bei5">100-120</label><label class="tu_ceng200_kao_bei5">200</label><label class="tu_ceng09_yue15_ri_kao_bei5">09 月 15日</label> -->
<!-- bianli -->
<label style="{{orderStyle.orderday}}">{{item.orderDay}}</label>
<label style="{{orderStyle.orderfloor}}">{{item.orderFloor}}</label>
<label style="{{orderStyle.consumecredits}}">{{item.consumeCredits}}</label>
<label style="{{item.order.orderDay}}">{{item.orderDay}}</label>
<label style="{{item.order.orderFloor}}">{{item.orderFloor}}</label>
<label style="{{item.order.orderCredits}}">{{item.consumeCredits}}</label>
</view>
<!-- <view class="item" a:for="{{orderList}}" a:for-index="index" a:for-item="item">
<label style="{{item.order.orderDay}}">{{item.createTime}}</label>
<label style="{{item.order.orderFloor}}">{{item.floorRange}}</label>
<label style="{{item.order.orderCredits}}">{{item.credits}}</label>
</view> -->
<image class="zu133" src={{resList['1f5ca224-337a-4abb-8a5c-6fbd20e30ea4'].url}} />
<image class="zu6" src={{resList['1e1c23db-27ce-4914-aaf2-62554f91e101'].url}} />
</view>
</view>
</view>
'use strict';
import resList from '../../resconfig/resList';
import API from '../../api'
Component({
props: {},
data: {
resList: resList,
orderList: [
{
orderDay: '09月16日',
orderFloor: 10,
consumeCredits: 100
},
{
orderDay: '09月17日',
orderFloor: 20,
consumeCredits: 200
},
{
orderDay: '09月18日',
orderFloor: 30,
consumeCredits: 300
},
{
orderDay: '09月19日',
orderFloor: 40,
consumeCredits: 400
},
{
orderDay: '09月20日',
orderFloor: 50,
consumeCredits: 500
},
// {
// orderDay: '09月16日',
// orderFloor: 10,
// consumeCredits: 100
// },
// {
// orderDay: '09月17日',
// orderFloor: 20,
// consumeCredits: 200
// },
// {
// orderDay: '09月18日',
// orderFloor: 30,
// consumeCredits: 300
// },
// {
// orderDay: '09月19日',
// orderFloor: 40,
// consumeCredits: 400
// },
// {
// orderDay: '09月20日',
// orderFloor: 50,
// consumeCredits: 500
// },
],
orderStyle: {
orderday: {
// width:40 + 'rpx',
left: 12 + 'rpx',
position: 'absolute',
color: '#ffffff',
top: ''
},
orderfloor: {
width: 40 + 'rpx',
left: 200 + 'rpx',
position: 'absolute',
color: '#ffffff',
top: ''
},
consumecredits: {
width: 40 + 'rpx',
left: 400 + 'rpx',
position: 'absolute',
color: '#ffffff',
top: ''
}
}
},
methods: {
onOrderModalClose() {
const { onOrderModalClose } = this.props
onOrderModalClose && onOrderModalClose();
},
async getOrderList(){
let {data} = await API.getBuyFloorList() || {};
let lens = data.length;
for(let i=0;i<lens;i++){
let orderStyle = {
orderDay:{
left: 0,
top: 40*i+'rpx',
position:'absolute',
color:'white'
},
orderFloor:{
left: 200+'rpx',
top: 40*i + 'rpx',
position:'absolute',
color:'white'
},
orderCredits:{
left:400 + 'rpx',
top: 40 * i + 'rpx',
position:'absolute',
color:'white'
}
}
data[i].order = orderStyle;
}
this.setData({
orderList:data,
// orderStyle:orderStyleArr
})
},
},
onInit(props) {
// this.setData({
// resList: resList
// });
// 遍历渲染
// let {orderStyle} = this.data
// let lens = orderStyle.length;
// for(let i=0; i<lens; i++ ){
// orderStyle[i].orderday.top = 30 * i + 'rpx';
// orderStyle[i].orderfloor.top = 30 * i + 'rpx';
// orderStyle[i].consumecredits.top = 30 * i + 'rpx';
// }
// this.setdata({
// orderStyle
// })
this.getOrderList();
}
});
\ No newline at end of file
......@@ -109,6 +109,8 @@
left: 36rpx;
top: 74rpx;
position: absolute;
overflow-y: auto;
}
.huo_dong_ye .jiang_pin78 .zu114 .zu128 {
/* width: 681rpx; */
......@@ -116,7 +118,6 @@
height: 191rpx;
opacity: 1;
position: absolute;
overflow-y: auto;
}
.huo_dong_ye .jiang_pin78 .zu114 .zu128 .ju_xing51_kao_bei2 {
width: 681rpx;
......
......@@ -26,9 +26,10 @@
<label class="xxx_yuan_jiang_pin79">XXX元奖品</label> -->
<!-- bianli -->
<image style="width:100;height:100" src={{item.image}}></image>
<label>{{item.probability}}楼层</label>
<label>{{item.name}}奖品</label>
<!-- <image style="width:100;height:100" src={{item.image}}></image> -->
<view style="width:100rpx;height:100rpx;background:white;marginLeft:50rpx"></view>
<label>{{item.probability}}</label>
<label>{{item.name}}</label>
</view>
</view>
......
......@@ -96,6 +96,7 @@ Page({
async getBaseInfo(){
let listStyleArr = []
let {data} = await API.getActivityBaseInfoById() || {};
console.log(data,'data')
let list = data.list;
let prize = data.prize;
......@@ -104,19 +105,23 @@ Page({
for(let i=0;i<list.length;i++){
let listStyle = {
left: 30*i + 'rpx',
left: 200*i + 'rpx',
width: 200 + 'rpx',
height: 200 + 'rpx'
height: 200 + 'rpx',
position:'absolute',
color:'white',
textAlign:'center'
}
listStyleArr.push(listStyle);
// listStyleArr.push(listStyle);
list[i].liststyle = listStyle;
}
// 合并样式
for(let l of list){
for(let ls of listStyleArr){
l.liststyle = ls;
}
}
// for(let l of list){
// for(let ls of listStyleArr){
// l.liststyle = ls;
// }
// }
this.setData({
prizeList:list,
startTime:data.startTime,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment