Commit 9e1748fa authored by wildfirecode13's avatar wildfirecode13

u

parent c647d63a
{ {
"code": null, "code": null,
"data": { "data": {
"extra": "obje11ct", "extra": "ob1111ject",
"options": [ "options": [
{ {
"extra": "increase-credits", "extra": "increase-credits",
......
...@@ -34,7 +34,7 @@ export class RulePanel extends Panel { ...@@ -34,7 +34,7 @@ export class RulePanel extends Panel {
async start(data) { async start(data) {
super.start(); super.start();
//取接口数据 //取接口数据
const res = await sendWebNet(WebNetName.projectRule) const res = getWebData(WebNetName.projectRule)
if (!res.success) return if (!res.success) return
var ruleStr = res.data; var ruleStr = res.data;
//原先视图上有一个 //原先视图上有一个
......
...@@ -19,6 +19,9 @@ export class PrizePanel extends Panel { ...@@ -19,6 +19,9 @@ export class PrizePanel extends Panel {
const opt=this['opt']=result.data.options[0]; const opt=this['opt']=result.data.options[0];
getImage(opt.optionImg, this.prizeContainer, size, size, 3); getImage(opt.optionImg, this.prizeContainer, size, size, 3);
getObject(this, 'prize_name').text = opt.optionName; getObject(this, 'prize_name').text = opt.optionName;
getObject(this, 'prize_tips').visible=result.data.extra=='object';
} }
click_prize_open() { click_prize_open() {
......
import { showPanel } from "../../module/ctrls"; import { hideWaiting, showPanel, showWaiting } from "../../module/ctrls";
import { RES } from "../../module/RES"; import { RES } from "../../module/RES";
import { Scene } from "../../module/views/Scene"; import { Scene } from "../../module/views/Scene";
import getObject from "../common/getObject"; import getObject from "../common/getObject";
...@@ -6,7 +6,7 @@ import { isMember } from "../isMember"; ...@@ -6,7 +6,7 @@ import { isMember } from "../isMember";
import { getTimesPanel } from "../panels/getTimes"; import { getTimesPanel } from "../panels/getTimes";
import { RulePanel } from "../panels/RulePanel"; import { RulePanel } from "../panels/RulePanel";
import { timesNotEnoughPanel } from "../panels/timesNotEnough"; import { timesNotEnoughPanel } from "../panels/timesNotEnough";
import { getWebData, sendLog } from "../WebNet"; import { getWebData, sendLog, sendWebNet } from "../WebNet";
import { WebNetName } from "../WebNetName"; import { WebNetName } from "../WebNetName";
import { BoxGroup } from "./BoxGroup"; import { BoxGroup } from "./BoxGroup";
import { createPrizeTxt } from "./createPrizeTxt"; import { createPrizeTxt } from "./createPrizeTxt";
...@@ -123,7 +123,12 @@ export class IndexScene extends Scene { ...@@ -123,7 +123,12 @@ export class IndexScene extends Scene {
} }
toRule() { toRule() {
showPanel(RulePanel); showWaiting();
sendWebNet(WebNetName.projectRule).then(()=>{
hideWaiting();
showPanel(RulePanel);
})
} }
removeEvent() { removeEvent() {
......
import { changeScene } from "../../module/ctrls";
import { RES } from "../../module/RES"; import { RES } from "../../module/RES";
import { Scene } from "../../module/views/Scene"; import { Scene } from "../../module/views/Scene";
import { ProgressBarS } from "../common/ProgressBarS"; import { ProgressBarS } from "../common/ProgressBarS";
import { sendWebNetWithToken } from "../sendWebNetWithToken"; import { sendWebNetWithToken } from "../sendWebNetWithToken";
import { getWebData, sendWebNet } from "../WebNet";
import { WebNetName } from "../WebNetName"; import { WebNetName } from "../WebNetName";
import { StartScene } from "./StartScene";
export class LoadingScene extends Scene { export class LoadingScene extends Scene {
get groupNames() { get groupNames() {
...@@ -73,7 +70,7 @@ export class LoadingScene extends Scene { ...@@ -73,7 +70,7 @@ export class LoadingScene extends Scene {
.call(() => { .call(() => {
if (pro >= 1) { if (pro >= 1) {
this.removeEventListener(FYGE.Event.PROGRESS, this.progressEvent, this); this.removeEventListener(FYGE.Event.PROGRESS, this.progressEvent, this);
changeScene(StartScene,getWebData(WebNetName.index).data) // changeScene(StartScene,getWebData(WebNetName.index).data)
} }
}) })
} }
......
import { changeScene, hideWaiting, showPanel, showWaiting } from "../../module/ctrls";
import { Scene } from "../../module/views/Scene"; import { Scene } from "../../module/views/Scene";
import { showPanel, showWaiting, hideWaiting, showToast, changeScene } from "../../module/ctrls";
import { RulePanel } from "../panels/RulePanel";
import { Tools } from "../Tools";
import { layers } from "../../module/views/layers";
import { GDispatcher } from "../Main";
import { G_EVENT } from "../common/G_EVENT"; import { G_EVENT } from "../common/G_EVENT";
import { PlayScene } from "./PlayScene"; import { GDispatcher } from "../Main";
import { SharePanel } from "../panels/share";
import { Tools } from "../Tools";
import { sendWebNet } from "../WebNet"; import { sendWebNet } from "../WebNet";
import { WebNetName } from "../WebNetName"; import { WebNetName } from "../WebNetName";
import { SharePanel } from "../panels/share"; import { PlayScene } from "./PlayScene";
export class StartScene extends Scene { export class StartScene extends Scene {
get groupNames() { return ["index"] } get groupNames() { return ["index"] }
get skinName() { return "index" } get skinName() { return "index" }
...@@ -46,7 +44,7 @@ export class StartScene extends Scene { ...@@ -46,7 +44,7 @@ export class StartScene extends Scene {
}, this) }, this)
//规则按钮 //规则按钮
this.ruleBtn.addEventListener(FYGE.MouseEvent.CLICK, () => { this.ruleBtn.addEventListener(FYGE.MouseEvent.CLICK, () => {
showPanel(RulePanel) // showPanel(RulePanel)
}, this) }, this)
//我的奖品按钮 //我的奖品按钮
this.recordBtn.addEventListener(FYGE.MouseEvent.CLICK, () => { this.recordBtn.addEventListener(FYGE.MouseEvent.CLICK, () => {
......
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