Commit de6d8d5a authored by 邱旭's avatar 邱旭

1

parent 0de10dbe
...@@ -7,6 +7,7 @@ import { ModuleTypes } from "../../../libs/new_wx/types/sceneTypes"; ...@@ -7,6 +7,7 @@ import { ModuleTypes } from "../../../libs/new_wx/types/sceneTypes";
import { loadSvga } from "../../loadSvga"; import { loadSvga } from "../../loadSvga";
import getResPath from "../../../libs/new_tc/getResPath"; import getResPath from "../../../libs/new_tc/getResPath";
import Utils from "../../Utils"; import Utils from "../../Utils";
import { showToast } from "../../../libs/new_wx/ctrls/toastCtrl";
export default class ScratchIcon extends IconBase { export default class ScratchIcon extends IconBase {
private cutTimer: CutTimer = null; private cutTimer: CutTimer = null;
...@@ -81,8 +82,11 @@ export default class ScratchIcon extends IconBase { ...@@ -81,8 +82,11 @@ export default class ScratchIcon extends IconBase {
// PanelCtrl.instance.show('scratch', res.data); // PanelCtrl.instance.show('scratch', res.data);
break; break;
case (status == 2): // 当前任务完成待领奖 请求领奖接口 case (status == 2): // 当前任务完成待领奖 请求领奖接口
NetManager.ins.scratchTakePrize((success) => { NetManager.ins.scratchTakePrize((success, res) => {
if(!success) { if(!success) {
if(res.code == 600016){
showToast("哎呀,萌狮开小差啦!\n过会再来看看吧!");
}
return; return;
} }
PanelCtrl.instance.show("scratchPrize", res.data); PanelCtrl.instance.show("scratchPrize", res.data);
......
...@@ -7,6 +7,7 @@ import { NetManager } from "../../../libs/tw/manager/NetManager"; ...@@ -7,6 +7,7 @@ import { NetManager } from "../../../libs/tw/manager/NetManager";
import CutTimer from "../../CutTimer"; import CutTimer from "../../CutTimer";
import Utils from "../../Utils"; import Utils from "../../Utils";
import { getlogItem } from "../../Main"; import { getlogItem } from "../../Main";
import { showToast } from "../../../libs/new_wx/ctrls/toastCtrl";
export default class TurnPrize2Panel extends Panel { export default class TurnPrize2Panel extends Panel {
start(data) { start(data) {
...@@ -103,6 +104,9 @@ export default class TurnPrize2Panel extends Panel { ...@@ -103,6 +104,9 @@ export default class TurnPrize2Panel extends Panel {
case (status == 2): // 当前任务完成待领奖 请求领奖接口 case (status == 2): // 当前任务完成待领奖 请求领奖接口
NetManager.ins.scratchTakePrize((success, res) => { NetManager.ins.scratchTakePrize((success, res) => {
if (!success) { if (!success) {
if(res.code == 600016){
showToast("哎呀,萌狮开小差啦!\n过会再来看看吧!");
}
return; return;
} }
PanelCtrl.instance.show("scratchPrize", res.data); PanelCtrl.instance.show("scratchPrize", res.data);
......
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