Commit 9d0ac511 authored by wangzhujun's avatar wangzhujun

3333123

parent 37bb27ed
...@@ -174,7 +174,8 @@ class Main extends MainBase { ...@@ -174,7 +174,8 @@ class Main extends MainBase {
if (GameConst.getQueryString("InviteSource")) { if (GameConst.getQueryString("InviteSource")) {
yzwNet.homeBaseInfo((s) => { yzwNet.homeBaseInfo((s) => {
if (!s) { if (!s) {
ToastCtrl.instance.show("网络异常请重试~"); ToastCtrl.instance.show(DataManager.ins.getData("homeBaseInfo").message)
// ToastCtrl.instance.show("网络异常请重试~");
return; return;
} }
}, window['projectId'], GameConst.getQueryString("InviteSource")) }, window['projectId'], GameConst.getQueryString("InviteSource"))
...@@ -216,7 +217,8 @@ class Main extends MainBase { ...@@ -216,7 +217,8 @@ class Main extends MainBase {
if (GameConst.getQueryString("InviteSource")) { if (GameConst.getQueryString("InviteSource")) {
yzwNet.homeBaseInfo((s) => { yzwNet.homeBaseInfo((s) => {
if (!s) { if (!s) {
ToastCtrl.instance.show("网络异常请重试~"); ToastCtrl.instance.show(DataManager.ins.getData("homeBaseInfo").message)
// ToastCtrl.instance.show("网络异常请重试~");
return; return;
} }
}, window['projectId'], GameConst.getQueryString("InviteSource")) }, window['projectId'], GameConst.getQueryString("InviteSource"))
...@@ -227,7 +229,8 @@ class Main extends MainBase { ...@@ -227,7 +229,8 @@ class Main extends MainBase {
} else { } else {
yzwNet.homeBaseInfo((s) => { yzwNet.homeBaseInfo((s) => {
if (!s) { if (!s) {
ToastCtrl.instance.show("网络异常请重试~"); ToastCtrl.instance.show(DataManager.ins.getData("homeBaseInfo").message)
// ToastCtrl.instance.show("网络异常请重试~");
return; return;
} }
Waiting.instance.hide(); Waiting.instance.hide();
......
...@@ -45,6 +45,11 @@ export default class RankPanel extends Panel{ ...@@ -45,6 +45,11 @@ export default class RankPanel extends Panel{
this.myRank['rankid'].text = "我"; this.myRank['rankid'].text = "我";
this.myRank['ranknum'].text = data.currentUserInfo.count; this.myRank['ranknum'].text = data.currentUserInfo.count;
this.myRank['rankBG'].source = "rankmybg_png" this.myRank['rankBG'].source = "rankmybg_png"
}else{
this.myRank['rankid'].text = "我";
this.myRank['ranklab'].text = "未上榜"
this.myRank['ranknum'].text = "0";
this.myRank['rankBG'].source = "rankmybg_png"
} }
} }
} }
...@@ -58,7 +63,8 @@ export default class RankPanel extends Panel{ ...@@ -58,7 +63,8 @@ export default class RankPanel extends Panel{
Waiting.instance.show(); Waiting.instance.show();
yzwNet.homeBaseInfo((s)=>{ yzwNet.homeBaseInfo((s)=>{
if(!s){ if(!s){
ToastCtrl.instance.show("网络异常请重试~"); ToastCtrl.instance.show(DataManager.ins.getData("homeBaseInfo").message)
// ToastCtrl.instance.show("网络异常请重试~");
return; return;
} }
Waiting.instance.hide(); Waiting.instance.hide();
......
...@@ -141,9 +141,19 @@ export default class StartScene extends Scene { ...@@ -141,9 +141,19 @@ export default class StartScene extends Scene {
GuideFive(){ GuideFive(){
yzwNet.doStart((s)=>{ yzwNet.doStart((s)=>{
if(!s){ if(!s){
ToastCtrl.instance.show("网络异常请重试~"); ToastCtrl.instance.show(DataManager.ins.getData("doStart").message)
// ToastCtrl.instance.show("网络异常请重试~");
return; return;
} }
yzwNet.unlockArea((ss)=>{
if(!ss){
ToastCtrl.instance.show(DataManager.ins.getData("unlockArea").message)
// ToastCtrl.instance.show("网络异常请重试~");
return
}
// this[this.arr[this.level]].source = this[this.arr[this.level]].source.substring(2);
// PanelCtrl.instance.show(ModuleTypes.PLACE_PANEL,this.level+1);
let startdata = DataManager.ins.getData("doStart").data; let startdata = DataManager.ins.getData("doStart").data;
let data = {startdata:startdata,type:3}; let data = {startdata:startdata,type:3};
this.hz.source = "CHNhangzhou_png" this.hz.source = "CHNhangzhou_png"
...@@ -151,6 +161,7 @@ export default class StartScene extends Scene { ...@@ -151,6 +161,7 @@ export default class StartScene extends Scene {
this.clearTap(this.unlockBtn,this.GuideFive); this.clearTap(this.unlockBtn,this.GuideFive);
this.onTap(this.unlockBtn,this.unlockArea); this.onTap(this.unlockBtn,this.unlockArea);
PanelCtrl.instance.show(ModuleTypes.GUIDE_PANEL,data); PanelCtrl.instance.show(ModuleTypes.GUIDE_PANEL,data);
},window['projectId']);
},window['projectId']) },window['projectId'])
} }
...@@ -158,7 +169,8 @@ export default class StartScene extends Scene { ...@@ -158,7 +169,8 @@ export default class StartScene extends Scene {
onTap_rankBtn(){ onTap_rankBtn(){
yzwNet.rankInfo((s)=>{ yzwNet.rankInfo((s)=>{
if(!s){ if(!s){
ToastCtrl.instance.show("网络异常请重试~"); ToastCtrl.instance.show(DataManager.ins.getData("rankInfo").message)
// ToastCtrl.instance.show("网络异常请重试~");
return; return;
} }
let data = DataManager.ins.getData("rankInfo").data; let data = DataManager.ins.getData("rankInfo").data;
...@@ -175,9 +187,18 @@ export default class StartScene extends Scene { ...@@ -175,9 +187,18 @@ export default class StartScene extends Scene {
if(this.level == 0){ if(this.level == 0){
yzwNet.doStart((s)=>{ yzwNet.doStart((s)=>{
if(!s){ if(!s){
ToastCtrl.instance.show("网络异常请重试~"); ToastCtrl.instance.show(DataManager.ins.getData("doStart").message)
// ToastCtrl.instance.show("网络异常请重试~");
return; return;
} }
yzwNet.unlockArea((ss)=>{
if(!ss){
ToastCtrl.instance.show(DataManager.ins.getData("unlockArea").message)
// ToastCtrl.instance.show("网络异常请重试~");
return
}
// this[this.arr[this.level]].source = this[this.arr[this.level]].source.substring(2);
// PanelCtrl.instance.show(ModuleTypes.PLACE_PANEL,this.level+1);
let startdata = DataManager.ins.getData("doStart").data; let startdata = DataManager.ins.getData("doStart").data;
let data = {startdata:startdata,type:3}; let data = {startdata:startdata,type:3};
this.hz.source = "CHNhangzhou_png" this.hz.source = "CHNhangzhou_png"
...@@ -185,11 +206,14 @@ export default class StartScene extends Scene { ...@@ -185,11 +206,14 @@ export default class StartScene extends Scene {
this.clearTap(this.unlockBtn,this.GuideFive); this.clearTap(this.unlockBtn,this.GuideFive);
this.onTap(this.unlockBtn,this.unlockArea); this.onTap(this.unlockBtn,this.unlockArea);
PanelCtrl.instance.show(ModuleTypes.GUIDE_PANEL,data); PanelCtrl.instance.show(ModuleTypes.GUIDE_PANEL,data);
},window['projectId']);
},window['projectId']) },window['projectId'])
}else{ }else{
yzwNet.unlockArea((s)=>{ yzwNet.unlockArea((s)=>{
if(!s){ if(!s){
ToastCtrl.instance.show("网络异常请重试~"); ToastCtrl.instance.show(DataManager.ins.getData("unlockArea").message)
// ToastCtrl.instance.show("网络异常请重试~");
return return
} }
this[this.arr[this.level]].source = this[this.arr[this.level]].source.substring(2); this[this.arr[this.level]].source = this[this.arr[this.level]].source.substring(2);
...@@ -214,7 +238,8 @@ export default class StartScene extends Scene { ...@@ -214,7 +238,8 @@ export default class StartScene extends Scene {
onTap_PKBtn(){ onTap_PKBtn(){
yzwNet.getPkBaseInfo((s)=>{ yzwNet.getPkBaseInfo((s)=>{
if(!s){ if(!s){
ToastCtrl.instance.show("网络异常请重试~"); ToastCtrl.instance.show(DataManager.ins.getData("getPkBaseInfo").message)
// ToastCtrl.instance.show("网络异常请重试~");
return return
} }
let data = DataManager.ins.getData("getPkBaseInfo").data; let data = DataManager.ins.getData("getPkBaseInfo").data;
......
...@@ -176,7 +176,8 @@ export default class PKScene extends Scene{ ...@@ -176,7 +176,8 @@ export default class PKScene extends Scene{
addTeam(){ addTeam(){
yzwNet.genInvite((s)=>{ yzwNet.genInvite((s)=>{
if(!s){ if(!s){
ToastCtrl.instance.show("网络异常请重试~") ToastCtrl.instance.show(DataManager.ins.getData("genInvite").message)
// ToastCtrl.instance.show("网络异常请重试~")
return return
} }
let data = DataManager.ins.getData('genInvite').data; let data = DataManager.ins.getData('genInvite').data;
...@@ -187,7 +188,8 @@ export default class PKScene extends Scene{ ...@@ -187,7 +188,8 @@ export default class PKScene extends Scene{
askTeam(){ askTeam(){
yzwNet.genInvite((s)=>{ yzwNet.genInvite((s)=>{
if(!s){ if(!s){
ToastCtrl.instance.show("网络异常请重试~") ToastCtrl.instance.show(DataManager.ins.getData("genInvite").message)
// ToastCtrl.instance.show("网络异常请重试~")
return return
} }
let data = DataManager.ins.getData('genInvite').data; let data = DataManager.ins.getData('genInvite').data;
...@@ -198,7 +200,8 @@ export default class PKScene extends Scene{ ...@@ -198,7 +200,8 @@ export default class PKScene extends Scene{
askOnline(){ askOnline(){
yzwNet.genInvite((s)=>{ yzwNet.genInvite((s)=>{
if(!s){ if(!s){
ToastCtrl.instance.show("网络异常请重试~") ToastCtrl.instance.show(DataManager.ins.getData("genInvite").message)
// ToastCtrl.instance.show("网络异常请重试~")
return return
} }
let data = DataManager.ins.getData('genInvite').data; let data = DataManager.ins.getData('genInvite').data;
......
...@@ -95,7 +95,8 @@ export default class PKScorePanel extends Panel{ ...@@ -95,7 +95,8 @@ export default class PKScorePanel extends Panel{
onTap_PKBtn(){ onTap_PKBtn(){
yzwNet.getPkBaseInfo((s)=>{ yzwNet.getPkBaseInfo((s)=>{
if(!s){ if(!s){
ToastCtrl.instance.show("网络异常请重试~"); ToastCtrl.instance.show(DataManager.ins.getData("getPkBaseInfo").message)
// ToastCtrl.instance.show("网络异常请重试~");
return return
} }
let data = DataManager.ins.getData("getPkBaseInfo").data; let data = DataManager.ins.getData("getPkBaseInfo").data;
......
import Scene from "../views/Scene"; import Scene from "../views/Scene";
import { yzwNet } from "../NetConst"; import { yzwNet } from "../NetConst";
import ToastCtrl from "../ctrls/toastCtrl"; import ToastCtrl from "../ctrls/toastCtrl";
import { DataManager } from "../../libs/tw/manager/DataManager";
export default class RecordMapScene extends Scene{ export default class RecordMapScene extends Scene{
protected get skinKey(){return 'RecordMap'} protected get skinKey(){return 'RecordMap'}
...@@ -53,7 +54,8 @@ export default class RecordMapScene extends Scene{ ...@@ -53,7 +54,8 @@ export default class RecordMapScene extends Scene{
const arr = ["HZ","AM","XG","TB","RB","HG","CX","MG"]; const arr = ["HZ","AM","XG","TB","RB","HG","CX","MG"];
yzwNet.shareFootprint((s)=>{ yzwNet.shareFootprint((s)=>{
if(!s){ if(!s){
ToastCtrl.instance.show("网络异常请重新分享~") ToastCtrl.instance.show(DataManager.ins.getData("shareFootprint").message)
// ToastCtrl.instance.show("网络异常请重新分享~")
return return
} }
// ToastCtrl.instance.show() // ToastCtrl.instance.show()
......
...@@ -39,7 +39,8 @@ export default class RecordScene extends Scene{ ...@@ -39,7 +39,8 @@ export default class RecordScene extends Scene{
showMap(num){ showMap(num){
yzwNet.shareFootprintList((s)=>{ yzwNet.shareFootprintList((s)=>{
if(!s){ if(!s){
ToastCtrl.instance.show("网路异常请重试~"); ToastCtrl.instance.show(DataManager.ins.getData("shareFootprintList").message)
// ToastCtrl.instance.show("网路异常请重试~");
return return
} }
let data = DataManager.ins.getData("shareFootprintList").data; let data = DataManager.ins.getData("shareFootprintList").data;
......
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