Commit 17f97d19 authored by wildfirecode13's avatar wildfirecode13

u

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