System.register(["__unresolved_0", "cc", "__unresolved_1"], function (_export, _context) { "use strict"; var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, Component, Label, EditBox, Toggle, dwebAjax, _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _crd, ccclass, property, WithdrawalData; function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } 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 _reportPossibleCrUseOfdwebAjax(extras) { _reporterNs.report("dwebAjax", "../ajax", _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; Label = _cc.Label; EditBox = _cc.EditBox; Toggle = _cc.Toggle; }, function (_unresolved_2) { dwebAjax = _unresolved_2.default; }], execute: function () { _crd = true; _cclegacy._RF.push({}, "490a9P8JcRBPZFNabzsmAAR", "WithdrawalData", undefined); __checkObsolete__(['_decorator', 'Component', 'Node', 'Label', 'EditBox', 'Toggle']); ({ ccclass, property } = _decorator); // import { tanchuan } from "../TanChuang"; _export("WithdrawalData", WithdrawalData = (_dec = ccclass("WithdrawalData"), _dec2 = property(EditBox), _dec3 = property(EditBox), _dec4 = property(Label), _dec5 = property(Toggle), _dec6 = property(Toggle), _dec(_class = (_class2 = class WithdrawalData extends Component { constructor() { super(...arguments); _initializerDefineProperty(this, "WithdrawalNum", _descriptor, this); _initializerDefineProperty(this, "Toaddress", _descriptor2, this); _initializerDefineProperty(this, "Name", _descriptor3, this); _initializerDefineProperty(this, "ETH", _descriptor4, this); _initializerDefineProperty(this, "USDT", _descriptor5, this); } init(data) { this.node.getChildByName("name").getComponent(Label).string = data.name; this.node.getChildByName("usdtPrice").getComponent(Label).string = data.usdt_price; this.node.getChildByName("ethPrice").getComponent(Label).string = data.eth_price; } getEdit() { var name = this.node.getChildByName("name").getComponent(Label).string; var number = this.node.getChildByName("withdrawalNum").getComponent(EditBox).string; var to_address = this.node.getChildByName("toAddress").getComponent(EditBox).string; var data = { name: name, to_address: number }; return data; } start() { console.log(this.Toaddress.string); } test() { var _this = this; return _asyncToGenerator(function* () { var BcType = "eth"; console.log(_this.USDT.isChecked); console.log(_this.ETH.isChecked); if (_this.USDT.isChecked == true) { BcType = "usdt"; } console.log(BcType); var toaddress = _this.Toaddress.string; var withdrawalNum = _this.WithdrawalNum.string; var name = _this.Name.string; var data = { name: name, number: withdrawalNum, to_address: toaddress, type: BcType }; console.log(data); var res = yield (_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; } }); })(); } update(deltaTime) {} }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "WithdrawalNum", [_dec2], { configurable: true, enumerable: true, writable: true, initializer: function initializer() { return null; } }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Toaddress", [_dec3], { configurable: true, enumerable: true, writable: true, initializer: function initializer() { return null; } }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "Name", [_dec4], { configurable: true, enumerable: true, writable: true, initializer: function initializer() { return null; } }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "ETH", [_dec5], { configurable: true, enumerable: true, writable: true, initializer: function initializer() { return null; } }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "USDT", [_dec6], { configurable: true, enumerable: true, writable: true, initializer: function initializer() { return null; } })), _class2)) || _class)); _cclegacy._RF.pop(); _crd = false; } }; }); //# sourceMappingURL=e1be312aef761bacdb16c64f0a1f034e259abfa8.js.map