From c0cd8e9b9e03ef83b4fa490f4a02ec86d81d660b Mon Sep 17 00:00:00 2001 From: "guoqing.zhu" <1521292690@qq.com> Date: Sat, 28 May 2022 13:56:50 +0800 Subject: [PATCH] Update httpTest.ts --- assets/scripts/ts/httpTest.ts | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/assets/scripts/ts/httpTest.ts b/assets/scripts/ts/httpTest.ts index 93d5b250..6d00d30b 100644 --- a/assets/scripts/ts/httpTest.ts +++ b/assets/scripts/ts/httpTest.ts @@ -7,34 +7,28 @@ // 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 () {} - start () { + start() { this.getComponent("tableView").initTableView(2, { array: null, - target: this + target: this, }); } - httpCallBack(_code,_msg,_data) - { - if(!_code) - { - console.log("HttpBack======",_data); + httpCallBack(_code, _msg, _data) { + if (!_code) { + console.log("HttpBack======", _data); } } - testCallBack(_data) - { - console.log("测试Http====",_data); + testCallBack(_data) { + console.log("Http====", _data); } // update (dt) {} //