Commit 7d45ae9f authored by 汪欢's avatar 汪欢

3

parent 9fe2e482
...@@ -51,19 +51,18 @@ Component({ ...@@ -51,19 +51,18 @@ Component({
// } // }
// }) // })
this.props.onUserCredit();
// this.props.onUserCredit(); // this.props.onUserCredit();
}else{ }else{
console.log('fail') // 错误码判断不同情况
if(res.code === '500000'){
commonToast(res.message);
}
// console.log('fail')
} }
}) })
// console.log('succ',success)
// if(success){
// console.log('success');
// }else{
// console.log('failed')
// }
// success
this.onOrderNowModalClose(); this.onOrderNowModalClose();
......
...@@ -34,6 +34,8 @@ Page({ ...@@ -34,6 +34,8 @@ Page({
userCredits: '', userCredits: '',
// 总楼层 // 总楼层
totalFloor: '', totalFloor: '',
// 单人最多购买楼层
eachBuyMostFloor:'',
countDown: '', countDown: '',
ruleModalVisible: false, ruleModalVisible: false,
...@@ -134,8 +136,8 @@ Page({ ...@@ -134,8 +136,8 @@ Page({
}, },
// 加楼层 // 加楼层
addFloor() { addFloor() {
let { canBuyFloor } = this.data; let { canBuyFloor,eachBuyMostFloor } = this.data;
if (canBuyFloor < 100) { if (canBuyFloor < eachBuyMostFloor) {
this.setData({ this.setData({
canBuyFloor: canBuyFloor + 1 canBuyFloor: canBuyFloor + 1
}) })
...@@ -211,6 +213,7 @@ Page({ ...@@ -211,6 +213,7 @@ Page({
let totalFloor = data.totalFloor; let totalFloor = data.totalFloor;
let end = data.endTime; let end = data.endTime;
let start = data.startTime; let start = data.startTime;
let eachBuyMostFloor = data.eachBuyMostFloor;
// startTime = data.startTime; // startTime = data.startTime;
// endingTime = data.endTime; // endingTime = data.endTime;
...@@ -231,7 +234,8 @@ Page({ ...@@ -231,7 +234,8 @@ Page({
prizeList: list, prizeList: list,
start: start, start: start,
end: end, end: end,
totalFloor totalFloor,
eachBuyMostFloor
}) })
} else { } else {
console.log('返回失败') console.log('返回失败')
......
...@@ -121,6 +121,20 @@ ...@@ -121,6 +121,20 @@
position: absolute; position: absolute;
overflow-y: auto; overflow-y: auto;
} }
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .no_prize{
width: 458rpx;
height: 320rpx;
top:20rpx;
left: 10rpx;
opacity: 1;
position: absolute;
text-align: center;
}
/*
*/
.jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .dixxx_ceng68 { .jie_shu_ye .zhong_jiang_ming_dan .zhong_jiang_zhuang_tai .yi_zhong_jiang .dixxx_ceng68 {
width: 84rpx; width: 84rpx;
height: 23rpx; height: 23rpx;
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<label class="ba_la_kao_bei4">巴***拉</label> --> <label class="ba_la_kao_bei4">巴***拉</label> -->
<!-- 有中奖用户 --> <!-- 有中奖用户 -->
<view style="position:absolute" a:for="{{prizeMenu}}" a:key="idx" a:for-item="prizeItem" > <view style="position:absolute" a:if="{{prizeMenu != null}}" a:for="{{prizeMenu}}" a:key="idx" a:for-item="prizeItem" >
<view style="height:40rpx;position:absolute"> <view style="height:40rpx;position:absolute">
<label style="{{prizeItem.prizestyle.prizefloor}}">第{{prizeItem.floor}}层</label> <label style="{{prizeItem.prizestyle.prizefloor}}">第{{prizeItem.floor}}层</label>
<label style="{{prizeItem.prizestyle.prizeuser}}">{{prizeItem.username}}</label> <label style="{{prizeItem.prizestyle.prizeuser}}">{{prizeItem.username}}</label>
...@@ -60,6 +60,8 @@ ...@@ -60,6 +60,8 @@
</view> </view>
</view> </view>
<view class="no_prize">无中奖名单</view>
</view> </view>
<!-- <view class="wei_zhong_jiang"> <!-- <view class="wei_zhong_jiang">
<label class="zong_lou_ceng_bu_zu_wu_ren_zhong_jiang">总楼层不足,无人中奖</label> <label class="zong_lou_ceng_bu_zu_wu_ren_zhong_jiang">总楼层不足,无人中奖</label>
......
...@@ -120,6 +120,8 @@ Page({ ...@@ -120,6 +120,8 @@ Page({
async getPrizeMenu(){ async getPrizeMenu(){
let {data} = await API.getFloorPrize() || {}; let {data} = await API.getFloorPrize() || {};
console.log(data,'prizemenu') console.log(data,'prizemenu')
if(data != null){
// 用户名单处理 // 用户名单处理
let floorPrize = data; let floorPrize = data;
var personMenuArr = []; var personMenuArr = [];
...@@ -168,6 +170,12 @@ Page({ ...@@ -168,6 +170,12 @@ Page({
this.setData({ this.setData({
prizeMenu: floorPrize prizeMenu: floorPrize
}) })
} else {
// 无中奖
this.setData({
prizeMenu:null
})
}
}, },
......
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