Update UIMain.js

This commit is contained in:
guoqing.zhu 2022-05-30 14:37:31 +08:00
parent c7cb3ef205
commit ef80e5474e

View File

@ -265,10 +265,15 @@ cc.Class({
cc.Notifier.on('hasConnectWallet', this);
},
refreshBaseInfo() {
NetManage.getUserMainInfo((res)=>{
this.lb_gold.string = res.info.gold;
})
var pdata = cc.playerData;
this.lb_name.string = pdata.name;
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.pr_progress.progress = pdata.exp / pdata.max_exp;