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

list

parent 6fc1c15a
...@@ -6,29 +6,22 @@ ...@@ -6,29 +6,22 @@
<image class="yuan_jiao_ju_xing71744" src={{resList['1a960b92-d4b6-40fe-8e31-9658a5d904ec'].url}} /> <image class="yuan_jiao_ju_xing71744" src={{resList['1a960b92-d4b6-40fe-8e31-9658a5d904ec'].url}} />
<view class="zu135"> <view class="zu135">
<view class="zu13434" a:for="{{orderList}}" a:for-index="idx" a:for-item="item"> <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_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_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 --> <!-- bianli -->
<label style="{{orderStyle.orderday}}">{{item.orderDay}}</label> <label style="{{item.order.orderDay}}">{{item.orderDay}}</label>
<label style="{{orderStyle.orderfloor}}">{{item.orderFloor}}</label> <label style="{{item.order.orderFloor}}">{{item.orderFloor}}</label>
<label style="{{orderStyle.consumecredits}}">{{item.consumeCredits}}</label> <label style="{{item.order.orderCredits}}">{{item.consumeCredits}}</label>
</view> </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="zu133" src={{resList['1f5ca224-337a-4abb-8a5c-6fbd20e30ea4'].url}} />
<image class="zu6" src={{resList['1e1c23db-27ce-4914-aaf2-62554f91e101'].url}} /> <image class="zu6" src={{resList['1e1c23db-27ce-4914-aaf2-62554f91e101'].url}} />
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file
'use strict'; 'use strict';
import resList from '../../resconfig/resList'; import resList from '../../resconfig/resList';
import API from '../../api'
Component({ Component({
props: {}, props: {},
data: { data: {
resList: resList, resList: resList,
orderList: [ orderList: [
{ // {
orderDay: '09月16日', // orderDay: '09月16日',
orderFloor: 10, // orderFloor: 10,
consumeCredits: 100 // consumeCredits: 100
}, // },
{ // {
orderDay: '09月17日', // orderDay: '09月17日',
orderFloor: 20, // orderFloor: 20,
consumeCredits: 200 // consumeCredits: 200
}, // },
{ // {
orderDay: '09月18日', // orderDay: '09月18日',
orderFloor: 30, // orderFloor: 30,
consumeCredits: 300 // consumeCredits: 300
}, // },
{ // {
orderDay: '09月19日', // orderDay: '09月19日',
orderFloor: 40, // orderFloor: 40,
consumeCredits: 400 // consumeCredits: 400
}, // },
{ // {
orderDay: '09月20日', // orderDay: '09月20日',
orderFloor: 50, // orderFloor: 50,
consumeCredits: 500 // 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: { methods: {
onOrderModalClose() { onOrderModalClose() {
const { onOrderModalClose } = this.props const { onOrderModalClose } = this.props
onOrderModalClose && onOrderModalClose(); 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) { onInit(props) {
// this.setData({ this.getOrderList();
// 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
// })
} }
}); });
\ No newline at end of file
...@@ -109,6 +109,8 @@ ...@@ -109,6 +109,8 @@
left: 36rpx; left: 36rpx;
top: 74rpx; top: 74rpx;
position: absolute; position: absolute;
overflow-y: auto;
} }
.huo_dong_ye .jiang_pin78 .zu114 .zu128 { .huo_dong_ye .jiang_pin78 .zu114 .zu128 {
/* width: 681rpx; */ /* width: 681rpx; */
...@@ -116,7 +118,6 @@ ...@@ -116,7 +118,6 @@
height: 191rpx; height: 191rpx;
opacity: 1; opacity: 1;
position: absolute; position: absolute;
overflow-y: auto;
} }
.huo_dong_ye .jiang_pin78 .zu114 .zu128 .ju_xing51_kao_bei2 { .huo_dong_ye .jiang_pin78 .zu114 .zu128 .ju_xing51_kao_bei2 {
width: 681rpx; width: 681rpx;
......
...@@ -26,9 +26,10 @@ ...@@ -26,9 +26,10 @@
<label class="xxx_yuan_jiang_pin79">XXX元奖品</label> --> <label class="xxx_yuan_jiang_pin79">XXX元奖品</label> -->
<!-- bianli --> <!-- bianli -->
<image style="width:100;height:100" src={{item.image}}></image> <!-- <image style="width:100;height:100" src={{item.image}}></image> -->
<label>{{item.probability}}楼层</label> <view style="width:100rpx;height:100rpx;background:white;marginLeft:50rpx"></view>
<label>{{item.name}}奖品</label> <label>{{item.probability}}</label>
<label>{{item.name}}</label>
</view> </view>
</view> </view>
......
...@@ -96,6 +96,7 @@ Page({ ...@@ -96,6 +96,7 @@ Page({
async getBaseInfo(){ async getBaseInfo(){
let listStyleArr = [] let listStyleArr = []
let {data} = await API.getActivityBaseInfoById() || {}; let {data} = await API.getActivityBaseInfoById() || {};
console.log(data,'data')
let list = data.list; let list = data.list;
let prize = data.prize; let prize = data.prize;
...@@ -104,19 +105,23 @@ Page({ ...@@ -104,19 +105,23 @@ Page({
for(let i=0;i<list.length;i++){ for(let i=0;i<list.length;i++){
let listStyle = { let listStyle = {
left: 30*i + 'rpx', left: 200*i + 'rpx',
width: 200 + '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 l of list){
for(let ls of listStyleArr){ // for(let ls of listStyleArr){
l.liststyle = ls; // l.liststyle = ls;
} // }
} // }
this.setData({ this.setData({
prizeList:list, prizeList:list,
startTime:data.startTime, 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