From bc1d37b98a374404d30c27d50d08cc84fa44efd8 Mon Sep 17 00:00:00 2001 From: zhuguoqing Date: Wed, 25 May 2022 21:16:26 +0800 Subject: [PATCH] update --- assets/scripts/BaseNet.js | 2 +- assets/scripts/UI/battlematch/UITeamMatch.js | 2 + assets/scripts/UI/iconset.js | 54 +++++---- assets/scripts/UILogin.js | 6 +- assets/scripts/ts/httpTest.ts | 111 +++++++++---------- 5 files changed, 85 insertions(+), 90 deletions(-) diff --git a/assets/scripts/BaseNet.js b/assets/scripts/BaseNet.js index 288d0533..6479e923 100644 --- a/assets/scripts/BaseNet.js +++ b/assets/scripts/BaseNet.js @@ -22,7 +22,7 @@ export var allBaseNet = { japan: '-z2-test.cebg.games', singapore: '-z3-test.cebg.games', turkey: '-z4-test.cebg.games', - test: '-test.kingsome.cn', + // test: '-test.kingsome.cn', }; const netIdHash = (function () { diff --git a/assets/scripts/UI/battlematch/UITeamMatch.js b/assets/scripts/UI/battlematch/UITeamMatch.js index d3ba6f46..2d77827f 100644 --- a/assets/scripts/UI/battlematch/UITeamMatch.js +++ b/assets/scripts/UI/battlematch/UITeamMatch.js @@ -131,6 +131,8 @@ cc.Class({ } }, refreshwait(data) { + console.log(`队伍信息---${data}`); + for (var i = 0; i < 4; i++) { var name = ''; var headid = ''; diff --git a/assets/scripts/UI/iconset.js b/assets/scripts/UI/iconset.js index d4e82309..feeb8a79 100644 --- a/assets/scripts/UI/iconset.js +++ b/assets/scripts/UI/iconset.js @@ -1,34 +1,32 @@ -var Utils = require("Utils") +var Utils = require('Utils'); cc.Class({ - extends: cc.Component, + extends: cc.Component, - properties: { - lb_name: { - default: null, - type: cc.Label - }, - sp_icon: { - default: null, - type: cc.Sprite - }, - sp_frame: { - default: null, - type: cc.Sprite - }, - }, + properties: { + lb_name: { + default: null, + type: cc.Label, + }, + sp_icon: { + default: null, + type: cc.Sprite, + }, + sp_frame: { + default: null, + type: cc.Sprite, + }, + }, - // LIFE-CYCLE CALLBACKS: + // LIFE-CYCLE CALLBACKS: - // onLoad () {}, + // onLoad () {}, - start() { + start() {}, + initdata(obj) { + this.lb_name.string = obj.name; + Utils.setitem(this, obj.headid, this.sp_icon); + Utils.setitem(this, obj.head_frame, this.sp_frame); + }, - }, - initdata(obj) { - this.lb_name.string = obj.name - Utils.setitem(this, obj.headid, this.sp_icon) - Utils.setitem(this, obj.head_frame, this.sp_frame) - } - - // update (dt) {}, -}); \ No newline at end of file + // update (dt) {}, +}); diff --git a/assets/scripts/UILogin.js b/assets/scripts/UILogin.js index df43ff09..11509cfc 100644 --- a/assets/scripts/UILogin.js +++ b/assets/scripts/UILogin.js @@ -266,9 +266,9 @@ cc.Class({ this.allCountry[data]; } - if (cc.sys.isBrowser) { - localStorage.setItem('currentNet', allBaseNet.test); - } + // if (cc.sys.isBrowser) { + // localStorage.setItem('currentNet', allBaseNet.test); + // } getSwitch(() => { if (!Config.isTest) { diff --git a/assets/scripts/ts/httpTest.ts b/assets/scripts/ts/httpTest.ts index 0abbd7c3..b3f34a05 100644 --- a/assets/scripts/ts/httpTest.ts +++ b/assets/scripts/ts/httpTest.ts @@ -7,68 +7,63 @@ // Learn life-cycle callbacks: // - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html // - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/life-cycle-callbacks.html -var SDKManage = require("SDKManage") -const {ccclass, property} = cc._decorator; +var SDKManage = require('SDKManage'); +const { ccclass, property } = cc._decorator; @ccclass export default class httpTest extends cc.Component { + // LIFE-CYCLE CALLBACKS: - + // onLoad () {} - // LIFE-CYCLE CALLBACKS: + start() { + // this.node.getComponent(cc.Button).interactable = false; + // this.node.getComponent(cc.ScrollView).stopAutoScroll + //cc.Notifier.on('refreshcpa', this, this.refresh.bind(this)); + // cc.Notifier.on("testPhpFunc",this,this.testCallBack.bind(this)); + // let tmpData = + // { + // "name":"匹诺曹和白雪公主" + // } + // this.scheduleOnce(()=>{ + // SDKManage.sendMsgToPhpServer("TestPhp","testPhpFunc",tmpData,this.httpCallBack); + // },2); + // console.log("开始测试Http====02="); + // + //数字描述 1 = 普通树 3 = 路 4 = 浆果 5 = 平原到雪山过度带 6 = 过渡带中心 7 = 雪山到平原过度带 + // 8 = 苹果树 9 农作物 + //少量矿石,水果正常,农作物较多,小动物较多,树正常 草正常- + //7 7 7 7 7 3 7 7 7 7 7 7 7 7 3 7 7 7 7 7//雪山到平原过度带 + //6 6 6 6 6 3 3 3 6 6 6 6 6 6 3 3 3 6 6 6//平原雪山 过度带中心 + //5 5 5 5 5 5 5 3 5 5 5 5 5 5 5 5 3 5 5 5//平原到雪山过度带 + //3 0 0 1 1 1 0 3 0 0 3 3 3 3 0 11 3 8 1 0 + //3 3 3 8 8 1 0 3 9 0 3 8 0 3 3 3 3 8 1 0 + //4 4 3 1 1 1 0 3 3 3 3 8 0 3 0 0 4 4 4 4 + //4 4 3 0 0 0 0 3 4 4 1 8 1 0 9 1 1 0 0 4 + //4 3 3 3 3 3 3 3 0 0 1 0 0 3 3 3 3 3 3 3 + //4 3 8 1 1 1 0 0 3 3 3 3 3 3 1 0 0 3 0 0 + //1 3 8 0 0 1 0 0 3 0 8 0 0 3 0 0 1 3 0 0 + //0 3 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 + //0 3 0 9 9 9 9 9 9 9 9 0 0 3 0 9 9 0 0 + //0 3 0 0 0 0 0 0 0 9 8 0 0 3 0 0 0 0 0 0 + //1 3 3 3 3 3 3 3 3 9 8 0 0 3 1 0 0 3 0 0 + //1 1 1 4 3 0 8 8 8 9 8 3 3 3 3 3 3 3 3 3 + //1 1 1 4 3 1 1 1 0 3 3 3 0 0 0 4 4 4 4 4 + //1 1 1 4 3 0 0 0 0 0 0 3 0 0 0 4 4 4 4 4 - // onLoad () {} - - start () { - // this.node.getComponent(cc.ScrollView).stopAutoScroll - //cc.Notifier.on('refreshcpa', this, this.refresh.bind(this)); - // cc.Notifier.on("testPhpFunc",this,this.testCallBack.bind(this)); - // let tmpData = - // { - // "name":"匹诺曹和白雪公主" - // } - // this.scheduleOnce(()=>{ - // SDKManage.sendMsgToPhpServer("TestPhp","testPhpFunc",tmpData,this.httpCallBack); - // },2); - // console.log("开始测试Http====02="); - // - //数字描述 1 = 普通树 3 = 路 4 = 浆果 5 = 平原到雪山过度带 6 = 过渡带中心 7 = 雪山到平原过度带 - // 8 = 苹果树 9 农作物 - //少量矿石,水果正常,农作物较多,小动物较多,树正常 草正常- - //7 7 7 7 7 3 7 7 7 7 7 7 7 7 3 7 7 7 7 7//雪山到平原过度带 - //6 6 6 6 6 3 3 3 6 6 6 6 6 6 3 3 3 6 6 6//平原雪山 过度带中心 - //5 5 5 5 5 5 5 3 5 5 5 5 5 5 5 5 3 5 5 5//平原到雪山过度带 - //3 0 0 1 1 1 0 3 0 0 3 3 3 3 0 11 3 8 1 0 - //3 3 3 8 8 1 0 3 9 0 3 8 0 3 3 3 3 8 1 0 - //4 4 3 1 1 1 0 3 3 3 3 8 0 3 0 0 4 4 4 4 - //4 4 3 0 0 0 0 3 4 4 1 8 1 0 9 1 1 0 0 4 - //4 3 3 3 3 3 3 3 0 0 1 0 0 3 3 3 3 3 3 3 - //4 3 8 1 1 1 0 0 3 3 3 3 3 3 1 0 0 3 0 0 - //1 3 8 0 0 1 0 0 3 0 8 0 0 3 0 0 1 3 0 0 - //0 3 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 - //0 3 0 9 9 9 9 9 9 9 9 0 0 3 0 9 9 0 0 - //0 3 0 0 0 0 0 0 0 9 8 0 0 3 0 0 0 0 0 0 - //1 3 3 3 3 3 3 3 3 9 8 0 0 3 1 0 0 3 0 0 - //1 1 1 4 3 0 8 8 8 9 8 3 3 3 3 3 3 3 3 3 - //1 1 1 4 3 1 1 1 0 3 3 3 0 0 0 4 4 4 4 4 - //1 1 1 4 3 0 0 0 0 0 0 3 0 0 0 4 4 4 4 4 - - this.getComponent("tableView").initTableView(2, { - array: null, - target: this - }); - } - httpCallBack(_code,_msg,_data) - { - if(!_code) - { - console.log("HttpBack======",_data); - } - } - testCallBack(_data) - { - console.log("测试Http====",_data); - } - // update (dt) {} - // + this.getComponent('tableView').initTableView(2, { + array: null, + target: this, + }); + } + httpCallBack(_code, _msg, _data) { + if (!_code) { + console.log('HttpBack======', _data); + } + } + testCallBack(_data) { + console.log('测试Http====', _data); + } + // update (dt) {} + // }