270 lines
11 KiB
JavaScript
270 lines
11 KiB
JavaScript
System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4"], function (_export, _context) {
|
|
"use strict";
|
|
|
|
var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, Component, director, EditBox, Label, Toggle, WithdrawalModal, dwebAjax, WithdrawalData, tanchuan, _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _crd, ccclass, property, WithdrawalBtn;
|
|
|
|
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 _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);
|
|
}
|
|
|
|
function _reportPossibleCrUseOftanchuan(extras) {
|
|
_reporterNs.report("tanchuan", "../TanChuang", _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;
|
|
}, function (_unresolved_5) {
|
|
tanchuan = _unresolved_5.tanchuan;
|
|
}],
|
|
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), _dec9 = property(_crd && tanchuan === void 0 ? (_reportPossibleCrUseOftanchuan({
|
|
error: Error()
|
|
}), tanchuan) : tanchuan), _dec(_class = (_class2 = class WithdrawalBtn extends Component {
|
|
constructor() {
|
|
super(...arguments);
|
|
|
|
_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);
|
|
|
|
_initializerDefineProperty(this, "tanchuan", _descriptor8, this);
|
|
}
|
|
|
|
start() {}
|
|
|
|
choseCoin() {
|
|
var 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() {
|
|
var 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;
|
|
}
|
|
});
|
|
} //提现按钮
|
|
|
|
|
|
takecoin() {
|
|
var _this = this;
|
|
|
|
return _asyncToGenerator(function* () {
|
|
var BcType = "eth";
|
|
|
|
if (_this.USDT.isChecked == true) {
|
|
BcType = "usdt";
|
|
}
|
|
|
|
var toaddress = _this.Toaddress.string;
|
|
var withdrawalNum = Number(_this.WithdrawalNum.string);
|
|
var name = _this.Name.string;
|
|
console.log(name);
|
|
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;
|
|
}
|
|
});
|
|
_this.WithdrawalData.node.active = false;
|
|
|
|
_this.tanchuan.init("提现审核中");
|
|
|
|
_this.tanchuan.node.active = true;
|
|
var _data = {};
|
|
_data["toaddress"] = toaddress;
|
|
var res1 = yield (_crd && dwebAjax === void 0 ? (_reportPossibleCrUseOfdwebAjax({
|
|
error: Error()
|
|
}), dwebAjax) : dwebAjax).sendAjax("/api/v1/select/hash", _data, "POST", res => {
|
|
console.log(res);
|
|
|
|
if (res.code == "200" && res.data) {
|
|
console.log(res);
|
|
|
|
_this.tanchuan.init("提现成功");
|
|
} 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 initializer() {
|
|
return null;
|
|
}
|
|
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "WithdrawalData", [_dec3], {
|
|
configurable: true,
|
|
enumerable: true,
|
|
writable: true,
|
|
initializer: function initializer() {
|
|
return null;
|
|
}
|
|
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "WithdrawalNum", [_dec4], {
|
|
configurable: true,
|
|
enumerable: true,
|
|
writable: true,
|
|
initializer: function initializer() {
|
|
return null;
|
|
}
|
|
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "Toaddress", [_dec5], {
|
|
configurable: true,
|
|
enumerable: true,
|
|
writable: true,
|
|
initializer: function initializer() {
|
|
return null;
|
|
}
|
|
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "Name", [_dec6], {
|
|
configurable: true,
|
|
enumerable: true,
|
|
writable: true,
|
|
initializer: function initializer() {
|
|
return null;
|
|
}
|
|
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "ETH", [_dec7], {
|
|
configurable: true,
|
|
enumerable: true,
|
|
writable: true,
|
|
initializer: function initializer() {
|
|
return null;
|
|
}
|
|
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "USDT", [_dec8], {
|
|
configurable: true,
|
|
enumerable: true,
|
|
writable: true,
|
|
initializer: function initializer() {
|
|
return null;
|
|
}
|
|
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "tanchuan", [_dec9], {
|
|
configurable: true,
|
|
enumerable: true,
|
|
writable: true,
|
|
initializer: function initializer() {
|
|
return null;
|
|
}
|
|
})), _class2)) || _class));
|
|
|
|
_cclegacy._RF.pop();
|
|
|
|
_crd = false;
|
|
}
|
|
};
|
|
});
|
|
//# sourceMappingURL=0c9e72f21da393b4e1461aeb7fa888ddad2fadbe.js.map
|