Commit acc60b4a authored by wangzhujun's avatar wangzhujun

1232

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