Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mini-program-wepy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
mini-program-wepy
Commits
c12c7ca6
Commit
c12c7ca6
authored
Jun 15, 2020
by
郝聪敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改进度bug
parent
7f06305c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
prizeList.wpy
src/components/custom/prizeList.wpy
+2
-2
index.wpy
src/pages/index.wpy
+2
-2
raffle.wpy
src/pages/raffle.wpy
+2
-2
No files found.
src/components/custom/prizeList.wpy
View file @
c12c7ca6
...
@@ -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 => {
...
...
src/pages/index.wpy
View file @
c12c7ca6
...
@@ -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');
...
...
src/pages/raffle.wpy
View file @
c12c7ca6
...
@@ -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;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment