Commit a75a4ffc authored by 邱旭's avatar 邱旭

1

parent e929f92f
......@@ -72,17 +72,16 @@ export default class ScratchIcon extends IconBase {
return;
}
let status = res.data.taskStatus;
let data = Utils.deepClone(res.data);
switch(true) {
case (status == 0): // 当前无任务(一般icon不会出现),拦截
break;
case (status == 1): // 当前任务进行中 打开任务面板
loadSvga(getResPath() + 'resource/assets/svgas/sprize.svga').then(async (mv: any) => {
// await wait(100);
let data = Utils.deepClone(res.data);
data.mv = mv;
PanelCtrl.instance.show('scratch', data);
});
// PanelCtrl.instance.show('scratch', res.data);
break;
case (status == 2): // 当前任务完成待领奖 请求领奖接口
NetManager.ins.scratchTakePrize((success, res) => {
......@@ -92,7 +91,7 @@ export default class ScratchIcon extends IconBase {
}
return;
}
PanelCtrl.instance.show("scratchPrize", res.data);
PanelCtrl.instance.show("scratchPrize", data);
}, res.data.scratchCardTaskId);
break;
......
......@@ -188,25 +188,6 @@ export default class ScratchPanel extends Panel {
let dProgress = Math.abs(progress - this["progress"].width / this["progressBg"].width); // 比当前进度的差值的绝对值
let _duration = 1000 * dProgress / 100; // 算出变化的时间
egret.Tween.get(this["progress"]).to({width: _width}, _duration);
let i = new eui.Image();
// if(progress >= 100) {
// this["scratch_progress"].visible = false;
// } else if(progress >= 98 && progress < 100) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_98_png";
// } else if(progress >= 96 && progress < 98) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_96_png";
// } else if(progress >= 94 && progress < 96) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_94_png";
// } else if(progress >= 92 && progress < 96) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_92_png";
// } else if(progress < 92) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_90_png";
// }
}
private setWXShareTip() {
......
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