Commit 17f97d19 authored by wildfirecode13's avatar wildfirecode13

u

parent db67683b
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"code": null, "code": null,
"data": { "data": {
"surplusCount": 0, "surplusCount": 0,
"credits": 5, "credits": 235,
"needCredits": 10, "needCredits": 10,
"type": 1, "type": 1,
"isMember":1 "isMember":1
......
import { showPanel } from "../../module/ctrls"; import { showPanel } from "../../module/ctrls";
import { RES } from "../../module/RES"; import { RES } from "../../module/RES";
import { layers } from "../../module/views/layers";
import { Panel } from "../../module/views/Panel"; import { Panel } from "../../module/views/Panel";
import centerTextField from "../common/centerTextField"; import centerTextField from "../common/centerTextField";
import getObject from "../common/getObject"; import getObject from "../common/getObject";
...@@ -28,6 +29,11 @@ export class CostPanel extends Panel { ...@@ -28,6 +29,11 @@ export class CostPanel extends Panel {
const result = await sendWebNet(WebNetName.getCreditCost, { toPlaywayId: 'dazzle', toActionId: 'drawPrize' }); const result = await sendWebNet(WebNetName.getCreditCost, { toPlaywayId: 'dazzle', toActionId: 'drawPrize' });
if (result && result.success) { if (result && result.success) {
const prizeData = await sendWebNetWithToken(WebNetName.drawPrize, { ticket: result.data }); const prizeData = await sendWebNetWithToken(WebNetName.drawPrize, { ticket: result.data });
sendWebNet(WebNetName.index).then(res=>{
layers.stage.dispatchEvent('updateIndexData')
})
if (prizeData && prizeData.success) { if (prizeData && prizeData.success) {
if (prizeData.data && prizeData.data.options) { if (prizeData.data && prizeData.data.options) {
if (prizeData.data.options.optionId == "thanks") { if (prizeData.data.options.optionId == "thanks") {
...@@ -37,6 +43,8 @@ export class CostPanel extends Panel { ...@@ -37,6 +43,8 @@ export class CostPanel extends Panel {
} }
} }
} }
} }
} }
......
...@@ -88,6 +88,8 @@ export class IndexScene extends Scene { ...@@ -88,6 +88,8 @@ export class IndexScene extends Scene {
sendLog("click",9); sendLog("click",9);
this.handleShare(); this.handleShare();
},this); },this);
this.stage.addEventListener('updateIndexData',this.getIndex,this);
} }
initContainer() { initContainer() {
...@@ -138,7 +140,8 @@ export class IndexScene extends Scene { ...@@ -138,7 +140,8 @@ export class IndexScene extends Scene {
showPanel(timesNotEnoughPanel); showPanel(timesNotEnoughPanel);
} else { } else {
showPanel(getTimesPanel); showPanel(getTimesPanel);
await getWebData(WebNetName.getFreeCount); await sendWebNet(WebNetName.getFreeCount);
await sendWebNet(WebNetName.index);
this.getIndex(); this.getIndex();
} }
} }
......
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