Commit b43c4135 authored by wildfirecode's avatar wildfirecode

1

parent fc814589
......@@ -7,10 +7,11 @@ import { ModuleTypes } from "../types/sceneTypes";
import { createData } from "../../../src/startScene/StartScene";
import { DataManager } from "../../tw/manager/DataManager";
export default class NoPrizePanel extends Panel {
_level;
start(data) {
super.start();
// this.data.score = `本局分数 ${DataManager.ins.getData('ngameSubmit').data.score}`;
this._level = parseInt(data.level+'');
this['shareBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(16));
......@@ -28,8 +29,10 @@ export default class NoPrizePanel extends Panel {
onTouchTap_closeBtn() {
super.onTouchTap_closeBtn();
if (this._level +1 <= 70)
SceneCtrl.instance.change(ModuleTypes.START_SCENE, { level: this._level + 1 });
else
SceneCtrl.instance.change(ModuleTypes.START_SCENE);
// SceneCtrl.instance.change(ModuleTypes.MAP_SCENE, createData());
}
protected get closeBtns(): eui.Button[] { return [this['closeBtn'], this['goBtn']] }
......
......@@ -6,6 +6,7 @@ import SceneCtrl from "../ctrls/sceneCtrl";
import { ModuleTypes } from "../types/sceneTypes";
import Panel from "./Panel";
export default class PrizePanel extends Panel {
_level;
start(data) {
super.start();
......@@ -16,16 +17,17 @@ export default class PrizePanel extends Panel {
// this.img.height = this.picBigWidth / this.bigPicRatio;
// showCustomLog(lottery);
this._level = parseInt(data.level+'');
this.data.img = DataManager.ins.getData('getPlugOrderStatus').lottery.imgurl;
this['shareBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
this['shareBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(15));
}, this);
this.showlog();
NetManager.ins.hc_home(()=>{},window['collectRuleId']);
NetManager.ins.hc_home(() => { }, window['collectRuleId']);
const hc_submitData = DataManager.ins.getData('hc_submit').data;
this.setStar(hc_submitData.stars);
......@@ -52,7 +54,10 @@ export default class PrizePanel extends Panel {
onTouchTap_closeBtn(): any {
super.onTouchTap_closeBtn();
SceneCtrl.instance.change(ModuleTypes.START_SCENE);
if (this._level +1 <= 70)
SceneCtrl.instance.change(ModuleTypes.START_SCENE, { level: this._level + 1 });
else
SceneCtrl.instance.change(ModuleTypes.START_SCENE);
// SceneCtrl.instance.change(ModuleTypes.MAP_SCENE, createData());
}
......
......@@ -5,16 +5,23 @@ import { createData } from "../startScene/StartScene";
import { NetManager } from "../../libs/tw/manager/NetManager";
export default class FailedPanel extends Panel {
_level;
start(data) {
super.start();
NetManager.ins.hc_home(()=>{},window['collectRuleId']);
super.start();
if (data)
this._level = parseInt(data.level + '');
NetManager.ins.hc_home(() => { }, window['collectRuleId']);
}
onTouchTap_closeBtn() {
super.onTouchTap_closeBtn();
SceneCtrl.instance.change(ModuleTypes.START_SCENE);
if (this._level)
SceneCtrl.instance.change(ModuleTypes.START_SCENE, { level: this._level });
else
SceneCtrl.instance.change(ModuleTypes.START_SCENE);
}
protected get closeBtns(): eui.Button[] { return [this['closeBtn'],this['againBtn']] }
protected get closeBtns(): eui.Button[] { return [this['closeBtn'], this['againBtn']] }
get skinKey() { return 'Fail' }
}
\ No newline at end of file
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