Commit 5487e7de authored by wildfirecode's avatar wildfirecode

1

parent 01914c2f
......@@ -51,8 +51,9 @@
<script src="libs/downloadApp.js"></script>
<script src="http://yun.duiba.com.cn/db_games/svga.egret.min.new.js"></script>
<script>
// window['pageID'] = 'TeamShareScene';
// window['pageID'] = 'JoinShareScene';
window['pageID'] = 'Share2Scene';
window['projectId'] = "1";
window['playwayId'] = "join_1";
window["appId"] = "";
......
......@@ -166,8 +166,8 @@ export default class MainBase extends eui.UILayer {
// this.injectRES();
}
catch (e) {
alert("加载异常,请检查网络后重试~");
window.location.reload();
// alert("加载异常,请检查网络后重试~");
// window.location.reload();
console.error(e);
}
}
......@@ -183,15 +183,15 @@ export default class MainBase extends eui.UILayer {
}).catch(()=>{
// ToastCtrl.instance.show("网络异常,请刷新~");
alert("网络异常,请刷新~")
window.location.reload();
// alert("网络异常,请刷新~")
// window.location.reload();
})
}
private onConfigError(event: RES.ResourceEvent){
// ToastCtrl.instance.show("活动太火爆了请刷新~");
alert("活动太火爆了请刷新~");
window.location.reload();
// alert("活动太火爆了请刷新~");
// window.location.reload();
}
/**
* 配置文件加载完成,开始预加载Preload资源组。
......@@ -269,8 +269,8 @@ export default class MainBase extends eui.UILayer {
*/
protected onResourceItemLoadError(event: RES.ResourceEvent): void {
this.trace("项目加载失败,url : " + event.resItem.url);
alert("网络异常,请检查网络后重试~");
window.location.reload();
// alert("网络异常,请检查网络后重试~");
// window.location.reload();
}
private stateText: egret.TextField;
......
......@@ -10,11 +10,7 @@
},
{
"name": "preload",
<<<<<<< HEAD
"keys": "hand_png,hand2_png,ydlight_png,ydlight2_png,ydline_png,mapBtn_png,maphz_png,mappass_png,mram_png,mrbg_png,mrcx_png,mrhg_png,mrhz_png,mrmg_png,mrrb_png,mrtb_png,mrtitle_png,mrxg_png,pkadd_png,pkagainBtn_png,pkaskBtn_png,pkBG_png,pkBtn_png,pkcirle_png,pkloselight_png,pkloselogo_png,pkmyline_png,pkotherline_png,pkprizebg_png,pkprizeBtn_png,pkrulebg_png,pkrulebtn_png,pkscorebg_png,pkwinbg_png,pkwinBtn_png,pkwinlogo_png,finishbg_png,finishBtn_png,finishlight_png,finishlogo_png,lessscorebg_png,lessscoreBtn_png,rankbg_png,rankbg2_png,rankline_png,rankmybg_png,rulebg_png,sharebg_png,shareBtn_png,sharelab_png,sharerecordbg_png,sharerecordBtn_png,背景@2x_png,BG_png,chaoxian_png,CHNaomen_png,CHNhangzhou_png,CHNtaiwan_png,CHNxianggang_png,closeBtn_png,fireBtn_png,getBtn_png,hanguo_png,horn_png,littletitle_png,lockBtn_png,menggu_png,prizeBtn_png,rankBtn_png,recordBtn_png,riben_png,ruleBtn_png,startBtn_png,starttitle_png,teamBtn_png,unchaoxian_png,unCHNaomen_png,unCHNhangzhou_png,unCHNtaiwan_png,unCHNxianggang_png,unhanguo_png,unmenggu_png,unriben_png,waitBtn_png,yylogo_png,closeBtn2_png,xuanshiBG_png,xuanshiBtn_png,ranklight_png,pknoton_png,box_png,head1_png,pkpeacelight_png,pkwinlight_png,pkendbg_png,mapshareBtn_png,pkscorebg2_png,hand3_png,hand22_png,ydlight3_png,ydlight22_png,ydline2_png,mapBtn2_png,maphz2_png,mappass2_png,mapshareBtn2_png,mram2_png,mrbg2_png,mrcx2_png,mrhg2_png,mrhz2_png,mrmg2_png,mrrb2_png,mrtb2_png,mrtitle2_png,mrxg2_png,box2_png,head12_png,pkadd2_png,pkagainBtn2_png,pkaskBtn2_png,pkBG2_png,pkBtn2_png,pkcirle2_png,pkendbg2_png,pkloselight2_png,pkloselogo2_png,pkmyline2_png,pknoton2_png,pkotherline2_png,pkpeacelight2_png,pkprizebg2_png,pkprizeBtn2_png,pkrulebg2_png,pkrulebtn2_png,pkscorebg3_png,pkscorebg22_png,pkwinbg2_png,pkwinBtn2_png,pkwinlight2_png,pkwinlogo2_png,finishbg2_png,finishBtn2_png,finishlight2_png,finishlogo2_png,lessscorebg2_png,lessscoreBtn2_png,rankbg3_png,rankbg22_png,ranklight2_png,rankline2_png,rankmybg2_png,rulebg2_png,sharebg2_png,shareBtn2_png,sharelab2_png,sharerecordbg2_png,sharerecordBtn2_png,背景@2x2_png,BG2_png,chaoxian2_png,CHNaomen2_png,CHNhangzhou2_png,CHNtaiwan2_png,CHNxianggang2_png,closeBtn3_png,fireBtn2_png,getBtn2_png,hanguo2_png,horn2_png,littletitle2_png,lockBtn2_png,menggu2_png,prizeBtn2_png,rankBtn2_png,recordBtn2_png,riben2_png,ruleBtn2_png,startBtn2_png,starttitle2_png,teamBtn2_png,unchaoxian2_png,unCHNaomen2_png,unCHNhangzhou2_png,unCHNtaiwan2_png,unCHNxianggang2_png,unhanguo2_png,unmenggu2_png,unriben2_png,waitBtn2_png,yylogo2_png,bg2_png,progress2_png,closeBtn4_png,xuanshiBG2_png,xuanshiBtn2_png,transfer _toast1_png,transfer _toast2_png,transfer _toast3_png,teamshare_btn_png,teamshare_bg_jpg,slogan_btn_png,slogan_bg_png,sharestarter_sharebtn_png,sharestarter_btn_png,sharestarter_bg_jpg,joinshare_bg_jpg,joinshare_btn_png,confirm_bg_png,confirm_btn_png,关闭按钮 _png,certificate_jpg,certificate_cover_png,certificate_btn_png,pkpeacelogo_png,transferrecord_bg_png,transferrecord_item_bg_png,trans_bg_jpg"
=======
"keys": "hand_png,hand2_png,ydlight_png,ydlight2_png,ydline_png,mapBtn_png,maphz_png,mappass_png,mram_png,mrbg_png,mrcx_png,mrhg_png,mrhz_png,mrmg_png,mrrb_png,mrtb_png,mrtitle_png,mrxg_png,pkadd_png,pkagainBtn_png,pkaskBtn_png,pkBG_png,pkBtn_png,pkcirle_png,pkloselight_png,pkloselogo_png,pkprizebg_png,pkprizeBtn_png,pkrulebg_png,pkrulebtn_png,pkscorebg_png,pkwinbg_png,pkwinBtn_png,pkwinlogo_png,finishbg_png,finishBtn_png,finishlight_png,finishlogo_png,lessscorebg_png,lessscoreBtn_png,rankbg_png,rankbg2_png,rankline_png,rankmybg_png,rulebg_png,sharebg_png,shareBtn_png,sharelab_png,sharerecordbg_png,sharerecordBtn_png,背景@2x_png,BG_png,chaoxian_png,CHNaomen_png,CHNhangzhou_png,CHNtaiwan_png,CHNxianggang_png,closeBtn_png,fireBtn_png,getBtn_png,hanguo_png,horn_png,littletitle_png,lockBtn_png,menggu_png,prizeBtn_png,rankBtn_png,recordBtn_png,riben_png,ruleBtn_png,startBtn_png,starttitle_png,teamBtn_png,unchaoxian_png,unCHNaomen_png,unCHNhangzhou_png,unCHNtaiwan_png,unCHNxianggang_png,unhanguo_png,unmenggu_png,unriben_png,waitBtn_png,yylogo_png,closeBtn2_png,xuanshiBG_png,xuanshiBtn_png,ranklight_png,pknoton_png,box_png,head1_png,pkpeacelight_png,pkwinlight_png,pkendbg_png,mapshareBtn_png,pkscorebg2_png,hand3_png,hand22_png,ydlight3_png,ydlight22_png,ydline2_png,mapBtn2_png,maphz2_png,mappass2_png,mapshareBtn2_png,mram2_png,mrbg2_png,mrcx2_png,mrhg2_png,mrhz2_png,mrmg2_png,mrrb2_png,mrtb2_png,mrtitle2_png,mrxg2_png,box2_png,head12_png,pkadd2_png,pkagainBtn2_png,pkaskBtn2_png,pkBG2_png,pkBtn2_png,pkcirle2_png,pkendbg2_png,pkloselight2_png,pkloselogo2_png,pknoton2_png,pkpeacelight2_png,pkprizebg2_png,pkprizeBtn2_png,pkrulebg2_png,pkrulebtn2_png,pkscorebg3_png,pkscorebg22_png,pkwinbg2_png,pkwinBtn2_png,pkwinlight2_png,pkwinlogo2_png,finishbg2_png,finishBtn2_png,finishlight2_png,finishlogo2_png,lessscorebg2_png,lessscoreBtn2_png,rankbg3_png,rankbg22_png,ranklight2_png,rankline2_png,rankmybg2_png,rulebg2_png,sharebg2_png,shareBtn2_png,sharelab2_png,sharerecordbg2_png,sharerecordBtn2_png,背景@2x2_png,BG2_png,chaoxian2_png,CHNaomen2_png,CHNhangzhou2_png,CHNtaiwan2_png,CHNxianggang2_png,closeBtn3_png,fireBtn2_png,getBtn2_png,hanguo2_png,horn2_png,littletitle2_png,lockBtn2_png,menggu2_png,prizeBtn2_png,rankBtn2_png,recordBtn2_png,riben2_png,ruleBtn2_png,startBtn2_png,starttitle2_png,teamBtn2_png,unchaoxian2_png,unCHNaomen2_png,unCHNhangzhou2_png,unCHNtaiwan2_png,unCHNxianggang2_png,unhanguo2_png,unmenggu2_png,unriben2_png,waitBtn2_png,yylogo2_png,bg2_png,progress2_png,closeBtn4_png,xuanshiBG2_png,xuanshiBtn2_png,transfer _toast1_png,transfer _toast2_png,transfer _toast3_png,teamshare_btn_png,teamshare_bg_jpg,slogan_btn_png,slogan_bg_png,sharestarter_sharebtn_png,sharestarter_btn_png,sharestarter_bg_jpg,joinshare_bg_jpg,joinshare_btn_png,confirm_bg_png,confirm_btn_png,关闭按钮 _png,certificate_jpg,certificate_cover_png,certificate_btn_png,pkpeacelogo_png,transferrecord_bg_png,transferrecord_item_bg_png,pkmyline2_png,pkotherline2_png"
>>>>>>> a2ff3fd5cfae1fcf5aaa9320e216ffe16686f3f2
"keys": "hand_png,hand2_png,ydlight_png,ydlight2_png,ydline_png,mapBtn_png,maphz_png,mappass_png,mram_png,mrbg_png,mrcx_png,mrhg_png,mrhz_png,mrmg_png,mrrb_png,mrtb_png,mrtitle_png,mrxg_png,pkadd_png,pkagainBtn_png,pkaskBtn_png,pkBG_png,pkBtn_png,pkcirle_png,pkloselight_png,pkloselogo_png,pkprizebg_png,pkprizeBtn_png,pkrulebg_png,pkrulebtn_png,pkscorebg_png,pkwinbg_png,pkwinBtn_png,pkwinlogo_png,finishbg_png,finishBtn_png,finishlight_png,finishlogo_png,lessscorebg_png,lessscoreBtn_png,rankbg_png,rankbg2_png,rankline_png,rankmybg_png,rulebg_png,sharebg_png,shareBtn_png,sharelab_png,sharerecordbg_png,sharerecordBtn_png,背景@2x_png,BG_png,chaoxian_png,CHNaomen_png,CHNhangzhou_png,CHNtaiwan_png,CHNxianggang_png,closeBtn_png,fireBtn_png,getBtn_png,hanguo_png,horn_png,littletitle_png,lockBtn_png,menggu_png,prizeBtn_png,rankBtn_png,recordBtn_png,riben_png,ruleBtn_png,startBtn_png,starttitle_png,teamBtn_png,unchaoxian_png,unCHNaomen_png,unCHNhangzhou_png,unCHNtaiwan_png,unCHNxianggang_png,unhanguo_png,unmenggu_png,unriben_png,waitBtn_png,yylogo_png,closeBtn2_png,xuanshiBG_png,xuanshiBtn_png,ranklight_png,pknoton_png,box_png,head1_png,pkpeacelight_png,pkwinlight_png,pkendbg_png,mapshareBtn_png,pkscorebg2_png,hand3_png,hand22_png,ydlight3_png,ydlight22_png,ydline2_png,mapBtn2_png,maphz2_png,mappass2_png,mapshareBtn2_png,mram2_png,mrbg2_png,mrcx2_png,mrhg2_png,mrhz2_png,mrmg2_png,mrrb2_png,mrtb2_png,mrtitle2_png,mrxg2_png,box2_png,head12_png,pkadd2_png,pkagainBtn2_png,pkaskBtn2_png,pkBG2_png,pkBtn2_png,pkcirle2_png,pkendbg2_png,pkloselight2_png,pkloselogo2_png,pknoton2_png,pkpeacelight2_png,pkprizebg2_png,pkprizeBtn2_png,pkrulebg2_png,pkrulebtn2_png,pkscorebg3_png,pkscorebg22_png,pkwinbg2_png,pkwinBtn2_png,pkwinlight2_png,pkwinlogo2_png,finishbg2_png,finishBtn2_png,finishlight2_png,finishlogo2_png,lessscorebg2_png,lessscoreBtn2_png,rankbg3_png,rankbg22_png,ranklight2_png,rankline2_png,rankmybg2_png,rulebg2_png,sharebg2_png,shareBtn2_png,sharelab2_png,sharerecordbg2_png,sharerecordBtn2_png,背景@2x2_png,BG2_png,chaoxian2_png,CHNaomen2_png,CHNhangzhou2_png,CHNtaiwan2_png,CHNxianggang2_png,closeBtn3_png,fireBtn2_png,getBtn2_png,hanguo2_png,horn2_png,littletitle2_png,lockBtn2_png,menggu2_png,prizeBtn2_png,rankBtn2_png,recordBtn2_png,riben2_png,ruleBtn2_png,startBtn2_png,starttitle2_png,teamBtn2_png,unchaoxian2_png,unCHNaomen2_png,unCHNhangzhou2_png,unCHNtaiwan2_png,unCHNxianggang2_png,unhanguo2_png,unmenggu2_png,unriben2_png,waitBtn2_png,yylogo2_png,bg2_png,progress2_png,closeBtn4_png,xuanshiBG2_png,xuanshiBtn2_png,transfer _toast1_png,transfer _toast2_png,transfer _toast3_png,teamshare_btn_png,teamshare_bg_jpg,slogan_btn_png,slogan_bg_png,sharestarter_sharebtn_png,sharestarter_btn_png,sharestarter_bg_jpg,joinshare_bg_jpg,joinshare_btn_png,confirm_bg_png,confirm_btn_png,关闭按钮 _png,certificate_jpg,certificate_cover_png,certificate_btn_png,pkpeacelogo_png,transferrecord_bg_png,transferrecord_item_bg_png,pkmyline2_png,pkotherline2_png,share2bg_jpg,share2btn_png,share2mask_png"
}
],
"resources": [
......@@ -1094,11 +1090,6 @@
"url": "assets/transferrecord/transferrecord_item_bg.png"
},
{
<<<<<<< HEAD
"name": "trans_bg_jpg",
"type": "image",
"url": "assets/transfer/trans_bg.jpg"
=======
"name": "pkmyline2_png",
"type": "image",
"url": "assets/pk/pkmyline2.png"
......@@ -1107,7 +1098,21 @@
"name": "pkotherline2_png",
"type": "image",
"url": "assets/pk/pkotherline2.png"
>>>>>>> a2ff3fd5cfae1fcf5aaa9320e216ffe16686f3f2
},
{
"name": "share2bg_jpg",
"type": "image",
"url": "assets/share2/share2bg.jpg"
},
{
"name": "share2btn_png",
"type": "image",
"url": "assets/share2/share2btn.png"
},
{
"name": "share2mask_png",
"type": "image",
"url": "assets/share2/share2mask.png"
}
]
}
\ No newline at end of file
......@@ -52,7 +52,7 @@ import { getResPath } from './utils';
class Main extends MainBase {
protected registerModules() {
// 注册Toast
ToastCtrl.instance.registerClass();
// 注册所有Panel
......@@ -62,37 +62,37 @@ class Main extends MainBase {
PanelCtrl.instance.registerClass(ModuleTypes.RULE_PANEL, RulePanel);
PanelCtrl.instance.registerClass(ModuleTypes.ConfirmPanel, ConfirmPanel);
PanelCtrl.instance.registerClass(ModuleTypes.SloganPanel, SloganPanel);
PanelCtrl.instance.registerClass(ModuleTypes.RANK_PANEL,RankPanel);
PanelCtrl.instance.registerClass(ModuleTypes.COUNTDOWN_PANEL,CountDownPanel);
PanelCtrl.instance.registerClass(ModuleTypes.END_PANEL,EndPanel);
PanelCtrl.instance.registerClass(ModuleTypes.RECORD_PANEL,RecordPanel);
PanelCtrl.instance.registerClass(ModuleTypes.PRIZE_PANEL,PrizePanel);
PanelCtrl.instance.registerClass(ModuleTypes.NOPRIZE_PANEL,NoPrizePanel);
PanelCtrl.instance.registerClass(ModuleTypes.RANK_PANEL, RankPanel);
PanelCtrl.instance.registerClass(ModuleTypes.COUNTDOWN_PANEL, CountDownPanel);
PanelCtrl.instance.registerClass(ModuleTypes.END_PANEL, EndPanel);
PanelCtrl.instance.registerClass(ModuleTypes.RECORD_PANEL, RecordPanel);
PanelCtrl.instance.registerClass(ModuleTypes.PRIZE_PANEL, PrizePanel);
PanelCtrl.instance.registerClass(ModuleTypes.NOPRIZE_PANEL, NoPrizePanel);
// // 注册所有Scene
SceneCtrl.instance.registerClass(ModuleTypes.PLAY_SCENE, PlayScene);
SceneCtrl.instance.registerClass(ModuleTypes.START_SCENE, StartScene);
SceneCtrl.instance.registerClass(ModuleTypes.RECORD_SCENE,RecordScene);
SceneCtrl.instance.registerClass(ModuleTypes.RECORDMAP_SCENE,RecordMapScene);
SceneCtrl.instance.registerClass(ModuleTypes.PK_SCENE,PKScene);
SceneCtrl.instance.registerClass(ModuleTypes.CertificateScene,CertificateScene);
SceneCtrl.instance.registerClass(ModuleTypes.JoinShareScene,JoinShareScene);
SceneCtrl.instance.registerClass(ModuleTypes.Share2Scene,Share2Scene);
SceneCtrl.instance.registerClass(ModuleTypes.TeamShareScene,TeamShareScene);
SceneCtrl.instance.registerClass(ModuleTypes.ShareStarterScene,ShareStarterScene);
SceneCtrl.instance.registerClass(ModuleTypes.TransScene,TransScene);
PanelCtrl.instance.registerClass(ModuleTypes.TransRecordPanel,TransRecordPanel);
PanelCtrl.instance.registerClass(ModuleTypes.GUIDE_PANEL,GuidePanel);
PanelCtrl.instance.registerClass(ModuleTypes.PLACE_PANEL,PlacePanel)
PanelCtrl.instance.registerClass(ModuleTypes.NOCREDITS_PANEL,NoCreditsPanel)
PanelCtrl.instance.registerClass(ModuleTypes.PKRULE_PANEL,PKRulePanel);
PanelCtrl.instance.registerClass(ModuleTypes.PKPRIZE_PANEL,PKPrizePanel);
PanelCtrl.instance.registerClass(ModuleTypes.PKSCORE_PANEL,PKScorePanel);
PanelCtrl.instance.registerClass(ModuleTypes.FINISH_PANEL,FinishPanel);
PanelCtrl.instance.registerClass(ModuleTypes.RANK_PANEL,RankPanel);
SceneCtrl.instance.registerClass(ModuleTypes.RECORD_SCENE, RecordScene);
SceneCtrl.instance.registerClass(ModuleTypes.RECORDMAP_SCENE, RecordMapScene);
SceneCtrl.instance.registerClass(ModuleTypes.PK_SCENE, PKScene);
SceneCtrl.instance.registerClass(ModuleTypes.CertificateScene, CertificateScene);
SceneCtrl.instance.registerClass(ModuleTypes.JoinShareScene, JoinShareScene);
SceneCtrl.instance.registerClass(ModuleTypes.Share2Scene, Share2Scene);
SceneCtrl.instance.registerClass(ModuleTypes.TeamShareScene, TeamShareScene);
SceneCtrl.instance.registerClass(ModuleTypes.ShareStarterScene, ShareStarterScene);
SceneCtrl.instance.registerClass(ModuleTypes.TransScene, TransScene);
PanelCtrl.instance.registerClass(ModuleTypes.TransRecordPanel, TransRecordPanel);
PanelCtrl.instance.registerClass(ModuleTypes.GUIDE_PANEL, GuidePanel);
PanelCtrl.instance.registerClass(ModuleTypes.PLACE_PANEL, PlacePanel)
PanelCtrl.instance.registerClass(ModuleTypes.NOCREDITS_PANEL, NoCreditsPanel)
PanelCtrl.instance.registerClass(ModuleTypes.PKRULE_PANEL, PKRulePanel);
PanelCtrl.instance.registerClass(ModuleTypes.PKPRIZE_PANEL, PKPrizePanel);
PanelCtrl.instance.registerClass(ModuleTypes.PKSCORE_PANEL, PKScorePanel);
PanelCtrl.instance.registerClass(ModuleTypes.FINISH_PANEL, FinishPanel);
PanelCtrl.instance.registerClass(ModuleTypes.RANK_PANEL, RankPanel);
// NetManager.ins.onNotSuccess = (msg) => {
// showAlertPanel(msg)
......@@ -124,7 +124,7 @@ class Main extends MainBase {
// 监听当预加载资源加载完毕
GDispatcher.addEvent('PreloadLoaded', () => {
Waiting.instance.show()
this.createGameScene()
this.createGameScene()
// Waiting.instance.hide()
}, this);
// GDispatcher.addEvent('DelayLoaded', () => {
......@@ -141,20 +141,20 @@ class Main extends MainBase {
// this.loadBg("startBg.png");
GDispatcher.dispatchEvent('PreloadLoaded');
window['isPreloadLoaded'] = true;
// RES.loadGroup("Normal");
// } else if (event.groupName == "Normal") {
// this.trace("Normal组加载完成");
// this.trace("开始加载Garbage资源");
// GDispatcher.dispatchEvent('NormalLoaded');
// RES.loadGroup("Garbage");
// } else if (event.groupName == "Garbage") {
// this.trace("Garbage组加载完成");
// this.trace("开始加载Delay资源");
// GDispatcher.dispatchEvent('GarbageLoaded');
// RES.loadGroup("Delay");
// } else if (event.groupName == "Delay") {
// this.trace("Delay组加载完成");
// GDispatcher.dispatchEvent('DelayLoaded');
// RES.loadGroup("Normal");
// } else if (event.groupName == "Normal") {
// this.trace("Normal组加载完成");
// this.trace("开始加载Garbage资源");
// GDispatcher.dispatchEvent('NormalLoaded');
// RES.loadGroup("Garbage");
// } else if (event.groupName == "Garbage") {
// this.trace("Garbage组加载完成");
// this.trace("开始加载Delay资源");
// GDispatcher.dispatchEvent('GarbageLoaded');
// RES.loadGroup("Delay");
// } else if (event.groupName == "Delay") {
// this.trace("Delay组加载完成");
// GDispatcher.dispatchEvent('DelayLoaded');
RES.removeEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete, this);
RES.removeEventListener(RES.ResourceEvent.GROUP_LOAD_ERROR, this.onResourceLoadError, this);
RES.removeEventListener(RES.ResourceEvent.GROUP_PROGRESS, this.onResourceProgress, this);
......@@ -164,12 +164,28 @@ class Main extends MainBase {
// 创建游戏场景
protected createGameScene() {
super.createGameScene();
// SceneCtrl.instance.change(ModuleTypes.TransScene);
// PanelCtrl.instance.show(ModuleTypes.SloganPanel);
// Waiting.instance.hide();
// return;
if (window['pageID'] == 'JoinShareScene') {
SceneCtrl.instance.change(ModuleTypes.JoinShareScene);
Waiting.instance.hide();
return;
}
if (window['pageID'] == 'TeamShareScene') {
SceneCtrl.instance.change(ModuleTypes.TeamShareScene);
Waiting.instance.hide();
return;
}
if (window['pageID'] == 'Share2Scene') {
SceneCtrl.instance.change(ModuleTypes.Share2Scene);
Waiting.instance.hide();
return;
}
loadSvgaRes(getResPath() + 'resource/assets/svgas/standby.svga');
loadSvgaRes(getResPath() + 'resource/assets/svgas/trans.svga');
......@@ -183,32 +199,32 @@ class Main extends MainBase {
Buried.init();
// 端内发接口
if(GameConst.getQueryString("InviteSource")){
yzwNet.homeBaseInfo((s)=>{
if(!s){
if (GameConst.getQueryString("InviteSource")) {
yzwNet.homeBaseInfo((s) => {
if (!s) {
ToastCtrl.instance.show("网络异常请重试~");
return;
}
},window['projectId'],GameConst.getQueryString("InviteSource"))
}, window['projectId'], GameConst.getQueryString("InviteSource"))
Waiting.instance.hide();
let data = DataManager.ins.getData("homeBaseInfo").data;
SceneCtrl.instance.change(ModuleTypes.START_SCENE,data);
}else{
yzwNet.homeBaseInfo((s)=>{
if(!s){
SceneCtrl.instance.change(ModuleTypes.START_SCENE, data);
} else {
yzwNet.homeBaseInfo((s) => {
if (!s) {
ToastCtrl.instance.show("网络异常请重试~");
return;
}
Waiting.instance.hide();
let data = DataManager.ins.getData("homeBaseInfo").data;
SceneCtrl.instance.change(ModuleTypes.START_SCENE,data);
},window['projectId'])
SceneCtrl.instance.change(ModuleTypes.START_SCENE, data);
}, window['projectId'])
}
}
/**
......
......@@ -3,6 +3,7 @@ import { ModuleTypes } from "../types/sceneTypes";
import Panel from "../views/Panel";
import PanelCtrl from "../ctrls/panelCtrl";
import { GCache } from "../../libs/tc/util/GCache";
import GameConst from "../GameConst";
export default class ConfirmPanel extends Panel {
......@@ -14,6 +15,7 @@ export default class ConfirmPanel extends Panel {
}
initUI() {
GameConst.getQueryString('shareCode');
this['tips'].text = `是否确认加入“${0}”的战队参与队伍PK`;
}
......
import Scene from "../views/Scene";
import PanelCtrl from "../ctrls/panelCtrl";
import { ModuleTypes } from "../types/sceneTypes";
import GameConst from "../GameConst";
const iswx = () => {
return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1
}
export default class JoinShareScene extends Scene {
protected get skinKey() { return 'JoinShare' }
export default class JoinShareScene extends Scene{
protected get skinKey(){return 'JoinShare'}
constructor(data){
constructor(data) {
super();
this.initUI(data);
}
initUI(data){
initUI(data) {
// this['from'].text = '11111111';
// this['to'].text = '22222222';
}
onTap_btn(){
onTap_btn() {
console.log('onTap_btn');
if (iswx()) {
} else {
PanelCtrl.instance.show(ModuleTypes.ConfirmPanel);
}
}
initEvents(){
this.onTap(this['btn'],this.onTap_btn);
initEvents() {
this.onTap(this['btn'], this.onTap_btn);
}
}
\ No newline at end of file
......@@ -10,7 +10,7 @@ export default class Share2Scene extends Scene {
}
initUI(data) {
this.height = this.stage.stageHeight;
}
onTap_btn() {
......
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