This commit is contained in:
guoqing.zhu 2022-05-30 13:34:16 +08:00
parent 4bbe3cbff2
commit 33c85b5fa1
2 changed files with 19 additions and 3 deletions

View File

@ -174,7 +174,6 @@ cc.Class({
onLoad() { onLoad() {
cc.audioEngine.stopAll(); cc.audioEngine.stopAll();
console.log("打开uimain")
}, },
start() { start() {
//test //test
@ -259,11 +258,15 @@ cc.Class({
cc.Notifier.off("getreward", this); cc.Notifier.off("getreward", this);
cc.Notifier.on("hasConnectWallet", this); cc.Notifier.on("hasConnectWallet", this);
}, },
refreshBaseInfo() { refreshBaseInfo() {
NetManage.getUserMainInfo((res)=>{
this.lb_gold.string = res.info.gold;
});
var pdata = cc.playerData; var pdata = cc.playerData;
this.lb_name.string = pdata.name; this.lb_name.string = pdata.name;
this.lb_lv.string = "LV." + pdata.level; this.lb_lv.string = "LV." + pdata.level;
this.lb_gold.string = pdata.gold; // this.lb_gold.string = pdata.gold;
this.lb_diamond.string = pdata.diamond; this.lb_diamond.string = pdata.diamond;
this.pr_progress.progress = pdata.exp / pdata.max_exp; this.pr_progress.progress = pdata.exp / pdata.max_exp;

View File

@ -442,6 +442,19 @@ module.exports = {
this.getResponce(cb, this.urlbd); this.getResponce(cb, this.urlbd);
}, },
getUserMainInfo(cb) {
this.urlbd.clear();
this.urlbd
.addKV('c', 'User')
.addKV('a', 'Info')
.addKV('account_id', this.account_id)
.addKV('session_id', this.session_id)
.addKV('target_id', this.account_id);
this.getResponce(cb, this.urlbd);
},
missionList(type, cb) { missionList(type, cb) {
this.urlbd.clear(); this.urlbd.clear();
this.urlbd this.urlbd