Commit 03243267 authored by 邱旭's avatar 邱旭

1

parent b92dfac2
...@@ -80,8 +80,7 @@ export default class ScratchPanel extends Panel { ...@@ -80,8 +80,7 @@ export default class ScratchPanel extends Panel {
this.hongbaoEffect(); this.hongbaoEffect();
this.setWXShareTip(); this.setWXShareTip();
this["progressGroup"].mask = this["progressMask"]; this["progressGroup"].mask = this["progressMask"];
this.setProgress(90.3); this.setProgress(98);
this['numLabel'] = `共${this.data.invitationUser.length}位好友帮你刮了${90.3}%`;
this["prizeImg"].source = this.data.prizeImg; this["prizeImg"].source = this.data.prizeImg;
if(!this.data.invitationUser) { if(!this.data.invitationUser) {
...@@ -152,6 +151,7 @@ export default class ScratchPanel extends Panel { ...@@ -152,6 +151,7 @@ export default class ScratchPanel extends Panel {
} else if(progress < 0) { } else if(progress < 0) {
progress = 0; progress = 0;
} }
this['numLabel'].text = `共${this.data.invitationUser.length + 2}位好友帮你刮了${progress}%`;
this["progressLabel"].text = `仅剩${(100 - progress).toFixed(2)}%`; // 进度条文字 this["progressLabel"].text = `仅剩${(100 - progress).toFixed(2)}%`; // 进度条文字
let _width = this["progressBg"].width * progress / 100; // 宽度 let _width = this["progressBg"].width * progress / 100; // 宽度
let dProgress = Math.abs(progress - this["progress"].width / this["progressBg"].width); // 比当前进度的差值的绝对值 let dProgress = Math.abs(progress - this["progress"].width / this["progressBg"].width); // 比当前进度的差值的绝对值
......
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