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

timer

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