Commit 351dd6cb authored by wildfirecode's avatar wildfirecode

1

parent 5b1737e8
...@@ -13,12 +13,14 @@ export default class PanelCtrl { ...@@ -13,12 +13,14 @@ export default class PanelCtrl {
this._parent = parent; this._parent = parent;
} }
private noLoadingList = ['StartPanel','failed','prize2', ModuleTypes.PRIZE_PANEL,ModuleTypes.NO_PRIZE_PANEL];
show(type: any, data?) { show(type: any, data?) {
this.closeCurrent(true); this.closeCurrent(true);
const cls = this._panelClassMap[type]; const cls = this._panelClassMap[type];
const panel: Panel = new cls(data); const panel: Panel = new cls(data);
this.addMask(); this.addMask();
if (!window['development']) { if (!window['development']) {
if(this.noLoadingList.indexOf(type) == -1)
Loading.instace.show(); Loading.instace.show();
const key = panel.skinKey.toLowerCase(); const key = panel.skinKey.toLowerCase();
const reskey = panel.skinResKey || key; const reskey = panel.skinResKey || key;
......
...@@ -8,7 +8,6 @@ import { PassType } from "../something/enum/PassType"; ...@@ -8,7 +8,6 @@ import { PassType } from "../something/enum/PassType";
import { getPropNums } from "../getHomeData"; import { getPropNums } from "../getHomeData";
import PropType from "../PropType"; import PropType from "../PropType";
import hdGameDoDojoin from "../../libs/new_tw/ctrls/hdGameDoDojoin"; import hdGameDoDojoin from "../../libs/new_tw/ctrls/hdGameDoDojoin";
import Loading from "../../libs/new_wx/components/Loading";
import TargetItemRenderer from "./TargetItemRenderer"; import TargetItemRenderer from "./TargetItemRenderer";
export default class StartPanel extends Panel { export default class StartPanel extends Panel {
...@@ -19,7 +18,7 @@ export default class StartPanel extends Panel { ...@@ -19,7 +18,7 @@ export default class StartPanel extends Panel {
setGlow(this['levelTxt'], 0xfa4b09, 1); setGlow(this['levelTxt'], 0xfa4b09, 1);
this['levelTxt'].text = `第${data}关`; this['levelTxt'].text = `第${data}关`;
this._level = data; this._level = data;
var mapDataIndex = data; let mapDataIndex = data;
if (data >= 56) { if (data >= 56) {
//循环36到50 //循环36到50
mapDataIndex = data - 20 mapDataIndex = data - 20
...@@ -58,7 +57,7 @@ export default class StartPanel extends Panel { ...@@ -58,7 +57,7 @@ export default class StartPanel extends Panel {
} }
onTap_startBtn() { onTap_startBtn() {
Loading.instace.show(); // Loading.instace.show();
this.touchChildren = false; this.touchChildren = false;
this.touchEnabled = false; this.touchEnabled = false;
try { try {
...@@ -68,11 +67,11 @@ export default class StartPanel extends Panel { ...@@ -68,11 +67,11 @@ export default class StartPanel extends Panel {
} }
hdGameDoDojoin(async (success) => { hdGameDoDojoin(async (success) => {
Loading.instace.hide(); // Loading.instace.hide();
this.touchChildren = true; this.touchChildren = true;
this.touchEnabled = true; this.touchEnabled = true;
if (success) { if (success) {
Loading.instace.show(); // Loading.instace.show();
try { try {
const key = 'main2'; const key = 'main2';
await Promise.all([ await Promise.all([
...@@ -82,7 +81,7 @@ export default class StartPanel extends Panel { ...@@ -82,7 +81,7 @@ export default class StartPanel extends Panel {
} }
Loading.instace.hide(); // Loading.instace.hide();
this.hidePanel(); this.hidePanel();
SceneCtrl.instance.change(ModuleTypes.MAIN_SCENE, { chapter: this._level }); SceneCtrl.instance.change(ModuleTypes.MAIN_SCENE, { chapter: this._level });
} }
......
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