|
@@ -2,7 +2,7 @@
|
|
|
* @Author: mojunshou 1637302775@qq.com
|
|
* @Author: mojunshou 1637302775@qq.com
|
|
|
* @Date: 2025-03-20 17:53:50
|
|
* @Date: 2025-03-20 17:53:50
|
|
|
* @LastEditors: mojunshou 1637302775@qq.com
|
|
* @LastEditors: mojunshou 1637302775@qq.com
|
|
|
- * @LastEditTime: 2025-04-28 11:29:05
|
|
|
|
|
|
|
+ * @LastEditTime: 2025-04-28 14:50:50
|
|
|
* @Description: 红包提现
|
|
* @Description: 红包提现
|
|
|
*/
|
|
*/
|
|
|
import { _decorator, Label, Node } from "cc";
|
|
import { _decorator, Label, Node } from "cc";
|
|
@@ -40,7 +40,9 @@ export class RedPackeWithdrawalViewComp extends CCVMParentComp {
|
|
|
|
|
|
|
|
data: any = {
|
|
data: any = {
|
|
|
tasklist: [],
|
|
tasklist: [],
|
|
|
- goldNum: 0
|
|
|
|
|
|
|
+ goldNum: 0,
|
|
|
|
|
+ wxCash: 0,
|
|
|
|
|
+ hbCoin: 0
|
|
|
};
|
|
};
|
|
|
start() {
|
|
start() {
|
|
|
this.setButton();
|
|
this.setButton();
|
|
@@ -49,14 +51,13 @@ export class RedPackeWithdrawalViewComp extends CCVMParentComp {
|
|
|
this.data.taskList = smc.game.GameModel.taskList;
|
|
this.data.taskList = smc.game.GameModel.taskList;
|
|
|
let wxCash = smc.game.GameModel.wxCash;
|
|
let wxCash = smc.game.GameModel.wxCash;
|
|
|
let hbCoin = Format.formatRedPacketCoin(smc.account.AccountModel.hbCoin);
|
|
let hbCoin = Format.formatRedPacketCoin(smc.account.AccountModel.hbCoin);
|
|
|
- this.lab_wxCash.string = `${wxCash}`;
|
|
|
|
|
- this.lab_hbCoin.string = `${hbCoin}`;
|
|
|
|
|
|
|
+ this.data.wxCash = wxCash;
|
|
|
|
|
+ this.data.hbCoin = hbCoin;
|
|
|
this.data.goldNum = smc.account.AccountModel.goldCoin;
|
|
this.data.goldNum = smc.account.AccountModel.goldCoin;
|
|
|
if (this.data.taskList.length > 0) {
|
|
if (this.data.taskList.length > 0) {
|
|
|
this.recordList.numItems = this.data.taskList.length;
|
|
this.recordList.numItems = this.data.taskList.length;
|
|
|
}
|
|
}
|
|
|
- this.lab_tips.string = `当前收集金砖${this.data.goldNum}块,红包10000元=人民币1元`;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ // this.lab_tips.string = `当前收集金砖${this.data.goldNum}块,红包10000元=人民币1元`;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
addEvent() {
|
|
addEvent() {
|
|
@@ -76,14 +77,16 @@ export class RedPackeWithdrawalViewComp extends CCVMParentComp {
|
|
|
this.data.taskList = smc.game.GameModel.taskList;
|
|
this.data.taskList = smc.game.GameModel.taskList;
|
|
|
let wxCash = smc.game.GameModel.wxCash;
|
|
let wxCash = smc.game.GameModel.wxCash;
|
|
|
let hbCoin = Format.formatRedPacketCoin(smc.account.AccountModel.hbCoin);
|
|
let hbCoin = Format.formatRedPacketCoin(smc.account.AccountModel.hbCoin);
|
|
|
- this.lab_wxCash.string = `${wxCash}`;
|
|
|
|
|
- this.lab_hbCoin.string = `${hbCoin}`;
|
|
|
|
|
|
|
+ // this.lab_wxCash.string = `${wxCash}`;
|
|
|
|
|
+ // this.lab_hbCoin.string = `${hbCoin}`;
|
|
|
|
|
+ this.data.wxCash = wxCash;
|
|
|
|
|
+ this.data.hbCoin = hbCoin;
|
|
|
this.data.goldNum = smc.account.AccountModel.goldCoin;
|
|
this.data.goldNum = smc.account.AccountModel.goldCoin;
|
|
|
this.recordList.numItems = 0;
|
|
this.recordList.numItems = 0;
|
|
|
if (this.data.taskList.length > 0) {
|
|
if (this.data.taskList.length > 0) {
|
|
|
this.recordList.numItems = this.data.taskList.length;
|
|
this.recordList.numItems = this.data.taskList.length;
|
|
|
}
|
|
}
|
|
|
- this.lab_tips.string = `当前收集金砖${this.data.goldNum}块,红包10000元=人民币1元`;
|
|
|
|
|
|
|
+ // this.lab_tips.string = `当前收集金砖${this.data.goldNum}块,红包10000元=人民币1元`;
|
|
|
oops.gui.toast("领取成功");
|
|
oops.gui.toast("领取成功");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -93,17 +96,8 @@ export class RedPackeWithdrawalViewComp extends CCVMParentComp {
|
|
|
console.log("wxCash", wxCash);
|
|
console.log("wxCash", wxCash);
|
|
|
let hbCoin = Format.formatRedPacketCoin(smc.account.AccountModel.hbCoin);
|
|
let hbCoin = Format.formatRedPacketCoin(smc.account.AccountModel.hbCoin);
|
|
|
console.log("hbCoin", hbCoin);
|
|
console.log("hbCoin", hbCoin);
|
|
|
- if (this.lab_wxCash) {
|
|
|
|
|
- this.lab_wxCash.string = `${wxCash}`;
|
|
|
|
|
- } else {
|
|
|
|
|
- console.log("找不到这个节点>>>>>>>", this.lab_wxCash)
|
|
|
|
|
- }
|
|
|
|
|
- if (this.lab_hbCoin) {
|
|
|
|
|
- this.lab_hbCoin.string = `${hbCoin}`;
|
|
|
|
|
- } else {
|
|
|
|
|
- console.log("找不到这个节点", this.lab_hbCoin)
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ this.data.wxCash = wxCash;
|
|
|
|
|
+ this.data.hbCoin = hbCoin;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private btn_back() {
|
|
private btn_back() {
|
|
@@ -139,6 +133,12 @@ export class RedPackeWithdrawalViewComp extends CCVMParentComp {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ protected onDestroy(): void {
|
|
|
|
|
+ oops.message.off(GameEvent.updateRedPackeTaskList, this.updateList, this);
|
|
|
|
|
+ oops.message.off(GameEvent.updateHbAndWxCoin, this.updateCoin, this);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
btn_text() {
|
|
btn_text() {
|
|
|
const info = { "ssid": "0cee6baebcb1413180e266d733510e38", "props": { "1007": 60, "9001": 5, "1005": 1889260, "1004": 5137068, "8001": 550, "1006": 9, "2001": 11, "1008": 30 }, "changes": { "8001": 500, "1004": -5000000 }, "money": 5.13, "transferStatus": 1, "outTransferNo": "2504281114186442061262848" }
|
|
const info = { "ssid": "0cee6baebcb1413180e266d733510e38", "props": { "1007": 60, "9001": 5, "1005": 1889260, "1004": 5137068, "8001": 550, "1006": 9, "2001": 11, "1008": 30 }, "changes": { "8001": 500, "1004": -5000000 }, "money": 5.13, "transferStatus": 1, "outTransferNo": "2504281114186442061262848" }
|
|
|
ServerHandler.inst.onHbReward(JSON.stringify(info));
|
|
ServerHandler.inst.onHbReward(JSON.stringify(info));
|