Commit 4616bf57 authored by 付清曌's avatar 付清曌

Merge branch 'feature/betachange' into 'master'

improvement: 优化

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