Commit 83776c66 authored by wildfirecode's avatar wildfirecode

Merge branch 'dev' of http://gitlab2.dui88.com/wanghongyuan/yyh into dev

parents 911b16ee 863ba395
......@@ -175,7 +175,12 @@ class Main extends MainBase {
// if (GameConst.getQueryString("InviteSource")) {
yzwNet.homeBaseInfo((s) => {
if (!s) {
ToastCtrl.instance.show(DataManager.ins.getData("homeBaseInfo").message)
if((DataManager.ins.getData("homeBaseInfo").message){
ToastCtrl.instance.show(DataManager.ins.getData("homeBaseInfo").message)
}else{
ToastCtrl.instance.show("网络异常请重试~");
}
// ToastCtrl.instance.show("网络异常请重试~");
return;
}
......@@ -228,7 +233,12 @@ class Main extends MainBase {
// } else {
yzwNet.homeBaseInfo((s) => {
if (!s) {
ToastCtrl.instance.show(DataManager.ins.getData("homeBaseInfo").message)
if(DataManager.ins.getData("homeBaseInfo") && DataManager.ins.getData("homeBaseInfo").message){
ToastCtrl.instance.show(DataManager.ins.getData("homeBaseInfo").message)
}else{
ToastCtrl.instance.show("网络异常请重试~");
}
// ToastCtrl.instance.show("网络异常请重试~");
return;
}
......
......@@ -74,7 +74,12 @@ export default class RankPanel extends Panel{
Waiting.instance.show();
yzwNet.homeBaseInfo((s)=>{
if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("homeBaseInfo").message)
if(DataManager.ins.getData("homeBaseInfo") && DataManager.ins.getData("homeBaseInfo").message){
ToastCtrl.instance.show(DataManager.ins.getData("homeBaseInfo").message)
}else{
ToastCtrl.instance.show("网络异常请重试~");
}
// ToastCtrl.instance.show("网络异常请重试~");
return;
}
......
......@@ -260,7 +260,12 @@ export default class StartScene extends Scene {
NetManager.ins.clickLog(this.chuandiExposure);
yzwNet.doStart((s)=>{
if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("doStart").message)
if(DataManager.ins.getData("doStart") && DataManager.ins.getData("doStart").message){
ToastCtrl.instance.show(DataManager.ins.getData("doStart").message)
}else{
ToastCtrl.instance.show("网络异常请重试~");
}
// ToastCtrl.instance.show("网络异常请重试~");
return;
}
......@@ -268,7 +273,12 @@ export default class StartScene extends Scene {
yzwNet.unlockArea((ss)=>{
Waiting.instance.hide();
if(!ss){
ToastCtrl.instance.show(DataManager.ins.getData("unlockArea").message)
if(DataManager.ins.getData("unlockArea").message && DataManager.ins.getData("unlockArea").message){
ToastCtrl.instance.show(DataManager.ins.getData("unlockArea").message)
}else{
ToastCtrl.instance.show("网络异常请重试~");
}
// ToastCtrl.instance.show("网络异常请重试~");
return
}
......@@ -291,7 +301,12 @@ export default class StartScene extends Scene {
yzwNet.rankInfo((s)=>{
Waiting.instance.hide();
if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("rankInfo").message)
if(DataManager.ins.getData("rankInfo") && DataManager.ins.getData("rankInfo").message){
ToastCtrl.instance.show(DataManager.ins.getData("rankInfo").message)
}else{
ToastCtrl.instance.show("网络异常请重试~");
}
// ToastCtrl.instance.show("网络异常请重试~");
return;
}
......@@ -311,14 +326,23 @@ export default class StartScene extends Scene {
NetManager.ins.clickLog(this.chuandiExposure);
yzwNet.doStart((s)=>{
if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("doStart").message)
if(DataManager.ins.getData("doStart") && DataManager.ins.getData("doStart").message){
ToastCtrl.instance.show(DataManager.ins.getData("doStart").message)
}else{
ToastCtrl.instance.show("网络异常请重试~");
}
// ToastCtrl.instance.show("网络异常请重试~");
return;
}
yzwNet.unlockArea((ss)=>{
Waiting.instance.hide();
if(!ss){
ToastCtrl.instance.show(DataManager.ins.getData("unlockArea").message)
if(DataManager.ins.getData("unlockArea") && DataManager.ins.getData("unlockArea").message){
ToastCtrl.instance.show(DataManager.ins.getData("unlockArea").message)
}else{
ToastCtrl.instance.show("网络异常请重试~");
}
// ToastCtrl.instance.show("网络异常请重试~");
return
}
......@@ -339,7 +363,12 @@ export default class StartScene extends Scene {
yzwNet.unlockArea((s)=>{
Waiting.instance.hide();
if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("unlockArea").message)
if(DataManager.ins.getData("unlockArea") && DataManager.ins.getData("unlockArea").message){
ToastCtrl.instance.show(DataManager.ins.getData("unlockArea").message)
}else{
ToastCtrl.instance.show("网络异常请重试~");
}
// ToastCtrl.instance.show("网络异常请重试~");
return
}
......
......@@ -210,7 +210,12 @@ export default class PKScene extends Scene{
yzwNet.genInvite((s)=>{
Waiting.instance.hide();
if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("genInvite").message)
if(DataManager.ins.getData("genInvite") && DataManager.ins.getData("genInvite").message){
ToastCtrl.instance.show(DataManager.ins.getData("genInvite").message)
}else{
ToastCtrl.instance.show("网络异常请重试~")
}
// ToastCtrl.instance.show("网络异常请重试~")
return
}
......@@ -224,7 +229,12 @@ export default class PKScene extends Scene{
yzwNet.genInvite((s)=>{
Waiting.instance.hide();
if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("genInvite").message)
if(DataManager.ins.getData("genInvite") && DataManager.ins.getData("genInvite").message){
ToastCtrl.instance.show(DataManager.ins.getData("genInvite").message)
}else{
ToastCtrl.instance.show("网络异常请重试~")
}
// ToastCtrl.instance.show("网络异常请重试~")
return
}
......
......@@ -114,7 +114,12 @@ export default class PKScorePanel extends Panel{
yzwNet.getPkBaseInfo((s)=>{
Waiting.instance.hide();
if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("getPkBaseInfo").message)
if(DataManager.ins.getData("getPkBaseInfo") && DataManager.ins.getData("getPkBaseInfo").message){
ToastCtrl.instance.show(DataManager.ins.getData("getPkBaseInfo").message)
}else{
ToastCtrl.instance.show("网络异常请重试~");
}
// ToastCtrl.instance.show("网络异常请重试~");
return
}
......
......@@ -48,7 +48,12 @@ export default class PlacePanel extends Panel{
yzwNet.homeBaseInfo((s)=>{
Waiting.instance.hide();
if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("homeBaseInfo").message)
if(DataManager.ins.getData("homeBaseInfo") && DataManager.ins.getData("homeBaseInfo").message){
ToastCtrl.instance.show(DataManager.ins.getData("homeBaseInfo").message)
}else{
ToastCtrl.instance.show("网络异常请重试~");
}
// ToastCtrl.instance.show("网络异常请重试~");
return;
}
......
......@@ -62,7 +62,12 @@ export default class RecordMapScene extends Scene{
yzwNet.shareFootprint((s)=>{
Waiting.instance.hide();
if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("shareFootprint").message)
if(DataManager.ins.getData("shareFootprint") && DataManager.ins.getData("shareFootprint").message){
ToastCtrl.instance.show(DataManager.ins.getData("shareFootprint").message)
}else{
ToastCtrl.instance.show("网络异常请重试~")
}
// ToastCtrl.instance.show("网络异常请重新分享~")
return
}
......
......@@ -51,7 +51,12 @@ export default class RecordScene extends Scene{
yzwNet.shareFootprintList((s)=>{
Waiting.instance.hide();
if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("shareFootprintList").message)
if(DataManager.ins.getData("shareFootprintList") && DataManager.ins.getData("shareFootprintList").message){
ToastCtrl.instance.show(DataManager.ins.getData("shareFootprintList").message)
}else{
ToastCtrl.instance.show("网路异常请重试~");
}
// ToastCtrl.instance.show("网路异常请重试~");
return
}
......
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