Commit cef69292 authored by ziyu's avatar ziyu

improvement: 优化

parent fbc7b073
......@@ -388,7 +388,7 @@
// 获取openid
await this.getOpenId();
// 获取用户信息并注册
if (this.userInfo.nickName) {
this.registUser(this.userInfo);
......@@ -411,6 +411,11 @@
this.videoList = await getPrizeList();
},
async onShow() {
let join = wx.getStorageSync('userJoin');
if (join == 1) {
wx.removeStorageSync('userJoin');
this.showActivity();
}
}
});
......
......@@ -318,6 +318,10 @@
this.btnfont = '立即参与';
let code = data.joinCode;
if (code === undefined) code = 3;
//参与抽奖成功
if(+code === 0) {
wx.setStorageSync('userJoin', 1);
}
Dialog.alert({
title: title[code],
message: message[code]
......@@ -347,6 +351,7 @@
detail = detail || {};
this.batchId = detail.id;
if (detail.quantity) {
if (detail.join > detail.quantity) detail.join = detail.quantity;
this.progress = Math.round((detail.join / detail.quantity) * 100) + '%';
this.progressStyle = 'width:' + this.progress;
}
......
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