Commit 85072f3e authored by 汪欢's avatar 汪欢

timer

parent 7d45ae9f
...@@ -62,40 +62,40 @@ ...@@ -62,40 +62,40 @@
width: 35rpx; width: 35rpx;
height: 25rpx; height: 25rpx;
opacity: 1; opacity: 1;
left: 13rpx; left: 15rpx;
top: 47rpx; top: 40rpx;
position: absolute; position: absolute;
font-size: 14.41518rpx; font-size: 25rpx;
color: #ffffff; color: #ffffff;
} }
.huo_dong_ye .dao_ji_shi87 .tu_ceng22_kao_bei90 { .huo_dong_ye .dao_ji_shi87 .tu_ceng22_kao_bei90 {
width: 35rpx; width: 35rpx;
height: 25rpx; height: 25rpx;
opacity: 1; opacity: 1;
left: 131rpx; left: 135rpx;
top: 47rpx; top: 40rpx;
position: absolute; position: absolute;
font-size: 14.41518rpx; font-size: 25rpx;
color: #ffffff; color: #ffffff;
} }
.huo_dong_ye .dao_ji_shi87 .tu_ceng2289 { .huo_dong_ye .dao_ji_shi87 .tu_ceng2289 {
width: 35rpx; width: 35rpx;
height: 25rpx; height: 25rpx;
opacity: 1; opacity: 1;
left: 246rpx; left: 248rpx;
top: 47rpx; top: 40rpx;
position: absolute; position: absolute;
font-size: 14.41518rpx; font-size: 25rpx;
color: #ffffff; color: #ffffff;
} }
.huo_dong_ye .dao_ji_shi87 .tu_ceng22_kao_bei388 { .huo_dong_ye .dao_ji_shi87 .tu_ceng22_kao_bei388 {
width: 35rpx; width: 35rpx;
height: 25rpx; height: 25rpx;
opacity: 1; opacity: 1;
left: 357rpx; left: 360rpx;
top: 47rpx; top: 40rpx;
position: absolute; position: absolute;
font-size: 14.41518rpx; font-size: 25rpx;
color: #ffffff; color: #ffffff;
} }
.huo_dong_ye .jiang_pin78 { .huo_dong_ye .jiang_pin78 {
......
...@@ -35,7 +35,7 @@ Page({ ...@@ -35,7 +35,7 @@ Page({
// 总楼层 // 总楼层
totalFloor: '', totalFloor: '',
// 单人最多购买楼层 // 单人最多购买楼层
eachBuyMostFloor:'', eachBuyMostFloor: '',
countDown: '', countDown: '',
ruleModalVisible: false, ruleModalVisible: false,
...@@ -51,12 +51,15 @@ Page({ ...@@ -51,12 +51,15 @@ Page({
}); });
this.getBaseInfo(); this.getBaseInfo();
this.getRuleSource(); this.getRuleSource();
this.countDowning(); // this.countDowning();
this.getUserCredits(); this.getUserCredits();
// this.getEndTime(); // this.getEndTime();
this.getOrderList(); this.getOrderList();
}, },
onReady(){
this.countDowning();
},
onPrizeBtnClick() { onPrizeBtnClick() {
my.navigateTo({ my.navigateTo({
...@@ -119,9 +122,9 @@ Page({ ...@@ -119,9 +122,9 @@ Page({
}, },
// 购买成功后更新积分 // 购买成功后更新积分
onUserCredit(){ onUserCredit() {
this.getUserCredits(); this.getUserCredits();
console.log(this.data.userCredits,'更新后的用户积分'); console.log(this.data.userCredits, '更新后的用户积分');
}, },
...@@ -136,7 +139,7 @@ Page({ ...@@ -136,7 +139,7 @@ Page({
}, },
// 加楼层 // 加楼层
addFloor() { addFloor() {
let { canBuyFloor,eachBuyMostFloor } = this.data; let { canBuyFloor, eachBuyMostFloor } = this.data;
if (canBuyFloor < eachBuyMostFloor) { if (canBuyFloor < eachBuyMostFloor) {
this.setData({ this.setData({
canBuyFloor: canBuyFloor + 1 canBuyFloor: canBuyFloor + 1
...@@ -205,9 +208,49 @@ Page({ ...@@ -205,9 +208,49 @@ Page({
// 获取奖品列表数据 // 获取奖品列表数据
async getBaseInfo() { async getBaseInfo() {
API.getActivityBaseInfoById().then((res) => { // API.getActivityBaseInfoById().then((res) => {
if (res.success) { // if (res.success) {
let data = res.data; // let data = res.data;
// let list = data.list;
// let prize = data.prize;
// let totalFloor = data.totalFloor;
// let end = data.endTime;
// let start = data.startTime;
// let eachBuyMostFloor = data.eachBuyMostFloor;
// // startTime = data.startTime;
// // endingTime = data.endTime;
// for (let i = 0; i < list.length; i++) {
// let listStyle = {
// left: 180 * i + 'rpx',
// width: 150 + 'rpx',
// height: 150 + 'rpx',
// position: 'absolute',
// color: 'white',
// textAlign: 'center'
// }
// list[i].liststyle = listStyle;
// }
// this.setData({
// prizeList: list,
// start: start,
// end: end,
// totalFloor,
// eachBuyMostFloor
// })
// } else {
// console.log('返回失败')
// }
// }).catch((err) => {
// console.log('error', err)
// })
// let listStyleArr = []
let { data,success,code } = await API.getActivityBaseInfoById() || {};
if (success) {
console.log(data, 'data')
let list = data.list; let list = data.list;
let prize = data.prize; let prize = data.prize;
let totalFloor = data.totalFloor; let totalFloor = data.totalFloor;
...@@ -237,42 +280,12 @@ Page({ ...@@ -237,42 +280,12 @@ Page({
totalFloor, totalFloor,
eachBuyMostFloor eachBuyMostFloor
}) })
} else {
console.log('返回失败')
}
}).catch((err) => {
console.log('error', err)
})
// let listStyleArr = []
// let { data } = await API.getActivityBaseInfoById() || {};
// console.log(data, 'data')
// let list = data.list;
// let prize = data.prize;
// let totalFloor = data.totalFloor;
// let end = data.endTime;
// let start = data.startTime;
// // startTime = data.startTime;
// // endingTime = data.endTime;
// for (let i = 0; i < list.length; i++) { } else {
// let listStyle = { // 错误码
// left: 180 * i + 'rpx', console.log('error')
// width: 150 + 'rpx', }
// height: 150 + 'rpx',
// position: 'absolute',
// color: 'white',
// textAlign: 'center'
// }
// list[i].liststyle = listStyle;
// }
// this.setData({
// prizeList: list,
// start: start,
// end: end,
// totalFloor
// })
}, },
...@@ -325,7 +338,7 @@ Page({ ...@@ -325,7 +338,7 @@ Page({
// 购买记录为空 // 购买记录为空
console.log('购买记录为空'); console.log('购买记录为空');
this.setData({ this.setData({
orderList:null orderList: 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