Commit c12c7ca6 authored by 郝聪敏's avatar 郝聪敏

修改进度bug

parent 7f06305c
...@@ -161,8 +161,8 @@ ...@@ -161,8 +161,8 @@
let detail = await getAwardsDetail({ prizeId: id }); let detail = await getAwardsDetail({ prizeId: id });
detail = detail || {}; detail = detail || {};
if (detail.join > detail.quantity) detail.join = detail.quantity; if (detail.join > detail.quantity) detail.join = detail.quantity;
const progressFloat = detail.join / detail.quantity; const progressFloat = detail.join / detail.quantity * 100;
let progress = Math.round(progressFloat * 100) + '%'; let progress = Math.round(progressFloat) + '%';
if (progressFloat > 0 && progressFloat < 1) progress = '1%'; if (progressFloat > 0 && progressFloat < 1) progress = '1%';
this.curQueue.forEach(v => { this.curQueue.forEach(v => {
......
...@@ -461,15 +461,15 @@ ...@@ -461,15 +461,15 @@
} }
} }
// 获取主页信息
this.getMainInfo();
// 获取活动信息 // 获取活动信息
this.showActivity(); this.showActivity();
// 获取奖品列表 // 获取奖品列表
this.videoList = await getPrizeList(options.prizeId); this.videoList = await getPrizeList(options.prizeId);
}, },
async onShow() { async onShow() {
// 获取主页信息
this.getMainInfo(); this.getMainInfo();
let join = wx.getStorageSync('userJoin'); let join = wx.getStorageSync('userJoin');
if (join === 1) { if (join === 1) {
wx.removeStorageSync('userJoin'); wx.removeStorageSync('userJoin');
......
...@@ -362,8 +362,8 @@ ...@@ -362,8 +362,8 @@
this.batchId = detail.id; this.batchId = detail.id;
if (detail.quantity) { if (detail.quantity) {
if (detail.join > detail.quantity) detail.join = detail.quantity; if (detail.join > detail.quantity) detail.join = detail.quantity;
const progressFloat = detail.join / detail.quantity; const progressFloat = detail.join / detail.quantity * 100;
this.progress = Math.round(progressFloat * 100) + '%'; this.progress = Math.round(progressFloat) + '%';
// 当进度介于0 - 1之间时显示1 // 当进度介于0 - 1之间时显示1
if (progressFloat > 0 && progressFloat < 1) this.progress = '1%'; if (progressFloat > 0 && progressFloat < 1) this.progress = '1%';
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