System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2", "__unresolved_3"], function (_export, _context) { "use strict"; var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, Component, director, EditBox, Label, Toggle, WithdrawalModal, dwebAjax, WithdrawalData, _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _crd, ccclass, property, WithdrawalBtn; function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); } function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; } function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); } function _reportPossibleCrUseOfWithdrawalModal(extras) { _reporterNs.report("WithdrawalModal", "./WithdrawalModal", _context.meta, extras); } function _reportPossibleCrUseOfdwebAjax(extras) { _reporterNs.report("dwebAjax", "../ajax", _context.meta, extras); } function _reportPossibleCrUseOfWithdrawalData(extras) { _reporterNs.report("WithdrawalData", "./WithdrawalData", _context.meta, extras); } return { setters: [function (_unresolved_) { _reporterNs = _unresolved_; }, function (_cc) { _cclegacy = _cc.cclegacy; __checkObsolete__ = _cc.__checkObsolete__; __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__; _decorator = _cc._decorator; Component = _cc.Component; director = _cc.director; EditBox = _cc.EditBox; Label = _cc.Label; Toggle = _cc.Toggle; }, function (_unresolved_2) { WithdrawalModal = _unresolved_2.WithdrawalModal; }, function (_unresolved_3) { dwebAjax = _unresolved_3.default; }, function (_unresolved_4) { WithdrawalData = _unresolved_4.WithdrawalData; }], execute: function () { _crd = true; _cclegacy._RF.push({}, "a068aX7dtJAv74XQag5FB9n", "WithdrawalBtn", undefined); __checkObsolete__(['_decorator', 'Component', 'Node', 'director', 'EditBox', 'Label', 'Toggle']); ({ ccclass, property } = _decorator); _export("WithdrawalBtn", WithdrawalBtn = (_dec = ccclass("WithdrawalBtn"), _dec2 = property(_crd && WithdrawalModal === void 0 ? (_reportPossibleCrUseOfWithdrawalModal({ error: Error() }), WithdrawalModal) : WithdrawalModal), _dec3 = property(_crd && WithdrawalData === void 0 ? (_reportPossibleCrUseOfWithdrawalData({ error: Error() }), WithdrawalData) : WithdrawalData), _dec4 = property(EditBox), _dec5 = property(EditBox), _dec6 = property(Label), _dec7 = property(Toggle), _dec8 = property(Toggle), _dec(_class = (_class2 = class WithdrawalBtn extends Component { constructor(...args) { super(...args); _initializerDefineProperty(this, "withdrawalModal", _descriptor, this); _initializerDefineProperty(this, "WithdrawalData", _descriptor2, this); _initializerDefineProperty(this, "WithdrawalNum", _descriptor3, this); _initializerDefineProperty(this, "Toaddress", _descriptor4, this); _initializerDefineProperty(this, "Name", _descriptor5, this); _initializerDefineProperty(this, "ETH", _descriptor6, this); _initializerDefineProperty(this, "USDT", _descriptor7, this); } start() {} choseCoin() { let data = {}; this.withdrawalModal.node.active = false; (_crd && dwebAjax === void 0 ? (_reportPossibleCrUseOfdwebAjax({ error: Error() }), dwebAjax) : dwebAjax).sendAjax("/api/v1/recharge/get", data, "GET", res => { console.log(res); if (res.code == "200") { this.WithdrawalData.init(res.data[0]); this.WithdrawalData.node.active = true; this.withdrawalModal.node.active = false; } else if (res.code == "10001") { console.log("登录失效"); director.loadScene("login"); } else { console.log(res); return; } }); } //选择钻石 choseDds() { let data = {}; this.withdrawalModal.node.active = false; (_crd && dwebAjax === void 0 ? (_reportPossibleCrUseOfdwebAjax({ error: Error() }), dwebAjax) : dwebAjax).sendAjax("/api/v1/recharge/get", data, "GET", res => { console.log(res); if (res.code == "200") { this.WithdrawalData.init(res.data[1]); this.WithdrawalData.node.active = true; this.withdrawalModal.node.active = false; } else if (res.code == "10001") { console.log("登录失效"); director.loadScene("login"); } else { console.log(res); return; } }); } //提现按钮 async takecoin() { let BcType = "eth"; if (this.USDT.isChecked == true) { BcType = "usdt"; } let toaddress = this.Toaddress.string; let withdrawalNum = Number(this.WithdrawalNum.string); let name = this.Name.string; console.log(name); let data = { name: name, number: withdrawalNum, to_address: toaddress, type: BcType }; console.log(data); const res = await (_crd && dwebAjax === void 0 ? (_reportPossibleCrUseOfdwebAjax({ error: Error() }), dwebAjax) : dwebAjax).sendAjax("/api/v1/withdrawal", data, "POST", res => { console.log(res); if (res.code == "200") { console.log(res); } else { console.log(res); return; } }); } test() {} openWithdrawalModal() { this.withdrawalModal.node.active = true; } update(deltaTime) {} }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "withdrawalModal", [_dec2], { configurable: true, enumerable: true, writable: true, initializer: function () { return null; } }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "WithdrawalData", [_dec3], { configurable: true, enumerable: true, writable: true, initializer: function () { return null; } }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "WithdrawalNum", [_dec4], { configurable: true, enumerable: true, writable: true, initializer: function () { return null; } }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "Toaddress", [_dec5], { configurable: true, enumerable: true, writable: true, initializer: function () { return null; } }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "Name", [_dec6], { configurable: true, enumerable: true, writable: true, initializer: function () { return null; } }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "ETH", [_dec7], { configurable: true, enumerable: true, writable: true, initializer: function () { return null; } }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "USDT", [_dec8], { configurable: true, enumerable: true, writable: true, initializer: function () { return null; } })), _class2)) || _class)); _cclegacy._RF.pop(); _crd = false; } }; }); //# sourceMappingURL=7f1ff487c00f7512d5b30f91901e1d6b59999c80.js.map