|
@@ -25,11 +25,11 @@ export default class Setting extends cc.Component {
|
|
|
lbl_version: cc.Label = null;
|
|
lbl_version: cc.Label = null;
|
|
|
@property({ type: cc.Label, displayName: "成就名称" })
|
|
@property({ type: cc.Label, displayName: "成就名称" })
|
|
|
lbl_achieve: cc.Label = null;
|
|
lbl_achieve: cc.Label = null;
|
|
|
- @property({type: cc.Label, displayName: '等级'})
|
|
|
|
|
|
|
+ @property({ type: cc.Label, displayName: '等级' })
|
|
|
lbl_lv: cc.Label = null;
|
|
lbl_lv: cc.Label = null;
|
|
|
- @property({type: cc.Label, displayName: '红包币'})
|
|
|
|
|
|
|
+ @property({ type: cc.Label, displayName: '红包币' })
|
|
|
lbl_redBagCoin: cc.Label = null;
|
|
lbl_redBagCoin: cc.Label = null;
|
|
|
- @property({type: cc.Label, displayName: '提现金额'})
|
|
|
|
|
|
|
+ @property({ type: cc.Label, displayName: '提现金额' })
|
|
|
lbl_value: cc.Label = null;
|
|
lbl_value: cc.Label = null;
|
|
|
|
|
|
|
|
node_rule: cc.Node = null;
|
|
node_rule: cc.Node = null;
|
|
@@ -39,15 +39,15 @@ export default class Setting extends cc.Component {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
start() {
|
|
start() {
|
|
|
- mk.ad.showNative(4);
|
|
|
|
|
|
|
+ mk.ad.showNative(4);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private async initData() {
|
|
private async initData() {
|
|
|
console.log("=== gData.wechatData.unionid", gData.wechatData.unionid);
|
|
console.log("=== gData.wechatData.unionid", gData.wechatData.unionid);
|
|
|
console.log("=== gData.wechatData.nickName", gData.wechatData.nickName);
|
|
console.log("=== gData.wechatData.nickName", gData.wechatData.nickName);
|
|
|
this.lbl_id.string = "ID:" + mk.string.getNewLimitStr(gData.wechatData.unionid, 10);// 14
|
|
this.lbl_id.string = "ID:" + mk.string.getNewLimitStr(gData.wechatData.unionid, 10);// 14
|
|
|
- //this.lbl_nickname.string = gData.wechatData.nickName;
|
|
|
|
|
- this.lbl_version.string = gData.appData.appVersion;
|
|
|
|
|
|
|
+ this.lbl_nickname.string = gData.wechatData.nickName;
|
|
|
|
|
+ // this.lbl_version.string = gData.appData.appVersion;
|
|
|
|
|
|
|
|
let music = "module/setting/texture/" + (mk.audio.getSwitchMusic() ? "on" : "off");
|
|
let music = "module/setting/texture/" + (mk.audio.getSwitchMusic() ? "on" : "off");
|
|
|
let effect = "module/setting/texture/" + (mk.audio.getSwitchEffect() ? "on" : "off");
|
|
let effect = "module/setting/texture/" + (mk.audio.getSwitchEffect() ? "on" : "off");
|
|
@@ -60,20 +60,18 @@ export default class Setting extends cc.Component {
|
|
|
console.log("=== loadHead:", result);
|
|
console.log("=== loadHead:", result);
|
|
|
|
|
|
|
|
// this.img_head.spriteFrame = result;
|
|
// this.img_head.spriteFrame = result;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.lbl_lv.string = 'Lv:' + gData.gameData.gameData.gradeLevel.toString();
|
|
this.lbl_lv.string = 'Lv:' + gData.gameData.gameData.gradeLevel.toString();
|
|
|
this.lbl_redBagCoin.string = gData.gameData.gameData.redMoney.toString();
|
|
this.lbl_redBagCoin.string = gData.gameData.gameData.redMoney.toString();
|
|
|
|
|
|
|
|
const cash_bar = gData.redBagCash.cash_bar;
|
|
const cash_bar = gData.redBagCash.cash_bar;
|
|
|
let cash_data = gData.redBagCash.getItemDataByIndex(cash_bar);
|
|
let cash_data = gData.redBagCash.getItemDataByIndex(cash_bar);
|
|
|
- if(cash_data)
|
|
|
|
|
- {
|
|
|
|
|
|
|
+ if (cash_data) {
|
|
|
this.lbl_value.string = (cash_data.money / 100).toString();
|
|
this.lbl_value.string = (cash_data.money / 100).toString();
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private clickInviteBtn()
|
|
|
|
|
- {
|
|
|
|
|
|
|
+ private clickInviteBtn() {
|
|
|
mk.audio.playEffect("button");
|
|
mk.audio.playEffect("button");
|
|
|
}
|
|
}
|
|
|
|
|
|