Commit acc60b4a authored by wangzhujun's avatar wangzhujun

1232

parent e151d425
...@@ -6,6 +6,7 @@ import { yzwNet } from "../NetConst"; ...@@ -6,6 +6,7 @@ import { yzwNet } from "../NetConst";
import ToastCtrl from "../ctrls/toastCtrl"; import ToastCtrl from "../ctrls/toastCtrl";
import { DataManager } from "../../libs/tw/manager/DataManager"; import { DataManager } from "../../libs/tw/manager/DataManager";
import SceneCtrl from "../ctrls/sceneCtrl"; import SceneCtrl from "../ctrls/sceneCtrl";
import Waiting from "../waiting/Waiting";
export default class StartScene extends Scene { export default class StartScene extends Scene {
...@@ -189,6 +190,7 @@ export default class StartScene extends Scene { ...@@ -189,6 +190,7 @@ export default class StartScene extends Scene {
PanelCtrl.instance.show(ModuleTypes.GUIDE_PANEL,data); PanelCtrl.instance.show(ModuleTypes.GUIDE_PANEL,data);
} }
GuideFive(){ GuideFive(){
Waiting.instance.show();
yzwNet.doStart((s)=>{ yzwNet.doStart((s)=>{
if(!s){ if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("doStart").message) ToastCtrl.instance.show(DataManager.ins.getData("doStart").message)
...@@ -197,6 +199,7 @@ export default class StartScene extends Scene { ...@@ -197,6 +199,7 @@ export default class StartScene extends Scene {
} }
yzwNet.unlockArea((ss)=>{ yzwNet.unlockArea((ss)=>{
Waiting.instance.hide();
if(!ss){ if(!ss){
ToastCtrl.instance.show(DataManager.ins.getData("unlockArea").message) ToastCtrl.instance.show(DataManager.ins.getData("unlockArea").message)
// ToastCtrl.instance.show("网络异常请重试~"); // ToastCtrl.instance.show("网络异常请重试~");
...@@ -217,7 +220,9 @@ export default class StartScene extends Scene { ...@@ -217,7 +220,9 @@ export default class StartScene extends Scene {
} }
onTap_rankBtn(){ onTap_rankBtn(){
Waiting.instance.show();
yzwNet.rankInfo((s)=>{ yzwNet.rankInfo((s)=>{
Waiting.instance.hide();
if(!s){ if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("rankInfo").message) ToastCtrl.instance.show(DataManager.ins.getData("rankInfo").message)
// ToastCtrl.instance.show("网络异常请重试~"); // ToastCtrl.instance.show("网络异常请重试~");
...@@ -235,6 +240,7 @@ export default class StartScene extends Scene { ...@@ -235,6 +240,7 @@ export default class StartScene extends Scene {
} }
unlockArea(){ unlockArea(){
if(this.level == 0){ if(this.level == 0){
Waiting.instance.show();
yzwNet.doStart((s)=>{ yzwNet.doStart((s)=>{
if(!s){ if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("doStart").message) ToastCtrl.instance.show(DataManager.ins.getData("doStart").message)
...@@ -242,6 +248,7 @@ export default class StartScene extends Scene { ...@@ -242,6 +248,7 @@ export default class StartScene extends Scene {
return; return;
} }
yzwNet.unlockArea((ss)=>{ yzwNet.unlockArea((ss)=>{
Waiting.instance.hide();
if(!ss){ if(!ss){
ToastCtrl.instance.show(DataManager.ins.getData("unlockArea").message) ToastCtrl.instance.show(DataManager.ins.getData("unlockArea").message)
// ToastCtrl.instance.show("网络异常请重试~"); // ToastCtrl.instance.show("网络异常请重试~");
...@@ -260,7 +267,9 @@ export default class StartScene extends Scene { ...@@ -260,7 +267,9 @@ export default class StartScene extends Scene {
},window['projectId']) },window['projectId'])
}else{ }else{
Waiting.instance.show();
yzwNet.unlockArea((s)=>{ yzwNet.unlockArea((s)=>{
Waiting.instance.hide();
if(!s){ if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("unlockArea").message) ToastCtrl.instance.show(DataManager.ins.getData("unlockArea").message)
// ToastCtrl.instance.show("网络异常请重试~"); // ToastCtrl.instance.show("网络异常请重试~");
...@@ -286,7 +295,9 @@ export default class StartScene extends Scene { ...@@ -286,7 +295,9 @@ export default class StartScene extends Scene {
SceneCtrl.instance.change(ModuleTypes.ShareStarterScene); SceneCtrl.instance.change(ModuleTypes.ShareStarterScene);
} }
onTap_PKBtn(){ onTap_PKBtn(){
Waiting.instance.show();
yzwNet.getPkBaseInfo((s)=>{ yzwNet.getPkBaseInfo((s)=>{
Waiting.instance.hide();
if(!s){ if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("getPkBaseInfo").message) ToastCtrl.instance.show(DataManager.ins.getData("getPkBaseInfo").message)
// ToastCtrl.instance.show("网络异常请重试~"); // ToastCtrl.instance.show("网络异常请重试~");
......
...@@ -6,6 +6,7 @@ import ToastCtrl from "../ctrls/toastCtrl"; ...@@ -6,6 +6,7 @@ import ToastCtrl from "../ctrls/toastCtrl";
import { DataManager } from "../../libs/tw/manager/DataManager"; import { DataManager } from "../../libs/tw/manager/DataManager";
import { NetManager } from "../../libs/tw/manager/NetManager"; import { NetManager } from "../../libs/tw/manager/NetManager";
import GameConst from "../GameConst"; import GameConst from "../GameConst";
import Waiting from "../waiting/Waiting";
export default class PKScene extends Scene{ export default class PKScene extends Scene{
protected get skinKey(){return 'PK'} protected get skinKey(){return 'PK'}
...@@ -164,7 +165,9 @@ export default class PKScene extends Scene{ ...@@ -164,7 +165,9 @@ export default class PKScene extends Scene{
this.onTap(this.ruleBtn,()=>{PanelCtrl.instance.show(ModuleTypes.PKRULE_PANEL)}); this.onTap(this.ruleBtn,()=>{PanelCtrl.instance.show(ModuleTypes.PKRULE_PANEL)});
} }
onTap_OpenBox(){ onTap_OpenBox(){
Waiting.instance.show();
yzwNet.getTreasureBox((s)=>{ yzwNet.getTreasureBox((s)=>{
Waiting.instance.hide();
if(!s){ if(!s){
ToastCtrl.instance.show("网络异常请重试~"); ToastCtrl.instance.show("网络异常请重试~");
return return
...@@ -189,7 +192,9 @@ export default class PKScene extends Scene{ ...@@ -189,7 +192,9 @@ export default class PKScene extends Scene{
} }
addTeam(){ addTeam(){
Waiting.instance.show();
yzwNet.genInvite((s)=>{ yzwNet.genInvite((s)=>{
Waiting.instance.hide();
if(!s){ if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("genInvite").message) ToastCtrl.instance.show(DataManager.ins.getData("genInvite").message)
// ToastCtrl.instance.show("网络异常请重试~") // ToastCtrl.instance.show("网络异常请重试~")
...@@ -201,7 +206,9 @@ export default class PKScene extends Scene{ ...@@ -201,7 +206,9 @@ export default class PKScene extends Scene{
// window['share'](); // window['share']();
} }
askTeam(){ askTeam(){
Waiting.instance.show();
yzwNet.genInvite((s)=>{ yzwNet.genInvite((s)=>{
Waiting.instance.hide();
if(!s){ if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("genInvite").message) ToastCtrl.instance.show(DataManager.ins.getData("genInvite").message)
// ToastCtrl.instance.show("网络异常请重试~") // ToastCtrl.instance.show("网络异常请重试~")
...@@ -213,7 +220,9 @@ export default class PKScene extends Scene{ ...@@ -213,7 +220,9 @@ export default class PKScene extends Scene{
// window['share'](); // window['share']();
} }
askOnline(){ askOnline(){
Waiting.instance.show();
yzwNet.genInvite((s)=>{ yzwNet.genInvite((s)=>{
Waiting.instance.hide();
if(!s){ if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("genInvite").message) ToastCtrl.instance.show(DataManager.ins.getData("genInvite").message)
// ToastCtrl.instance.show("网络异常请重试~") // ToastCtrl.instance.show("网络异常请重试~")
......
...@@ -5,6 +5,7 @@ import ToastCtrl from "../ctrls/toastCtrl"; ...@@ -5,6 +5,7 @@ import ToastCtrl from "../ctrls/toastCtrl";
import SceneCtrl from "../ctrls/sceneCtrl"; import SceneCtrl from "../ctrls/sceneCtrl";
import { ModuleTypes } from "../types/sceneTypes"; import { ModuleTypes } from "../types/sceneTypes";
import { NetManager } from "../../libs/tw/manager/NetManager"; import { NetManager } from "../../libs/tw/manager/NetManager";
import Waiting from "../waiting/Waiting";
export default class PKScorePanel extends Panel{ export default class PKScorePanel extends Panel{
protected get skinKey(){return 'PKScore'} protected get skinKey(){return 'PKScore'}
...@@ -104,7 +105,9 @@ export default class PKScorePanel extends Panel{ ...@@ -104,7 +105,9 @@ export default class PKScorePanel extends Panel{
} }
onTap_PKBtn(){ onTap_PKBtn(){
Waiting.instance.show();
yzwNet.getPkBaseInfo((s)=>{ yzwNet.getPkBaseInfo((s)=>{
Waiting.instance.hide();
if(!s){ if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("getPkBaseInfo").message) ToastCtrl.instance.show(DataManager.ins.getData("getPkBaseInfo").message)
// ToastCtrl.instance.show("网络异常请重试~"); // ToastCtrl.instance.show("网络异常请重试~");
......
...@@ -44,7 +44,9 @@ export default class PlacePanel extends Panel{ ...@@ -44,7 +44,9 @@ export default class PlacePanel extends Panel{
} }
backStart(){ backStart(){
Waiting.instance.show();
yzwNet.homeBaseInfo((s)=>{ yzwNet.homeBaseInfo((s)=>{
Waiting.instance.hide();
if(!s){ if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("homeBaseInfo").message) ToastCtrl.instance.show(DataManager.ins.getData("homeBaseInfo").message)
// ToastCtrl.instance.show("网络异常请重试~"); // ToastCtrl.instance.show("网络异常请重试~");
......
...@@ -2,6 +2,7 @@ import Scene from "../views/Scene"; ...@@ -2,6 +2,7 @@ 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"; import { DataManager } from "../../libs/tw/manager/DataManager";
import Waiting from "../waiting/Waiting";
export default class RecordMapScene extends Scene{ export default class RecordMapScene extends Scene{
protected get skinKey(){return 'RecordMap'} protected get skinKey(){return 'RecordMap'}
...@@ -56,8 +57,10 @@ export default class RecordMapScene extends Scene{ ...@@ -56,8 +57,10 @@ export default class RecordMapScene extends Scene{
} }
sharePic(){ sharePic(){
Waiting.instance.show();
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)=>{
Waiting.instance.hide();
if(!s){ if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("shareFootprint").message) ToastCtrl.instance.show(DataManager.ins.getData("shareFootprint").message)
// ToastCtrl.instance.show("网络异常请重新分享~") // ToastCtrl.instance.show("网络异常请重新分享~")
......
...@@ -4,6 +4,7 @@ import { ModuleTypes } from "../types/sceneTypes"; ...@@ -4,6 +4,7 @@ import { ModuleTypes } from "../types/sceneTypes";
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"; import { DataManager } from "../../libs/tw/manager/DataManager";
import Waiting from "../waiting/Waiting";
export default class RecordScene extends Scene{ export default class RecordScene extends Scene{
...@@ -46,7 +47,9 @@ export default class RecordScene extends Scene{ ...@@ -46,7 +47,9 @@ export default class RecordScene extends Scene{
} }
showMap(num){ showMap(num){
Waiting.instance.show();
yzwNet.shareFootprintList((s)=>{ yzwNet.shareFootprintList((s)=>{
Waiting.instance.hide();
if(!s){ if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("shareFootprintList").message) ToastCtrl.instance.show(DataManager.ins.getData("shareFootprintList").message)
// ToastCtrl.instance.show("网路异常请重试~"); // ToastCtrl.instance.show("网路异常请重试~");
......
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