This commit is contained in:
zhuguoqing 2022-05-25 21:16:26 +08:00
parent a49cff7fa0
commit bc1d37b98a
5 changed files with 85 additions and 90 deletions

View File

@ -22,7 +22,7 @@ export var allBaseNet = {
japan: '-z2-test.cebg.games', japan: '-z2-test.cebg.games',
singapore: '-z3-test.cebg.games', singapore: '-z3-test.cebg.games',
turkey: '-z4-test.cebg.games', turkey: '-z4-test.cebg.games',
test: '-test.kingsome.cn', // test: '-test.kingsome.cn',
}; };
const netIdHash = (function () { const netIdHash = (function () {

View File

@ -131,6 +131,8 @@ cc.Class({
} }
}, },
refreshwait(data) { refreshwait(data) {
console.log(`队伍信息---${data}`);
for (var i = 0; i < 4; i++) { for (var i = 0; i < 4; i++) {
var name = ''; var name = '';
var headid = ''; var headid = '';

View File

@ -1,19 +1,19 @@
var Utils = require("Utils") var Utils = require('Utils');
cc.Class({ cc.Class({
extends: cc.Component, extends: cc.Component,
properties: { properties: {
lb_name: { lb_name: {
default: null, default: null,
type: cc.Label type: cc.Label,
}, },
sp_icon: { sp_icon: {
default: null, default: null,
type: cc.Sprite type: cc.Sprite,
}, },
sp_frame: { sp_frame: {
default: null, default: null,
type: cc.Sprite type: cc.Sprite,
}, },
}, },
@ -21,14 +21,12 @@ cc.Class({
// onLoad () {}, // onLoad () {},
start() { start() {},
},
initdata(obj) { initdata(obj) {
this.lb_name.string = obj.name this.lb_name.string = obj.name;
Utils.setitem(this, obj.headid, this.sp_icon) Utils.setitem(this, obj.headid, this.sp_icon);
Utils.setitem(this, obj.head_frame, this.sp_frame) Utils.setitem(this, obj.head_frame, this.sp_frame);
} },
// update (dt) {}, // update (dt) {},
}); });

View File

@ -266,9 +266,9 @@ cc.Class({
this.allCountry[data]; this.allCountry[data];
} }
if (cc.sys.isBrowser) { // if (cc.sys.isBrowser) {
localStorage.setItem('currentNet', allBaseNet.test); // localStorage.setItem('currentNet', allBaseNet.test);
} // }
getSwitch(() => { getSwitch(() => {
if (!Config.isTest) { if (!Config.isTest) {

View File

@ -7,19 +7,17 @@
// Learn life-cycle callbacks: // Learn life-cycle callbacks:
// - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html // - [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 // - [English] http://www.cocos2d-x.org/docs/creator/manual/en/scripting/life-cycle-callbacks.html
var SDKManage = require("SDKManage") var SDKManage = require('SDKManage');
const { ccclass, property } = cc._decorator; const { ccclass, property } = cc._decorator;
@ccclass @ccclass
export default class httpTest extends cc.Component { export default class httpTest extends cc.Component {
// LIFE-CYCLE CALLBACKS: // LIFE-CYCLE CALLBACKS:
// onLoad () {} // onLoad () {}
start() { start() {
// this.node.getComponent(cc.Button).interactable = false;
// this.node.getComponent(cc.ScrollView).stopAutoScroll // this.node.getComponent(cc.ScrollView).stopAutoScroll
//cc.Notifier.on('refreshcpa', this, this.refresh.bind(this)); //cc.Notifier.on('refreshcpa', this, this.refresh.bind(this));
// cc.Notifier.on("testPhpFunc",this,this.testCallBack.bind(this)); // cc.Notifier.on("testPhpFunc",this,this.testCallBack.bind(this));
@ -53,21 +51,18 @@ export default class httpTest extends cc.Component {
//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 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 //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, { this.getComponent('tableView').initTableView(2, {
array: null, array: null,
target: this target: this,
}); });
} }
httpCallBack(_code,_msg,_data) httpCallBack(_code, _msg, _data) {
{ if (!_code) {
if(!_code) console.log('HttpBack======', _data);
{
console.log("HttpBack======",_data);
} }
} }
testCallBack(_data) testCallBack(_data) {
{ console.log('测试Http====', _data);
console.log("测试Http====",_data);
} }
// update (dt) {} // update (dt) {}
// //