Commit 4f05472e authored by wildfirecode13's avatar wildfirecode13

u

parent 9e1748fa
{ {
"code": null, "code": "600005",
"data": { "data": {
"extra": "ob1111ject", "extra": "ob1111ject",
"options": [ "options": [
...@@ -18,6 +18,6 @@ ...@@ -18,6 +18,6 @@
} }
] ]
}, },
"message": null, "message": "活动已结束",
"success": true "success": 1
} }
\ No newline at end of file
{ {
"code": null, "code": null,
"data": { "data": {
"activityOver":0,
"surplusCount": 5, "surplusCount": 5,
"credits": 7546, "credits": 7546,
"options": [ "options": [
......
import { showPanel } from "../../module/ctrls"; import { showPanel, showToast } from "../../module/ctrls";
import { RES } from "../../module/RES"; import { RES } from "../../module/RES";
import { layers } from "../../module/views/layers"; import { layers } from "../../module/views/layers";
import { delayClick } from "../common/delayClick"; import { delayClick } from "../common/delayClick";
...@@ -82,6 +82,11 @@ export class BoxGroup extends FYGE.Sprite { ...@@ -82,6 +82,11 @@ export class BoxGroup extends FYGE.Sprite {
} }
handleClick(e) { handleClick(e) {
const result = getWebData(WebNetName.index);
if(result.data.activityOver) {
showToast('活动已结束~');
return;
}
delayClick(e.target.stage); delayClick(e.target.stage);
const indexsvga = this.indexsvga = new FYGE.MovieClip(RES.getRes('盲盒选中-输出.svga')); const indexsvga = this.indexsvga = new FYGE.MovieClip(RES.getRes('盲盒选中-输出.svga'));
this.dispatchEvent("stopIndexEnterFrame", {}); this.dispatchEvent("stopIndexEnterFrame", {});
...@@ -89,7 +94,7 @@ export class BoxGroup extends FYGE.Sprite { ...@@ -89,7 +94,7 @@ export class BoxGroup extends FYGE.Sprite {
indexsvga.position.set(e.target.x - 200, e.target.y - 190) indexsvga.position.set(e.target.x - 200, e.target.y - 190)
this.addChild(indexsvga); this.addChild(indexsvga);
indexsvga.startAniRange(1, indexsvga.totalFrames, 1, () => { indexsvga.startAniRange(1, indexsvga.totalFrames, 1, () => {
const result = getWebData(WebNetName.index);
if (result.data.surplusCount <= 0) { if (result.data.surplusCount <= 0) {
if (result.data.type == 2) if (result.data.type == 2)
showPanel(timesNotEnoughPanel) showPanel(timesNotEnoughPanel)
...@@ -138,6 +143,8 @@ export class BoxGroup extends FYGE.Sprite { ...@@ -138,6 +143,8 @@ export class BoxGroup extends FYGE.Sprite {
showPanel(PrizePanel); showPanel(PrizePanel);
} }
} }
}else{
layers.stage.dispatchEvent("restartEnterFrame",{})
} }
} }
......
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