This commit is contained in:
vance 2022-10-12 16:56:40 +08:00
parent 1167499a22
commit 088a4722f7
2016 changed files with 199925 additions and 19085 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -0,0 +1,2 @@
[InternetShortcut]
URL=https://docs.cocos.com/creator/manual/en/scripting/setup.html#custom-script-template

BIN
assets/.DS_Store vendored

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -1,42 +0,0 @@
{
"ver": "1.0.24",
"importer": "image",
"imported": true,
"uuid": "54bf0de9-15ab-4ddf-b7aa-262315acccae",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "54bf0de9-15ab-4ddf-b7aa-262315acccae@6c48a",
"displayName": "bg",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "54bf0de9-15ab-4ddf-b7aa-262315acccae",
"visible": true
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "texture",
"fixAlphaTransparencyArtifacts": true,
"hasAlpha": false,
"redirect": "54bf0de9-15ab-4ddf-b7aa-262315acccae@6c48a"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -1,42 +0,0 @@
{
"ver": "1.0.24",
"importer": "image",
"imported": true,
"uuid": "8ea3a458-97a4-4c89-9e97-40b851025669",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "8ea3a458-97a4-4c89-9e97-40b851025669@6c48a",
"displayName": "bg1",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "8ea3a458-97a4-4c89-9e97-40b851025669",
"visible": true
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "texture",
"fixAlphaTransparencyArtifacts": true,
"hasAlpha": true,
"redirect": "8ea3a458-97a4-4c89-9e97-40b851025669@6c48a"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -1,42 +0,0 @@
{
"ver": "1.0.24",
"importer": "image",
"imported": true,
"uuid": "2ba18c9a-1ad3-4db7-aa9b-366868509721",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "2ba18c9a-1ad3-4db7-aa9b-366868509721@6c48a",
"displayName": "关闭2",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "2ba18c9a-1ad3-4db7-aa9b-366868509721",
"visible": true
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "texture",
"fixAlphaTransparencyArtifacts": true,
"hasAlpha": true,
"redirect": "2ba18c9a-1ad3-4db7-aa9b-366868509721@6c48a"
}
}

View File

@ -52,7 +52,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 96,
"y": 0,
"z": 0
},
"_lrot": {
@ -99,7 +99,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -198,
"x": -192,
"y": -10.15,
"z": 0
},
@ -143,8 +143,8 @@
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
"x": 0,
"y": 1
},
"_id": ""
},
@ -357,7 +357,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -60,
"x": -104,
"y": -10.15,
"z": 0
},
@ -486,7 +486,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 46,
"x": -16,
"y": -10.15,
"z": 0
},
@ -615,7 +615,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 154,
"x": 90,
"y": -10.15,
"z": 0
},
@ -735,8 +735,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 500,
"height": 400
"width": 488,
"height": 30
},
"_anchorPoint": {
"__type__": "cc.Vec2",

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.39",
"importer": "prefab",
"imported": true,
"uuid": "db4bd809-e4d8-40bc-92ad-49a2b7eeb33b",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "WItem"
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,36 +1,58 @@
import { _decorator, Component, Node ,Prefab,instantiate} from 'cc';
import { _decorator, Component, Prefab, instantiate, director } from "cc";
const { ccclass, property } = _decorator;
import {init} from './ItemTemplate'
import { ItemTemplate } from "./ItemTemplate";
import dwebAjax from "./ajax";
import { mask } from "./recharge/mask";
@ccclass('Item')
@ccclass("Item")
export class Item {
@property
public bctype = null;
@property
public num = null;
@property
public type = null;
@property
public price = null;
@property
public time = null;
@property
bctype = "";
@property
num = "";
@property
type = "";
@property
price = "";
@property
time = "";
}
@ccclass
export class ItemList extends Component {
@property([Item])
items: Item[] = [];
@property(Prefab)
itemPrefab: Prefab | null = null;
onLoad() {
for (let i = 0; i < this.items.length; ++i) {
const item = instantiate(this.itemPrefab);
const data = this.items[i];
this.node.addChild(item);
item.getComponent('ItemTemplate').init(data);
@property([Item])
items: Item[] = [];
@property(Prefab)
itemPrefab: Prefab | null = null;
@property(mask)
mask: mask | null = null;
async onLoad() {
let data = {};
dwebAjax.sendAjax("/api/v1/recharge", data, "POST", async (res) => {
if (res.code == "200" && res.data.items) {
for (let i = 0; i < this.items.length; i++) {
// this.mask.node.active = true;
const item = instantiate(this.itemPrefab);
const data = res.data.items[i];
console.log(data);
this.node.addChild(item);
item.getComponent("ItemTemplate").init(data);
}
}
} else if (res.code == "10001") {
console.log("登录失效");
director.loadScene("login");
} else if (!res.data.items) {
this.mask.node.active = true;
} else {
console.log(res);
return;
}
});
// for (let i = 0; i < this.items.length; ++i) {
// const item = instantiate(this.itemPrefab);
// const data = this.items[i];
// this.node.addChild(item);
// item.getComponent("ItemTemplate").init(data);
// }
}
}

View File

@ -1,32 +1,43 @@
import { _decorator, Component, Node, Label } from 'cc';
import { _decorator, Component, Node, Label } from "cc";
import { Item } from "./ItemList";
const { ccclass, property } = _decorator;
@ccclass('ItemTemplate')
@ccclass("ItemTemplate")
export class ItemTemplate extends Component {
@property(Label)
public bctype = null;
@property(Label)
public num = null;
@property(Label)
public type = null;
@property(Label)
public price = null;
@property(Label)
public time = null;
init(data){
this.bctype = data.bctype;
this.num = data.num;
this.type = data.type;
this.price = data.price;
this.time = data.time;
}
@property(Label)
public bctype: Label | null = null;
@property(Label)
public num: Label | null = null;
@property(Label)
public type: Label | null = null;
@property(Label)
public price: Label | null = null;
@property(Label)
public time: Label | null = null;
start() {
}
update(deltaTime: number) {
}
start() {}
init(data) {
this.bctype.string = "金币";
this.num.string = data.num;
this.type.string = data.name;
this.price.string = data.price;
this.time.string = this.formatDateTime(data.time);
}
formatDateTime(timeStamp) {
var date = new Date();
date.setTime(timeStamp * 1000);
var y = date.getFullYear();
var m = date.getMonth() + 1;
let _m = m < 10 ? "0" + m : m;
var d = date.getDate();
let _d = d < 10 ? "0" + d : d;
var h = date.getHours();
let _h = h < 10 ? "0" + h : h;
let minute = date.getMinutes();
var second = date.getSeconds();
let _minute = minute < 10 ? "0" + minute : minute;
let _second = second < 10 ? "0" + second : second;
return y + "-" + _m + "-" + _d + " " + _h + ":" + _minute + ":" + _second;
}
update(deltaTime: number) {}
}

View File

@ -1,99 +1,149 @@
import { _decorator, Component, Node,director, Prefab } from 'cc';
import {rachageModel} from './rachageModel'
import {rechargeNum} from './RechageNum'
import dwebAjax from './ajax'
import {
_decorator,
Component,
Node,
director,
Prefab,
NodeEventType,
} from "cc";
import { rachageModel } from "./rachageModel";
import { rechargeNum } from "./RechageNum";
import dwebAjax from "./ajax";
import TBG from "./tgb/tbg";
import Abi from "./abi/abi";
import { tanchuan } from "./TanChuang";
import { WithdrawalView } from "./Withdrawal/WithdrawalView";
import { WhView } from "./Withdrawal/WhView";
const { ccclass, property } = _decorator;
@ccclass('NewComponent')
const ETH_CONTRACT = "0x3865194cD048f7b14b465a96907fB6546B888216";
@ccclass("NewComponent")
// bctype = null;
export class NewComponent extends Component {
username = null;
@property(Prefab)
itemPrefab:Prefab|null=null;
@property(rachageModel)
model:rachageModel = null;
@property
bctype = null;
@property(rechargeNum)
rechargenum:rechargeNum = null;
start() {
username = null;
@property(Prefab)
itemPrefab: Prefab | null = null;
@property(rachageModel)
model: rachageModel = null;
@property
bctype = null;
@property(rechargeNum)
rechargenum: rechargeNum = null;
@property(tanchuan)
Tanchuan: tanchuan = null;
@property(WithdrawalView)
WithdrawalView: WithdrawalView = null;
@property(WhView)
WhView: WhView = null;
start() {
const tbg = new TBG({});
tbg.on("accountChange", () => {
console.log("用户切换");
director.loadScene("login");
});
//计时器
// this.schedule(function() {
// this.doSomething();
// }, 5);
}
//获取充值比例
async takeWhData() {
let data = {};
dwebAjax.sendAjax("/api/v1/withdrawal/get", data, "POST", async (res) => {
if (res.code == "200") {
console.log("提现记录为", res.data);
} else if (res.code == "10001") {
console.log("登录失效");
director.loadScene("login");
} else {
console.log(res);
return;
}
});
}
OpWhView() {
this.WhView.node.active = true;
}
onload() {}
async createNft() {
const tbg = new TBG({});
const account = await tbg.login();
const res2 = await tbg.createNft({
nftAbi: Abi,
contract: ETH_CONTRACT,
toAddress: account,
});
console.log(res2);
}
//充值
recharge() {
this.model.node.active = true;
}
rechargeNum() {
if ((this.rechargenum.node.active = true)) {
this.rechargenum.node.active = false;
} else {
this.rechargenum.node.active = true;
}
async takeRechargeData(){
}
setTanChuang() {
if ((this.Tanchuan.node.active = true)) {
this.Tanchuan.node.active = false;
} else {
this.Tanchuan.node.active = true;
}
//充值
recharge(){
this.model.node.active = true
}
rechargeNum(){
this.rechargenum.node.active = true
}
//登录
async login() {
let data = {}
let hash = null
await dwebAjax.sendAjax("/api/v1/sign",data,"GET",async (res)=>{
if(res.code == "200"){
console.log(res);
hash = res.data
data['hash'] = hash
data['sign'] = "0x66dc7542db4e6bc394cf73b77868be6c959ba5eeadeaf39e3688a47ad1a4ed341f1f97919503fe55ac80bad6bb331013c89ab2cb0f4ff2bd2b530e51497cedc61b"
await dwebAjax.sendAjax("/api/v1/login",data,"POST",(res)=>{
if(res.code == "200"){
director.loadScene('main');
let token = res.data.token
localStorage.setItem('token',token)
}else{
console.log(res);
return
}
})
}else{
console.log(res);
return
}
})
}
//获取充值记录
async getRechargeNew() {
let data = {};
this.WithdrawalView.node.active = true;
await dwebAjax.sendAjax("/api/v1/recharge", data, "POST", async (res) => {
if (res.code == "200") {
console.log("充值记录为", res.data);
} else if (res.code == "10001") {
console.log("登录失效");
director.loadScene("login");
} else {
console.log(res);
return;
}
});
}
//登录
async login() {
const tbg = new TBG({});
let data = {};
let hash = null;
await dwebAjax.sendAjax("/api/v1/get/sign", data, "GET", async (res) => {
if (res.code == "200") {
console.log(res);
hash = res.data;
data["hash"] = hash;
const account = await tbg.login();
const res2 = await tbg.sign(hash);
let SignData = TBG.sign;
console.log(res2);
// let data = await request.open("GET",'http://127.0.0.1:8080/api/v1/sign',true)
// request.setRequestHeader();
// request.send()
// console.log(data);
// request.onreadystatechange= async function(){
// // 判断
// if(request.readyState===4){
// if (request.readyState==4 &&request.status==200) {
// console.log(111);
// let data1 = JSON.parse(request.responseText)
// // await request.open("POST",'http://127.0.0.1:8080/api/v1/login',true)
// // let data = {}
// // data['hash'] = data1.data
// // data['sign'] = "0x66dc7542db4e6bc394cf73b77868be6c959ba5eeadeaf39e3688a47ad1a4ed341f1f97919503fe55ac80bad6bb331013c89ab2cb0f4ff2bd2b530e51497cedc61b"
// // console.log(data);
// // data = JSON.stringify(data)
// // request.send(data)
// // request.onreadystatechange= async function(){
// // if (request.readyState==4 &&request.status==200) {
// // console.log(request.responseText);
// // let token = JSON.parse(request.responseText)
// // if(token.code == 200){
// // console.log(token);
// // // request.setRequestHeader("Authorization",token.token);
// // token = JSON.stringify(token.data.token)
// // localStorage.setItem('user',token)
// // console.log(token);
// // director.loadScene('main');
// // }
// // }
// // }
//    console.log(JSON.parse(request.responseText));//输入相应的内容
// }
// }
// }
console.log(res2);
data["sign"] = res2.sign;
await dwebAjax.sendAjax("/api/v1/user/login", data, "POST", (res) => {
if (res.code == "200") {
director.loadScene("main");
let token = res.data.token;
let adder = res.data.adder;
localStorage.setItem("token", token);
localStorage.setItem("adder", adder);
} else {
console.log(res);
return;
}
});
} else {
console.log(res);
return;
}
});
}
}
update(deltaTime: number) {
}
update(deltaTime: number) {}
}

View File

@ -1,40 +1,75 @@
import { _decorator, Component, Node, EditBox,Label} from 'cc';
import { _decorator, Component, Node, EditBox, Label, loader, log } from "cc";
const { ccclass, property } = _decorator;
import {rachageModel} from './rachageModel'
import { tanchuan } from './TanChuang';
@ccclass('rechargeNum')
import { rachageModel } from "./rachageModel";
// import { tanchuan } from "./TanChuang";
import BigNumber from "bignumber.js";
import TBG from "./tgb";
const ETH_CONTRACT = "0x3865194cD048f7b14b465a96907fB6546B888216";
@ccclass("rechargeNum")
export class rechargeNum extends Component {
@property(Label)
public Name = null;
@property(Label)
public EthPrice = null;
@property(Label)
public UsdtPrice = null;
@property(rachageModel)
RachageModel:rachageModel = null;
@property(tanchuan)
tanchuan:tanchuan = null;
public_address=null;
private_address =null;
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
this.node.getChildByName('privateddress').getComponent(Label).string = data.private_address
}
rechagenum = null;
start() {
this.rechagenum = this.node.getChildByName('RechageNum')
}
text(){
this.tanchuan.init("已发起提现申请")
this.tanchuan.node.active = true
// let rechagenum = this.rechagenum.getComponent(EditBox).string
}
update(deltaTime: number) {
data = {};
@property(Label)
public Name = null;
@property(Label)
public EthPrice = null;
@property(Label)
public UsdtPrice = null;
@property(rachageModel)
RachageModel: rachageModel = null;
@property(EditBox)
RechageNum: EditBox | null = null;
@property(Label)
privateddress: Label | null = null;
@property(Label)
Eth: Label | null = null;
public_address = null;
private_address = null;
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;
this.node.getChildByName("privateddress").getComponent(Label).string =
data.private_address;
localStorage.setItem("address", data.private_address);
}
rechagenum = null;
start() {
// this.private_address = this.node.getChildByName("privateddress");
// this.rechagenum = this.node.getChildByName("RechageNum");
}
initData() {
let to_address = this.public_address.getComponent(Label).string;
let number = this.rechagenum.getComponent(EditBox).string;
let data = {
to_address: to_address,
number: number,
};
console.log(data);
}
return data;
}
// async text() {
// const tbg = new TBG({});
// const account = await tbg.login();
// const data = {};
// let address = localStorage.getItem("address");
// console.log(address);
// let num = new BigNumber(Number(this.RechageNum.string));
// let eth = new BigNumber(Number(this.Eth.string));
// log(eth, num);
// const ReNum = new BigNumber(10 ** 18).times(num);
// const number = ReNum.times(eth);
// console.log(number);
// const res = await tbg.sendTransaction({
// from: account,
// to: address,
// value: number,
// });
// console.log(res);
// }
update(deltaTime: number) {}
}

View File

@ -1,28 +1,29 @@
import { _decorator, Component, Node, Label } from 'cc';
import { _decorator, Component, Node, Label, log } from "cc";
const { ccclass, property } = _decorator;
import {WithdrawalData} from './Withdrawal/WithdrawalData'
import { WithdrawalData } from "./Withdrawal/WithdrawalData";
// import {rechargeNum} from './RechageNum'
import { NewComponent } from "./NewComponent";
@ccclass('tanchuan')
@ccclass("tanchuan")
export class tanchuan extends Component {
@property(WithdrawalData)
WithdrawalData:WithdrawalData = null;
// @property(rechargeNum)
// RechargeNum:rechargeNum = null;
init(news){
this.node.getChildByName('news').getComponent(Label).string = news
}
start() {
// if(this.WithdrawalData.node.active = true){
// this.WithdrawalData.node.active = false
// }
// if(this.RechargeNum.node.active = true){
// this.RechargeNum.node.active = false
// }
}
update(deltaTime: number) {
}
@property(WithdrawalData)
WithdrawalData: WithdrawalData = null;
@property(tanchuan)
tanchuan: tanchuan = null;
// @property(rechargeNum)
// RechargeNum:rechargeNum = null;
init(news) {
this.node.getChildByName("news").getComponent(Label).string = news;
}
show() {
this.node.active = true;
}
hide() {
this.node.active = false;
}
start() {}
close() {
this.hide();
}
update(deltaTime: number) {}
}

View File

@ -0,0 +1,14 @@
import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('WhView')
export class WhView extends Component {
start() {
}
update(deltaTime: number) {
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "e85e326f-ca7b-4450-b1a2-c34608323c3d",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,58 +1,123 @@
import { _decorator, Component, Node } from 'cc';
import {
_decorator,
Component,
Node,
director,
EditBox,
Label,
Toggle,
} from "cc";
const { ccclass, property } = _decorator;
import {WithdrawalModal} from './WithdrawalModal'
import dwebAjax from '../ajax'
import {WithdrawalData} from './WithdrawalData'
import { WithdrawalModal } from "./WithdrawalModal";
import dwebAjax from "../ajax";
import { WithdrawalData } from "./WithdrawalData";
import { tanchuan } from "../TanChuang";
@ccclass('WithdrawalBtn')
@ccclass("WithdrawalBtn")
export class WithdrawalBtn extends Component {
@property(WithdrawalModal)
withdrawalModal:WithdrawalModal = null
@property(WithdrawalData)
WithdrawalData:WithdrawalData = null
start() {
@property(WithdrawalModal)
withdrawalModal: WithdrawalModal = null;
@property(WithdrawalData)
WithdrawalData: WithdrawalData = null;
@property(EditBox)
WithdrawalNum: EditBox | null = null;
@property(EditBox)
Toaddress: EditBox | null = null;
@property(Label)
Name: Label | null = null;
@property(Toggle)
ETH: Toggle | null = null;
@property(Toggle)
USDT: Toggle | null = null;
@property(tanchuan)
tanchuan: tanchuan = null;
start() {}
choseCoin() {
let data = {};
this.withdrawalModal.node.active = false;
}
choseCoin(){
let data = {}
this.WithdrawalData.node.active= true;
this.withdrawalModal.node.active = false
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;
dwebAjax.sendAjax("/api/v1/recharge/get",data,"GET",(res)=>{
console.log(res);
if(res.code == "200"){
this.WithdrawalData.init(res.data[0])
this.withdrawalModal.node.active = false
}else{
console.log(res);
return
}
})
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";
}
//选择钻石
choseDds(){
let data = {}
this.WithdrawalData.node.active= true;
this.withdrawalModal.node.active = false
let toaddress = this.Toaddress.string;
let withdrawalNum = Number(this.WithdrawalNum.string);
let name = this.Name.string;
let adder = localStorage.getItem("adder");
console.log(name);
let data = {
name: name,
number: withdrawalNum,
to_address: toaddress,
type: BcType,
user_address: adder,
};
console.log(data);
const res = await dwebAjax.sendAjax(
"/api/v1/withdrawal",
data,
"POST",
(res) => {
console.log(res);
if (res.code == "200") {
console.log(res);
} else if (res.code == "30003") {
console.log(res);
this.WithdrawalData.node.active = false;
this.tanchuan.init("余额不足");
this.tanchuan.node.active = true;
return;
} else {
console.log(res);
return;
}
}
);
this.WithdrawalData.node.active = false;
this.tanchuan.init("提现审核中");
this.tanchuan.node.active = true;
}
test() {}
openWithdrawalModal() {
this.withdrawalModal.node.active = true;
}
dwebAjax.sendAjax("/api/v1/recharge/get",data,"GET",(res)=>{
console.log(res);
if(res.code == "200"){
this.WithdrawalData.init(res.data[1])
this.withdrawalModal.node.active = false
}else{
console.log(res);
return
}
})
}
openWithdrawalModal(){
this.withdrawalModal.node.active = true
}
update(deltaTime: number) {
}
update(deltaTime: number) {}
}

View File

@ -1,45 +1,80 @@
import { _decorator, Component, Node ,Label,EditBox} from 'cc';
import { _decorator, Component, Node, Label, EditBox, Toggle } from "cc";
const { ccclass, property } = _decorator;
import { tanchuan } from '../TanChuang';
// import { tanchuan } from "../TanChuang";
import dwebAjax from "../ajax";
import TBG from "../tgb";
@ccclass('WithdrawalData')
@ccclass("WithdrawalData")
export class WithdrawalData extends Component {
@property(tanchuan)
Tanchuan:tanchuan = null;
WithdrawalNum = null;
Toaddress = null;
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
// @property(tanchuan)
@property(EditBox)
WithdrawalNum: EditBox | null = null;
@property(EditBox)
Toaddress: EditBox | null = null;
@property(Label)
Name: Label | null = null;
@property(Toggle)
ETH: Toggle | null = null;
@property(Toggle)
USDT: Toggle | null = null;
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() {
let name = this.node.getChildByName("name").getComponent(Label).string;
let number = this.node
.getChildByName("withdrawalNum")
.getComponent(EditBox).string;
let to_address = this.node
.getChildByName("toAddress")
.getComponent(EditBox).string;
let data = {
name: name,
to_address: number,
};
return data;
}
start() {
const tbg = new TBG({});
tbg.on("accountChange", () => {
console.log("hasChange");
});
}
async test() {
let BcType = "eth";
if (this.USDT.isChecked == true) {
BcType = "usdt";
}
getEdit(){
this.WithdrawalNum = this.node.getChildByName('withdrawalnum').getComponent(EditBox).string;
this.Toaddress = this.node.getChildByName('toaddress').getComponent(EditBox).string;
let data = {
to_address : this.Toaddress,
number:this.WithdrawalNum
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 dwebAjax.sendAjax(
"/api/v1/withdrawal",
data,
"POST",
(res) => {
console.log(res);
if (res.code == "200") {
console.log(res);
} else {
console.log(res);
return;
}
return data
}
start() {
// let x11 = this.Toaddress.getComponent(EditBox).string
// let x22 = this.node.getChildByName('toaddress').getComponent(EditBox).string
// console.log(x11,x22);
}
test(){
let data = this.getEdit()
console.log(data);
// this.Tanchuan.init("已发起提现申请")
// this.Tanchuan.node.active = true
}
update(deltaTime: number) {
}
}
);
}
update(deltaTime: number) {}
}

View File

@ -1,14 +1,14 @@
import { _decorator, Component, Node } from 'cc';
import { _decorator, Component, Node } from "cc";
const { ccclass, property } = _decorator;
@ccclass('WithdrawalModal')
import TBG from "../tgb";
@ccclass("WithdrawalModal")
export class WithdrawalModal extends Component {
start() {
start() {
const tbg = new TBG({});
tbg.on("accountChange", () => {
console.log("hasChange");
});
}
}
update(deltaTime: number) {
}
update(deltaTime: number) {}
}

View File

@ -0,0 +1,14 @@
import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('WithdrawalView')
export class WithdrawalView extends Component {
start() {
}
update(deltaTime: number) {
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "6246a462-4f17-44eb-834f-d8a6f5d6adca",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -2,7 +2,7 @@
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "8f9a4f3f-f0b4-4336-a361-cb91332a4eae",
"uuid": "cfe538be-b1f9-4a53-b086-937acf54c112",
"files": [],
"subMetas": {},
"userData": {

View File

@ -0,0 +1,252 @@
export default [
{
inputs: [
{ internalType: "string", name: "tokenName", type: "string" },
{ internalType: "string", name: "tokenSymbol", type: "string" },
],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "owner",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "approved",
type: "address",
},
{
indexed: true,
internalType: "uint256",
name: "tokenId",
type: "uint256",
},
],
name: "Approval",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "owner",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "operator",
type: "address",
},
{
indexed: false,
internalType: "bool",
name: "approved",
type: "bool",
},
],
name: "ApprovalForAll",
type: "event",
},
{
inputs: [
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "tokenId", type: "uint256" },
],
name: "approve",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }],
name: "Burn",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "to", type: "address" }],
name: "Mint",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "previousOwner",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "newOwner",
type: "address",
},
],
name: "OwnershipTransferred",
type: "event",
},
{
inputs: [],
name: "renounceOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "tokenId", type: "uint256" },
],
name: "safeTransferFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "tokenId", type: "uint256" },
{ internalType: "bytes", name: "data", type: "bytes" },
],
name: "safeTransferFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "operator", type: "address" },
{ internalType: "bool", name: "approved", type: "bool" },
],
name: "setApprovalForAll",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "from",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "to",
type: "address",
},
{
indexed: true,
internalType: "uint256",
name: "tokenId",
type: "uint256",
},
],
name: "Transfer",
type: "event",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "tokenId", type: "uint256" },
],
name: "transferFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "owner", type: "address" }],
name: "balanceOf",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }],
name: "getApproved",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "owner", type: "address" },
{ internalType: "address", name: "operator", type: "address" },
],
name: "isApprovedForAll",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "name",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }],
name: "ownerOf",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }],
name: "supportsInterface",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "symbol",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }],
name: "tokenURI",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
];

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "b0940b1b-beca-4631-9195-a54b35badaeb",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,23 +1,20 @@
export default{
hosturl:"http://127.0.0.1:8080",
sendAjax(url:string,data:object,method:string,callback:Function){
let xhr = new XMLHttpRequest();
xhr.open(method,this.hosturl+url,true)
let token = localStorage.getItem('token')
if(token){
// console.log(token);
xhr.setRequestHeader("Authorization",token)
}
let params = JSON.stringify(data)
xhr.send(params)
xhr.onreadystatechange = () =>{
if (xhr.readyState==4 &&xhr.status==200) {
let res = JSON.parse(xhr.responseText)
callback(res)
}
}
export default {
// hosturl: "http://192.168.2.36:8080",
hosturl: "http://81.71.13.173:8080",
sendAjax(url: string, data: object, method: string, callback: Function) {
let xhr = new XMLHttpRequest();
xhr.open(method, this.hosturl + url, true);
let token = localStorage.getItem("token");
if (token) {
xhr.setRequestHeader("Authorization", token);
}
}
let params = JSON.stringify(data);
xhr.send(params);
xhr.onreadystatechange = () => {
if (xhr.readyState == 4 && xhr.status == 200) {
let res = JSON.parse(xhr.responseText);
callback(res);
}
};
},
};

View File

@ -1,76 +1,78 @@
import { _decorator, Component, Node ,director} from 'cc';
import {rachageModel} from './rachageModel'
import {rechargeNum} from './RechageNum'
import {Substitute} from './Substitute'
import {userdata} from './userdata'
import {WithdrawalModal} from './Withdrawal/WithdrawalModal'
import {WithdrawalData} from './Withdrawal/WithdrawalData'
import {tanchuan} from './TanChuang'
import { _decorator, Component, Node, director } from "cc";
import { rachageModel } from "./rachageModel";
import { rechargeNum } from "./RechageNum";
import { Substitute } from "./Substitute";
import { userdata } from "./userdata";
import { WithdrawalModal } from "./Withdrawal/WithdrawalModal";
import { WithdrawalData } from "./Withdrawal/WithdrawalData";
import { tanchuan } from "./TanChuang";
import { WithdrawalView } from "./Withdrawal/WithdrawalView";
import { WhView } from "./Withdrawal/WhView";
Substitute
Substitute;
const { ccclass, property } = _decorator;
import {main} from './main'
import { main } from "./main";
@ccclass('close')
@ccclass("close")
export class close extends Component {
@property(main)
main:main = null ;
@property(rachageModel)
rachagemodel:rachageModel = null;
@property(rechargeNum)
rechargenum:rechargeNum = null;
@property(Substitute)
substitute:Substitute = null;
@property(userdata)
userdata:userdata = null;
@property(WithdrawalModal)
WithdrawalModal:WithdrawalModal = null;
@property(WithdrawalData)
WithdrawalData:WithdrawalData = null;
@property(tanchuan)
tanchuan:tanchuan = null;
start() {
@property(main)
main: main = null;
@property(rachageModel)
rachagemodel: rachageModel = null;
@property(rechargeNum)
rechargenum: rechargeNum = null;
@property(Substitute)
substitute: Substitute = null;
@property(userdata)
userdata: userdata = null;
@property(WithdrawalModal)
WithdrawalModal: WithdrawalModal = null;
@property(WithdrawalData)
WithdrawalData: WithdrawalData = null;
@property(WithdrawalView)
WithdrawalView: WithdrawalView = null;
@property(tanchuan)
tanchuan: tanchuan = null;
@property(WhView)
WhView: WhView = null;
start() {}
closerechageModel() {
this.rachagemodel.node.active = false;
}
closeWhView() {
this.WhView.node.active = false;
}
closeMain() {
this.main.node.active = false;
}
closeWithdrawalView() {
this.WithdrawalView.node.active = false;
}
closeRechargenum() {
this.rechargenum.node.active = false;
}
closeSubstitute() {
this.substitute.node.active = false;
}
closeUserdata() {
this.userdata.node.active = false;
}
closeWithdrawalModal() {
this.WithdrawalModal.node.active = false;
}
closeWithdrawalData() {
this.WithdrawalData.node.active = false;
}
closetanchuan() {
this.tanchuan.node.active = false;
}
gettanchuan() {
this.tanchuan.node.active = true;
}
}
closerechageModel(){
this.rachagemodel.node.active = false
}
closeMain(){
this.main.node.active = false
}
closeRechargenum(){
this.rechargenum.node.active = false
}
closeSubstitute(){
this.substitute.node.active = false
}
closeUserdata(){
this.userdata.node.active = false
}
closeWithdrawalModal(){
this.WithdrawalModal.node.active = false
}
closeWithdrawalData(){
this.WithdrawalData.node.active = false
}
closetanchuan(){
this.tanchuan.node.active = false
}
update(deltaTime: number) {
}
getOut(){
director.loadScene('login');
}
update(deltaTime: number) {}
getOut() {
director.loadScene("login");
}
}

View File

@ -0,0 +1,54 @@
import { _decorator, Component, Node, Prefab, instantiate, director } from "cc";
const { ccclass, property } = _decorator;
import { ReItemTemplate } from "./ReItemTemplate";
import dwebAjax from "../ajax";
import { mask } from "../recharge/mask";
@ccclass("ReItem")
export class ReItem {
@property
name = "";
@property
number = "";
@property
status = "";
@property
type = "";
@property
time = "";
@property
toaddress = "";
}
@ccclass
export class ReItemList extends Component {
@property([ReItem])
items: ReItem[] = [];
@property(Prefab)
itemPrefab: Prefab | null = null;
@property(mask)
mask: mask | null = null;
async onLoad() {
let data = {};
dwebAjax.sendAjax("/api/v1/withdrawal/get", data, "POST", async (res) => {
if (res.code == "200" && res.data.items) {
for (let i = 0; i < this.items.length; i++) {
const item = instantiate(this.itemPrefab);
const data = res.data.items[i];
this.node.addChild(item);
item.getComponent("ReItemTemplate").init(data);
}
} else if (res.code == "10001") {
console.log("登录失效");
director.loadScene("login");
} else if (res.data.items) {
this.mask.node.active = true;
} else {
console.log(res);
return;
}
});
}
start() {}
update(deltaTime: number) {}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "6594de40-3a45-4f1f-bace-168894fb6b49",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,56 @@
import { _decorator, Component, Node, Label } from "cc";
import { ReItem } from "./ReItemList";
const { ccclass, property } = _decorator;
@ccclass("ReItemTemplate")
export class ReItemTemplate extends Component {
@property(Label)
public Name: Label | null = null;
@property(Label)
public num: Label | null = null;
@property(Label)
public status: Label | null = null;
@property(Label)
public toaddress: Label | null = null;
@property(Label)
public type: Label | null = null;
@property(Label)
public time: Label | null = null;
@property(Label)
public price: Label | null = null;
start() {}
init(data) {
this.Name.string = data.name;
this.num.string = data.number;
this.status.string = this.ChStatus(data.status);
this.toaddress.string = data.to_address;
this.type.string = data.type;
this.price.string = data.price;
this.time.string = this.formatDateTime(data.time);
}
formatDateTime(timeStamp) {
var date = new Date();
date.setTime(timeStamp * 1000);
var y = date.getFullYear();
var m = date.getMonth() + 1;
let _m = m < 10 ? "0" + m : m;
var d = date.getDate();
let _d = d < 10 ? "0" + d : d;
var h = date.getHours();
let _h = h < 10 ? "0" + h : h;
let minute = date.getMinutes();
var second = date.getSeconds();
let _minute = minute < 10 ? "0" + minute : minute;
let _second = second < 10 ? "0" + second : second;
return y + "-" + _m + "-" + _d + " " + _h + ":" + _minute + ":" + _second;
}
ChStatus(item) {
if (item == 10000) {
return "成功";
} else {
return "失败";
}
}
update(deltaTime: number) {}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "58076781-ea14-40db-82f4-c860a02e0d25",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,55 +1,58 @@
import { _decorator, Component, Node } from 'cc';
import { _decorator, Component, Node, director } from "cc";
const { ccclass, property } = _decorator;
import {rechargeNum} from '../RechageNum'
import dwebAjax from '../ajax'
import {rachageModel} from '../rachageModel'
import { rechargeNum } from "../RechageNum";
import dwebAjax from "../ajax";
import { rachageModel } from "../rachageModel";
@ccclass('coinBtn')
@ccclass("coinBtn")
export class coinBtn extends Component {
@property(rechargeNum)
RechargeNum:rechargeNum=null
@property(rachageModel)
RachageModel:rachageModel = null;
start() {
@property(rechargeNum)
RechargeNum: rechargeNum = null;
@property(rachageModel)
RachageModel: rachageModel = null;
start() {}
//选择金币
choseCoin() {
let data = {};
// this.RechargeNum.node.active = true;
// this.RachageModel.node.active = false;
}
//选择金币
choseCoin(){
let data = {}
this.RechargeNum.node.active= true;
this.RachageModel.node.active = false
dwebAjax.sendAjax("/api/v1/recharge/get", data, "GET", (res) => {
console.log(res);
if (res.code == "200") {
this.RechargeNum.init(res.data[0]);
this.RechargeNum.node.active = true;
this.RachageModel.node.active = false;
} else if (res.code == "10001") {
console.log("登录失效");
director.loadScene("login");
} else {
console.log(res);
return;
}
});
}
//选择钻石
choseDds() {
let data = {};
// this.RechargeNum.node.active = true;
// this.RachageModel.node.active = false;
dwebAjax.sendAjax("/api/v1/recharge/get",data,"GET",(res)=>{
console.log(res);
if(res.code == "200"){
this.RechargeNum.init(res.data[0])
this.RachageModel.node.active = false
}else{
console.log(res);
return
}
})
}
//选择钻石
choseDds(){
let data = {}
this.RechargeNum.node.active= true;
this.RachageModel.node.active = false
dwebAjax.sendAjax("/api/v1/recharge/get", data, "GET", (res) => {
console.log(res);
if (res.code == "200") {
this.RechargeNum.init(res.data[1]);
this.RechargeNum.node.active = true;
this.RachageModel.node.active = false;
} else if (res.code == "10001") {
console.log("登录失效");
director.loadScene("login");
} else {
console.log(res);
return;
}
});
}
dwebAjax.sendAjax("/api/v1/recharge/get",data,"GET",(res)=>{
console.log(res);
if(res.code == "200"){
this.RechargeNum.init(res.data[1])
this.RachageModel.node.active = false
}else{
console.log(res);
return
}
})
}
update(deltaTime: number) {
}
update(deltaTime: number) {}
}

View File

@ -0,0 +1,14 @@
import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('mask')
export class mask extends Component {
start() {
}
update(deltaTime: number) {
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "6cffca96-13de-4e20-bfc7-5cd3e52495b1",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,144 @@
import {
_decorator,
Component,
Node,
Label,
EditBox,
log,
director,
Toggle,
} from "cc";
const { ccclass, property } = _decorator;
import BigNumber from "bignumber.js";
import dwebAjax from "../ajax";
import TBG from "../tgb";
import { rechargeNum } from "../RechageNum";
import { tanchuan } from "../TanChuang";
@ccclass("rechageBtn")
export class rechageBtn extends Component {
@property(EditBox)
RechageNum: EditBox | null = null;
@property(rechargeNum)
rechargeNum: rechargeNum | null = null;
@property(Label)
privateddress: Label | null = null;
@property(Label)
Eth: Label | null = null;
@property(Label)
Usdt: Label | null = null;
@property(tanchuan)
tanchuan: tanchuan = null;
@property(Toggle)
ETH: Toggle | null = null;
@property(Toggle)
USDT: Toggle | null = null;
start() {}
async text() {
let BcType = "eth";
const tbg = new TBG({});
const account = await tbg.login();
const data = {};
console.log(this.Eth.string);
let address = localStorage.getItem("address");
let num = new BigNumber(Number(this.RechageNum.string));
let eth = new BigNumber(Number(this.Eth.string));
let usdt = new BigNumber(Number(this.Usdt.string));
const ReNum = new BigNumber(10 ** 18).times(num).div(eth);
console.log(ReNum);
if (this.USDT.isChecked == true) {
const ReNum = new BigNumber(10 ** 18).times(num).div(usdt);
BcType = "usdt";
const res = tbg.sendUsdtTransaction({
from: account,
contract: "0xB02F7BeB4B1CB4b9aC27dA52711C7f51118fa190",
to: address,
value: ReNum,
});
this.rechargeNum.node.active = false;
this.tanchuan.init("充值中...");
this.tanchuan.node.active = true;
data["txhash"] = res.transactionHash;
let count = 0;
this.schedule(
() => {
const res = dwebAjax.sendAjax(
"/api/v1/select/hash",
data,
"POST",
(res) => {
console.log(res);
if (res.code == "200" && res.data) {
this.unschedule(this.schedule);
this.tanchuan.init("充值成功");
} else if (res.code == "10001") {
console.log("登录失效");
director.loadScene("login");
} else {
console.log(res);
return;
}
}
);
},
5,
6,
0
);
} else {
const res = await tbg.sendTransaction({
from: account,
to: address,
value: ReNum,
});
log(res);
this.rechargeNum.node.active = false;
this.tanchuan.init("充值中...");
this.tanchuan.node.active = true;
data["txhash"] = res.transactionHash;
let count = 0;
this.schedule(
() => {
const res = dwebAjax.sendAjax(
"/api/v1/select/hash",
data,
"POST",
(res) => {
console.log(res);
if (res.code == "200" && res.data) {
this.unschedule(this.schedule);
this.tanchuan.init("充值成功");
} else if (res.code == "10001") {
console.log("登录失效");
director.loadScene("login");
} else {
console.log(res);
return;
}
}
);
},
5,
6,
0
);
}
// const res1 = await dwebAjax.sendAjax(
// "/api/v1/select/hash",
// data,
// "POST",
// (res) => {
// console.log(res);
// if (res.code == "200" && res.data) {
// this.unschedule(this.callback);
// this.tanchuan.init("充值成功");
// } else {
// return;
// }
// }
// );
this.RechageNum.node.active = false;
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "d894ba90-174d-4962-a1f9-b0bf61b42f7f",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "69d4c7b2-72e2-4346-9d72-496f7bf68724",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,14 @@
import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('tableMain')
export class tableMain extends Component {
start() {
}
update(deltaTime: number) {
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "f5c44445-4b0c-4ced-999f-0e70fa2331a4",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "5b4ff176-2a21-4d39-9e2a-1367b4b1009a",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,13 @@
import { _decorator, Component, Node } from "cc";
const { ccclass, property } = _decorator;
import { tanchuan } from "../TanChuang";
@ccclass("TanChuangBtn")
export class TanChuangBtn extends Component {
@property(tanchuan)
tanchuan: tanchuan = null;
start() {}
close() {
this.tanchuan.close();
}
update(deltaTime: number) {}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "1d631ce9-be8a-46bb-a40d-d7598caf4e60",
"files": [],
"subMetas": {},
"userData": {}
}

36
assets/typescript/test.ts Normal file
View File

@ -0,0 +1,36 @@
import { _decorator, Component, Node, NodeEventType } from "cc";
import TBG from "./tgb";
// import ercAbi from "./abi/abi";
const { ccclass, property } = _decorator;
const ETH_CONTRACT = "0x3865194cD048f7b14b465a96907fB6546B888216";
@ccclass("NewComponent")
export class NewComponent extends Component {
start() {
const tbg = new TBG({});
tbg.on("accountChange", () => {
console.log("hasChange");
});
this.node.on(
NodeEventType.MOUSE_DOWN,
async () => {
const account = await tbg.login();
const res2 = await tbg.sign({});
// const res2 = await tbg.createNft({
// abi: ercAbi,
// contract: ETH_CONTRACT,
// toAddress: account,
// });
const res = await tbg.sendTransaction({
from: account,
to: "0x96216849c49358B10257cb55b28eA603c874b05E",
value: "1000000000000000",
});
console.log(res);
},
this
);
}
update(deltaTime: number) {}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "06b37a68-0167-4b56-b046-7bac2f70c455",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "56aa0c6c-7742-4c4a-945e-4eac0db42ecf",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@ -0,0 +1,265 @@
export default [
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "owner",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "approved",
type: "address",
},
{
indexed: true,
internalType: "uint256",
name: "tokenId",
type: "uint256",
},
],
name: "Approval",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "owner",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "operator",
type: "address",
},
{
indexed: false,
internalType: "bool",
name: "approved",
type: "bool",
},
],
name: "ApprovalForAll",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "previousOwner",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "newOwner",
type: "address",
},
],
name: "OwnershipTransferred",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "from",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "to",
type: "address",
},
{
indexed: true,
internalType: "uint256",
name: "tokenId",
type: "uint256",
},
],
name: "Transfer",
type: "event",
},
{
inputs: [
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "tokenId", type: "uint256" },
],
name: "approve",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }],
name: "Burn",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "tokenId", type: "uint256" },
],
name: "GTransfer",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "to", type: "address" },
{ internalType: "bytes", name: "signature", type: "bytes" },
],
name: "Mint",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "renounceOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "tokenId", type: "uint256" },
],
name: "safeTransferFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "tokenId", type: "uint256" },
{ internalType: "bytes", name: "data", type: "bytes" },
],
name: "safeTransferFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "operator", type: "address" },
{ internalType: "bool", name: "approved", type: "bool" },
],
name: "setApprovalForAll",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "tokenId", type: "uint256" },
],
name: "transferFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "string", name: "tokenName", type: "string" },
{ internalType: "string", name: "tokenSymbol", type: "string" },
],
stateMutability: "nonpayable",
type: "constructor",
},
{
inputs: [{ internalType: "address", name: "owner", type: "address" }],
name: "balanceOf",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }],
name: "getApproved",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "owner", type: "address" },
{ internalType: "address", name: "operator", type: "address" },
],
name: "isApprovedForAll",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "name",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }],
name: "ownerOf",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }],
name: "supportsInterface",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "symbol",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }],
name: "tokenURI",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
];

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "9bae6aa1-9697-428b-a7bf-46a45820715b",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,390 @@
export default [
{
constant: true,
inputs: [],
name: "name",
outputs: [{ name: "", type: "string" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: false,
inputs: [{ name: "_upgradedAddress", type: "address" }],
name: "deprecate",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
constant: false,
inputs: [
{ name: "_spender", type: "address" },
{ name: "_value", type: "uint256" },
],
name: "approve",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
constant: true,
inputs: [],
name: "deprecated",
outputs: [{ name: "", type: "bool" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: false,
inputs: [{ name: "_evilUser", type: "address" }],
name: "addBlackList",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
constant: true,
inputs: [],
name: "totalSupply",
outputs: [{ name: "", type: "uint256" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: false,
inputs: [
{ name: "_from", type: "address" },
{ name: "_to", type: "address" },
{ name: "_value", type: "uint256" },
],
name: "transferFrom",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
constant: true,
inputs: [],
name: "upgradedAddress",
outputs: [{ name: "", type: "address" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: true,
inputs: [{ name: "", type: "address" }],
name: "balances",
outputs: [{ name: "", type: "uint256" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: true,
inputs: [],
name: "decimals",
outputs: [{ name: "", type: "uint256" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: true,
inputs: [],
name: "maximumFee",
outputs: [{ name: "", type: "uint256" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: true,
inputs: [],
name: "_totalSupply",
outputs: [{ name: "", type: "uint256" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: false,
inputs: [],
name: "unpause",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
constant: true,
inputs: [{ name: "_maker", type: "address" }],
name: "getBlackListStatus",
outputs: [{ name: "", type: "bool" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: true,
inputs: [
{ name: "", type: "address" },
{ name: "", type: "address" },
],
name: "allowed",
outputs: [{ name: "", type: "uint256" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: true,
inputs: [],
name: "paused",
outputs: [{ name: "", type: "bool" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: true,
inputs: [{ name: "who", type: "address" }],
name: "balanceOf",
outputs: [{ name: "", type: "uint256" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: false,
inputs: [],
name: "pause",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
constant: true,
inputs: [],
name: "getOwner",
outputs: [{ name: "", type: "address" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: true,
inputs: [],
name: "owner",
outputs: [{ name: "", type: "address" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: true,
inputs: [],
name: "symbol",
outputs: [{ name: "", type: "string" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: false,
inputs: [
{ name: "_to", type: "address" },
{ name: "_value", type: "uint256" },
],
name: "transfer",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
constant: false,
inputs: [
{ name: "newBasisPoints", type: "uint256" },
{ name: "newMaxFee", type: "uint256" },
],
name: "setParams",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
constant: false,
inputs: [{ name: "amount", type: "uint256" }],
name: "issue",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
constant: false,
inputs: [{ name: "amount", type: "uint256" }],
name: "redeem",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
constant: true,
inputs: [
{ name: "_owner", type: "address" },
{ name: "_spender", type: "address" },
],
name: "allowance",
outputs: [{ name: "remaining", type: "uint256" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: true,
inputs: [],
name: "basisPointsRate",
outputs: [{ name: "", type: "uint256" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: true,
inputs: [{ name: "", type: "address" }],
name: "isBlackListed",
outputs: [{ name: "", type: "bool" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: false,
inputs: [{ name: "_clearedUser", type: "address" }],
name: "removeBlackList",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
constant: true,
inputs: [],
name: "MAX_UINT",
outputs: [{ name: "", type: "uint256" }],
payable: false,
stateMutability: "view",
type: "function",
},
{
constant: false,
inputs: [{ name: "newOwner", type: "address" }],
name: "transferOwnership",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
constant: false,
inputs: [{ name: "_blackListedUser", type: "address" }],
name: "destroyBlackFunds",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ name: "_initialSupply", type: "uint256" },
{ name: "_name", type: "string" },
{ name: "_symbol", type: "string" },
{ name: "_decimals", type: "uint256" },
],
payable: false,
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [{ indexed: false, name: "amount", type: "uint256" }],
name: "Issue",
type: "event",
},
{
anonymous: false,
inputs: [{ indexed: false, name: "amount", type: "uint256" }],
name: "Redeem",
type: "event",
},
{
anonymous: false,
inputs: [{ indexed: false, name: "newAddress", type: "address" }],
name: "Deprecate",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: false, name: "feeBasisPoints", type: "uint256" },
{ indexed: false, name: "maxFee", type: "uint256" },
],
name: "Params",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: false, name: "_blackListedUser", type: "address" },
{ indexed: false, name: "_balance", type: "uint256" },
],
name: "DestroyedBlackFunds",
type: "event",
},
{
anonymous: false,
inputs: [{ indexed: false, name: "_user", type: "address" }],
name: "AddedBlackList",
type: "event",
},
{
anonymous: false,
inputs: [{ indexed: false, name: "_user", type: "address" }],
name: "RemovedBlackList",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, name: "owner", type: "address" },
{ indexed: true, name: "spender", type: "address" },
{ indexed: false, name: "value", type: "uint256" },
],
name: "Approval",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, name: "from", type: "address" },
{ indexed: true, name: "to", type: "address" },
{ indexed: false, name: "value", type: "uint256" },
],
name: "Transfer",
type: "event",
},
{ anonymous: false, inputs: [], name: "Pause", type: "event" },
{ anonymous: false, inputs: [], name: "Unpause", type: "event" },
];

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "066dcc7e-0e0d-40be-9fc8-9e41cd7b12bb",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,4 +1,4 @@
//声明类
// 声明类
export class EventBus {
private eventList: object;
constructor() {

View File

@ -1,7 +1,7 @@
import { HTML5, NATIVE } from "cc/env";
import { TBG as TBGHTML } from "./tbg";
let TBG: any = {};
let TBG = TBGHTML;
if (HTML5) {
TBG = TBGHTML;
} else if (NATIVE) {

View File

@ -1,10 +1,16 @@
// import Web3 from "web3";
import Web3 from "web3/dist/web3.min.js";
import EventBus from "./eventBus";
import { web3 } from "./web3";
// import { SendReturnResult, SendReturn, Send, SendOld } from "./types";
// const web3 = new Web3(Web3.givenProvider);
// const myContract = new web3.eth.Contract(ercAbi, ETH_CONTRACT);
import usdtAbi from "./abi/usdtAbi";
import nftAbi from "./abi/nftAbi";
declare global {
interface Window {
ethereum?: any; //MetaMaskInpageProvider
}
}
const web3 = new Web3(Web3.givenProvider);
function parseSendReturn(sendReturn: any): any {
return sendReturn.hasOwnProperty("result") ? sendReturn.result : sendReturn;
}
@ -22,7 +28,8 @@ export class TBG extends EventBus {
super();
this.handleAddListener();
}
handleAddListener() {
private handleAddListener() {
if (window.ethereum.on) {
window.ethereum.on("chainChanged", this.handleChainChanged.bind(this));
window.ethereum.on(
@ -36,28 +43,37 @@ export class TBG extends EventBus {
);
}
}
private handleNetworkChanged() {
this.emit("networkChanged");
}
private handleChainChanged() {
this.emit("chainChanged");
}
private handleAccountsChanged(accounts: string[]): void {
this.emit("accountsChanged", accounts);
}
private handleClose() {
this.emit("close");
}
async login() {
if (!window.ethereum) {
throw new NoEthereumProviderError();
}
if ((window.ethereum as any).isMetaMask) {
(window.ethereum as any).autoRefreshOnNetworkChange = false;
if (window.ethereum.isMetaMask) {
window.ethereum.autoRefreshOnNetworkChange = false;
}
let account;
try {
account = await window.ethereum
.request({ method: "eth_requestAccounts" })
.then((sendReturn) => parseSendReturn(sendReturn)[0]);
console.log(account);
return account;
} catch (error) {
if ((error as any).code === 4001) {
if (error.code === 4001) {
// throw new UserRejectedRequestError()
}
console.warn(
false,
"eth_requestAccounts was unsuccessful, falling back to enable"
);
}
// if unsuccessful, try enable
if (!account) {
@ -68,6 +84,7 @@ export class TBG extends EventBus {
return account;
}
}
logout() {
if (window.ethereum && window.ethereum.removeListener) {
window.ethereum.removeListener("chainChanged", this.handleChainChanged);
@ -82,50 +99,45 @@ export class TBG extends EventBus {
);
}
}
async sign({}) {
// const res: any = await getData({});
// const data = '1234';
const res = "123";
const rawData: any = web3.utils.fromUtf8(res);
async sign(randomKey) {
const rawData = web3.utils.fromUtf8(randomKey);
const { result } = await window.ethereum.send("personal_sign", [
rawData,
window.ethereum.selectedAddress!.toLowerCase(),
]);
return {
raw: res,
raw: rawData,
sign: result,
};
}
async createNft({ abi, contract, toAddress }) {
const nftContract = new web3.eth.Contract(abi, contract);
// async createNft({ contract, from, assetId, signature }) {
// const nftContract = new web3.eth.Contract(nftAbi, contract);
// return await nftContract.methods.Mint(from).send({ from });
// }
async createNft({ nftAbi, contract, toAddress }) {
const nftContract = new web3.eth.Contract(nftAbi, contract);
return await nftContract.methods.Mint(toAddress).send({ from: toAddress });
}
async transferNft({ contract, to, from, tokenId }) {
const nftContract = new web3.eth.Contract(nftAbi, contract);
return nftContract.methods.Transfer(from, to, tokenId).send({ from });
}
async sendTransaction({ from, to, value }) {
await web3.eth.sendTransaction({
return web3.eth.sendTransaction({
from,
to,
value,
});
}
handleNetworkChanged() {
console.log("handleNetworkChanged");
// "0xaC893B498E2005Af4cb8b03D710F187EC23a8f5f";
async sendUsdtTransaction({ from, contract, to, value }) {
const usdtContract = new web3.eth.Contract(usdtAbi, contract);
return usdtContract.methods.transfer(to, value).send({ from });
}
handleChainChanged() {
console.log("handleChainChanged");
}
handleAccountsChanged(accounts: string[]): void {
console.log(accounts);
if (accounts.length === 0) {
// this.emitDeactivate()
} else {
// this.emitUpdate({ account: accounts[0] })
}
this.emit("accountChange");
}
handleClose() {
console.log("handleClose");
}
update(deltaTime: number) {}
}
export default TBG;

View File

@ -1,37 +1,34 @@
import { _decorator, Component, Node } from 'cc';
import {userLabel} from './userLabel'
import { _decorator, Component, Node, director } from "cc";
import { userLabel } from "./userLabel";
const { ccclass, property } = _decorator;
import dwebAjax from '../ajax'
import { userdata } from '../userdata';
@ccclass('userBtn')
import dwebAjax from "../ajax";
import { userdata } from "../userdata";
@ccclass("userBtn")
export class userBtn extends Component {
@property(userdata)
Userdata:userdata = null;
@property(userLabel)
UserLabel:userLabel = null;
@property(userdata)
Userdata: userdata = null;
@property(userLabel)
UserLabel: userLabel = null;
start() {
start() {}
async changeUserData() {
let data = {};
await dwebAjax.sendAjax("/api/v1/user/get", data, "POST", (res) => {
console.log(res);
if (res.code == "200") {
console.log(res.data.address);
this.Userdata.node.active = true;
// this.UserLabel.setLabel(res.Uuid)
} else if (res.code == "10001") {
console.log("登录失效");
director.loadScene("login");
} else {
console.log(res);
return;
}
});
// this.Userdata.init
}
}
async changeUserData(){
let data = {}
await dwebAjax.sendAjax("/api/v1/user/get",data,"POST",(res)=>{
console.log(res);
if(res.code == "200"){
console.log(res.data.address);
this.Userdata.node.active= true;
// this.UserLabel.setLabel(res.Uuid)
}else{
console.log(res);
return
}
})
// this.Userdata.init
}
update(deltaTime: number) {
}
update(deltaTime: number) {}
}

View File

@ -1,30 +1,36 @@
import { _decorator, Component, Node, Label } from 'cc';
import { _decorator, Component, Node, Label } from "cc";
const { ccclass, property } = _decorator;
import dwebAjax from '../ajax'
@ccclass('userLabel')
import dwebAjax from "../ajax";
@ccclass("userLabel")
export class userLabel extends Component {
@property(Label)
address = null;
setLabel(item:string){
this.node.getChildByName('address').getComponent(Label).string = item
}
start() {
let data = {}
dwebAjax.sendAjax("/api/v1/user/get",data,"POST",(res)=>{
console.log(res);
if(res.code == "200"){
console.log(res.data.address);
this.setLabel(res.data.address)
}else{
console.log(res);
return
}
@property(Label)
address = null;
@property(Label)
coin = null;
@property(Label)
Diamonds = null;
})
}
setLabel(item) {
this.node.getChildByName("address").getComponent(Label).string = item.addr;
this.node.getChildByName("coin").getComponent(Label).string = item.gold;
this.node.getChildByName("Diamonds").getComponent(Label).string =
item.diamond;
}
start() {
let data = {};
let adder = localStorage.getItem("adder");
data["addr"] = adder;
dwebAjax.sendAjax("/api/v1/user/get", data, "POST", (res) => {
console.log(res);
if (res.code == "200") {
console.log(res.data.address);
this.setLabel(res.data);
} else {
console.log(res);
return;
}
});
}
update(deltaTime: number) {
}
update(deltaTime: number) {}
}

BIN
build/.DS_Store vendored Normal file

Binary file not shown.

BIN
build/web-mobile-001.zip Normal file

Binary file not shown.

BIN
build/web-mobile-001/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,63 @@
System.register([], function (_export, _context) {
"use strict";
var cc, Application;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
return {
setters: [],
execute: function () {
_export("Application", Application = /*#__PURE__*/function () {
function Application() {
_classCallCheck(this, Application);
this.settingsPath = 'src/settings.json';
this.showFPS = false;
}
_createClass(Application, [{
key: "init",
value: function init(engine) {
cc = engine;
cc.game.onPostBaseInitDelegate.add(this.onPostInitBase.bind(this));
cc.game.onPostSubsystemInitDelegate.add(this.onPostSystemInit.bind(this));
}
}, {
key: "onPostInitBase",
value: function onPostInitBase() {// cc.settings.overrideSettings('assets', 'server', '');
// do custom logic
}
}, {
key: "onPostSystemInit",
value: function onPostSystemInit() {// do custom logic
}
}, {
key: "start",
value: function start() {
return cc.game.init({
debugMode: false ? cc.DebugMode.INFO : cc.DebugMode.ERROR,
settingsPath: this.settingsPath,
overrideSettings: {
// assets: {
// preloadBundles: [{ bundle: 'main', version: 'xxx' }],
// }
profiling: {
showFPS: this.showFPS
}
}
}).then(function () {
return cc.game.run();
});
}
}]);
return Application;
}());
}
};
});

BIN
build/web-mobile-001/assets/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
{"importBase":"import","nativeBase":"native","name":"internal","deps":[],"uuids":["06efdbec0","08HKsx3M1CjoZS8kBMyBxH","142hclxMJCtKsI7grraJiz","173rzDCmtLirAL3Fi4hVge","1brw/JvvpFnIvdrxpFCgMZ","1cAq5vRJJJFbj4dJKjseTN","1dCO9ipQNM4ouaRskIc/fT","281ta4P2ZKc5eVF6CFK6LU","509DSLyINOL48RziM7hZ+h","51HSYzCadL3axC93gDISSz","5dRaoA4GRJOLMUQmXwwiWM","609xlc7CpF67qUiVX2DoHQ","62C2vzA2lFYIN/KiwAtzwm","71Hr4R9nNM2ZqDY8YLpUxb","784FhKQ0NHJ4834U5lwqLb","81Dpbk5FZEaJtZ9OjzlzLA","87HDtsc3lBnb2jeUsjmrkN","8bvbzdXNRBALbVt8liW2EH","93Yf2QulJPhKqTboeP1XbK","97CwWYvLBHFJH7LoFEDczY","97G9sjP/ZD67QiHDAWWjZj","a3zQCfCrBCDZJ4uf2rk5u8","b51hFfA3BNfKrTwZTMcc+Y","baIUdvKGZPgZxNbjWTFuRI","bc1kzGLdlD9qu+ZjGNMyAy","c0FDkGmu1EfpQ2KuhRLRtu","c2chXYaDVLaL+7verGEAwE","d1NGQ2rJZCcbhjH0/erZWw","d9MFkNu5JMyIvRI80Cf57f","ddOhRNq39B8IK4LkOgkNSW","e9qpo+WytKx6LHBz3isrJP","ecgQb+Bb9OlJQ84NO3u15F","ef6OKj6s5Ce7Txy4qTfsd9","f0QW5oAgBLd6kmT50W5JTa","f9KAbXF2hEP6/oErzehNDw","fdoJXLgx1GAa2UhGATlj3o","ffm+GQIKROSLaMduPHz/CF"],"paths":{"1":["db:/internal/default_materials/default-trail-material",1],"2":["db:/internal/default_materials/default-particle-gpu-material",1],"3":["db:/internal/effects/builtin-particle-trail",0],"4":["db:/internal/effects/builtin-standard",0],"5":["db:/internal/effects/builtin-graphics",0],"6":["db:/internal/effects/builtin-terrain",0],"7":["db:/internal/effects/pipeline/bloom",0],"8":["db:/internal/default_materials/ui-alpha-test-material",1],"9":["db:/internal/effects/pipeline/skybox",0],"10":["db:/internal/effects/pipeline/deferred-lighting",0],"11":["db:/internal/effects/builtin-sprite",0],"12":["db:/internal/default_materials/standard-material",1],"13":["db:/internal/effects/builtin-billboard",0],"14":["db:/internal/default_materials/default-billboard-material",1],"15":["db:/internal/effects/builtin-clear-stencil",0],"16":["db:/internal/effects/util/profiler",0],"17":["db:/internal/default_materials/default-clear-stencil",1],"18":["db:/internal/effects/pipeline/planar-shadow",0],"19":["db:/internal/effects/util/splash-screen",0],"20":["db:/internal/effects/builtin-particle-gpu",0],"21":["db:/internal/effects/builtin-unlit",0],"22":["db:/internal/default_materials/default-spine-material",1],"23":["db:/internal/physics/default-physics-material",2],"24":["db:/internal/default_materials/missing-effect-material",1],"25":["db:/internal/default_materials/default-particle-material",1],"26":["db:/internal/effects/builtin-spine",0],"27":["db:/internal/effects/builtin-particle",0],"28":["db:/internal/default_materials/missing-material",1],"29":["db:/internal/default_materials/ui-sprite-gray-alpha-sep-material",1],"30":["db:/internal/default_materials/ui-base-material",1],"31":["db:/internal/effects/pipeline/post-process",0],"32":["db:/internal/default_materials/ui-sprite-gray-material",1],"33":["db:/internal/default_materials/ui-graphics-material",1],"34":["db:/internal/default_materials/ui-sprite-alpha-sep-material",1],"35":["db:/internal/default_materials/ui-sprite-material",1],"36":["db:/internal/effects/builtin-debug-renderer",0]},"scenes":{},"packs":{"06efdbec0":["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36"]},"versions":{"import":[],"native":[]},"redirect":[],"debug":false,"extensionMap":{},"types":["cc.EffectAsset","cc.Material","cc.PhysicsMaterial"]}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,20 @@
System.register("chunks:///_virtual/internal",[],(function(){"use strict";return{execute:function(){}}}));
(function(r) {
r('virtual:///prerequisite-imports/internal', 'chunks:///_virtual/internal');
})(function(mid, cid) {
System.register(mid, [cid], function (_export, _context) {
return {
setters: [function(_m) {
var _exportObj = {};
for (var _key in _m) {
if (_key !== "default" && _key !== "__esModule") _exportObj[_key] = _m[_key];
}
_export(_exportObj);
}],
execute: function () { }
};
});
});

View File

@ -0,0 +1 @@
{"importBase":"import","nativeBase":"native","name":"main","deps":["internal"],"uuids":["033ea041b","054cb2b19","0628de699","7cPn+rex5IZbqEPPgbSLn7","aa3gnuj51BPKnojGhupeFg@73b7f","e3VTytLxVCk4Waj0PHgPKJ@73b7f","07GNmWOb9KtLtjSWZm/vRn","07GNmWOb9KtLtjSWZm/vRn@6c48a","0asxQqaWhAc5WvAmvDsjYj@0e750","0asxQqaWhAc5WvAmvDsjYj@1332c","0asxQqaWhAc5WvAmvDsjYj@2b0a8","0asxQqaWhAc5WvAmvDsjYj@2df3a","0asxQqaWhAc5WvAmvDsjYj@426f2","0asxQqaWhAc5WvAmvDsjYj@4a7d8","0asxQqaWhAc5WvAmvDsjYj@4d16f","0asxQqaWhAc5WvAmvDsjYj@71919","0asxQqaWhAc5WvAmvDsjYj@754a2","0asxQqaWhAc5WvAmvDsjYj@ef86b","0asxQqaWhAc5WvAmvDsjYj@efe84","0dolaiIfZIG5C202Q6CReb","0dolaiIfZIG5C202Q6CReb@6c48a","0dolaiIfZIG5C202Q6CReb@f9941","1brw/JvvpFnIvdrxpFCgMZ","20g1ukYUVPvKWKBRznAKo+","20g1ukYUVPvKWKBRznAKo+@6c48a","20g1ukYUVPvKWKBRznAKo+@f9941","45go8ltQ1MUqWR4ZSRpiuM","45go8ltQ1MUqWR4ZSRpiuM@6c48a","45go8ltQ1MUqWR4ZSRpiuM@f9941","4fTEo0LQhKTZFpg0186Czu","54TknWPwVPqJqeCR+Y/Czo","54TknWPwVPqJqeCR+Y/Czo@6c48a","54TknWPwVPqJqeCR+Y/Czo@f9941","5a8gG1WVFOLKgfrEqtkTLL@b47c0","5af201b5-5951-4e2c-a81f-ac4aad9132cb@b47c0@40c10","5af201b5-5951-4e2c-a81f-ac4aad9132cb@b47c0@74afd","5af201b5-5951-4e2c-a81f-ac4aad9132cb@b47c0@7d38f","5af201b5-5951-4e2c-a81f-ac4aad9132cb@b47c0@8fd34","5af201b5-5951-4e2c-a81f-ac4aad9132cb@b47c0@bb97f","5af201b5-5951-4e2c-a81f-ac4aad9132cb@b47c0@e9a6d","5eTUjEDjRFr6JoiUhRl+i8","6fiRp7WghI5phB3bNkrIax","6fiRp7WghI5phB3bNkrIax@6c48a","700zdYHB5CTbCr6sdBBVm/","7b+d9AS8lOJYywmlAPlJEC","8aWN3s9DdAuY7AH8h96X+1","8eBHF49hxDIqL20a2yi2ri","95EkngnxZFbYuFpsqVTaFr","95EkngnxZFbYuFpsqVTaFr@6c48a","95EkngnxZFbYuFpsqVTaFr@f9941","955bAq4zhCPL27F0htsdnr","955bAq4zhCPL27F0htsdnr@6c48a","a1Vfk7d2lMpLdfsT5SGThZ","a3zQCfCrBCDZJ4uf2rk5u8","a7YStUNeNCOKGpSntUY1g5","aa3gnuj51BPKnojGhupeFg@438fe","aa3gnuj51BPKnojGhupeFg@ef5e1","acdPorH1tP9aPw8Sf0SD6R","acdPorH1tP9aPw8Sf0SD6R@6c48a","acdPorH1tP9aPw8Sf0SD6R@f9941","aeGN7qxuBKPb9w7lUz+bqH","aeGN7qxuBKPb9w7lUz+bqH@6c48a","afxHkx8GZGsJC+n+YfITQo","afxHkx8GZGsJC+n+YfITQo@6c48a","afxHkx8GZGsJC+n+YfITQo@f9941","b6mOVasAtJh6i0r4PN3Fn3","b7MFJ8MjNBwqr3fNq1j5dJ","b7MFJ8MjNBwqr3fNq1j5dJ@6c48a","b7MFJ8MjNBwqr3fNq1j5dJ@f9941","c5CD51rS5OqYsz3udImVsA","c5CD51rS5OqYsz3udImVsA@6c48a","ccw6dVfT1DBKo7ykeS152f","cfxTxOeVZIK668P7Hc027v","d38SUn0ehG3a3Wd6nYjNM3","e3VTytLxVCk4Waj0PHgPKJ@18751","e3VTytLxVCk4Waj0PHgPKJ@30732","e3VTytLxVCk4Waj0PHgPKJ@39f7b","e3VTytLxVCk4Waj0PHgPKJ@4b929","e3VTytLxVCk4Waj0PHgPKJ@75ee4","e3VTytLxVCk4Waj0PHgPKJ@a72ab","e3VTytLxVCk4Waj0PHgPKJ@da6f3","e3VTytLxVCk4Waj0PHgPKJ@f1394","f1KiPEuSRDIqJgPZgkKPHo","f1KiPEuSRDIqJgPZgkKPHo@6c48a","f1KiPEuSRDIqJgPZgkKPHo@f9941","f9KAbXF2hEP6/oErzehNDw","fcU6Ex5rpNApE3zSJezPpa","fdjsU2o1RKF5x0TziDw3jI","ffuIqPr2JI9I8dPLYGRDpD","ffuIqPr2JI9I8dPLYGRDpD@6c48a","ffuIqPr2JI9I8dPLYGRDpD@f9941"],"paths":{"87":["db:/internal/default_renderpipeline/builtin-forward",0]},"scenes":{"db://assets/scene/main.scene":3,"db://assets/scene/login.scene":73},"packs":{"033ea041b":["19","29","41","50","30","6","23","26","47","57","60","62","66","69","82","88"],"054cb2b19":["8","9","10","12","13","14","15","16","17","18","21","25","28","32","33","34","35","36","37","38","39","40","43","44","3","45","46","49","52","54","55","56","59","64","65","68","71","72","74","75","76","77","78","79","80","81","84","86","90"],"0628de699":["11","20","42","51","31","7","24","27","48","58","61","63","67","70","83","89"]},"versions":{"import":[],"native":[]},"redirect":[22,"0",53,"0",85,"0"],"debug":false,"extensionMap":{".cconb":["4","4","5","5"]},"types":["cc.RenderPipeline"]}

View File

@ -0,0 +1 @@
{"type":"cc.ImageAsset","data":[[1,0,0,["cc.ImageAsset"],0,[{"fmt":"0","w":0,"h":0},-1],[0],0,[],[],[]],[1,0,0,["cc.ImageAsset"],0,[{"fmt":"1","w":0,"h":0},-1],[0],0,[],[],[]],[1,0,0,["cc.ImageAsset"],0,[{"fmt":"0","w":0,"h":0},-1],[0],0,[],[],[]],[1,0,0,["cc.ImageAsset"],0,[{"fmt":"1","w":0,"h":0},-1],[0],0,[],[],[]],[1,0,0,["cc.ImageAsset"],0,[{"fmt":"0","w":0,"h":0},-1],[0],0,[],[],[]],[1,0,0,["cc.ImageAsset"],0,[{"fmt":"1","w":0,"h":0},-1],[0],0,[],[],[]],[1,0,0,["cc.ImageAsset"],0,[{"fmt":"0","w":0,"h":0},-1],[0],0,[],[],[]],[1,0,0,["cc.ImageAsset"],0,[{"fmt":"0","w":0,"h":0},-1],[0],0,[],[],[]],[1,0,0,["cc.ImageAsset"],0,[{"fmt":"0","w":0,"h":0},-1],[0],0,[],[],[]],[1,0,0,["cc.ImageAsset"],0,[{"fmt":"0","w":0,"h":0},-1],[0],0,[],[],[]],[1,0,0,["cc.ImageAsset"],0,[{"fmt":"0","w":0,"h":0},-1],[0],0,[],[],[]],[1,0,0,["cc.ImageAsset"],0,[{"fmt":"0","w":0,"h":0},-1],[0],0,[],[],[]],[1,0,0,["cc.ImageAsset"],0,[{"fmt":"0","w":0,"h":0},-1],[0],0,[],[],[]],[1,0,0,["cc.ImageAsset"],0,[{"fmt":"0","w":0,"h":0},-1],[0],0,[],[],[]],[1,0,0,["cc.ImageAsset"],0,[{"fmt":"0","w":0,"h":0},-1],[0],0,[],[],[]],[1,0,0,["cc.ImageAsset"],0,[{"fmt":"0","w":0,"h":0},-1],[0],0,[],[],[]]]}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"type":"cc.Texture2D","data":[["2,2,0,0,0,0",["4fTEo0LQhKTZFpg0186Czu"]],["2,2,2,2,0,0",["0dolaiIfZIG5C202Q6CReb"]],["2,2,0,0,0,0",["6fiRp7WghI5phB3bNkrIax"]],["2,2,0,0,0,0",["955bAq4zhCPL27F0htsdnr"]],["2,2,2,2,0,0",["54TknWPwVPqJqeCR+Y/Czo"]],["2,2,0,0,0,0",["07GNmWOb9KtLtjSWZm/vRn"]],["2,2,2,2,0,0",["20g1ukYUVPvKWKBRznAKo+"]],["2,2,2,2,0,0",["45go8ltQ1MUqWR4ZSRpiuM"]],["2,2,2,2,0,0",["95EkngnxZFbYuFpsqVTaFr"]],["2,2,2,2,0,0",["acdPorH1tP9aPw8Sf0SD6R"]],["2,2,0,0,2,0",["aeGN7qxuBKPb9w7lUz+bqH"]],["2,2,2,2,0,0",["afxHkx8GZGsJC+n+YfITQo"]],["2,2,2,2,0,0",["b7MFJ8MjNBwqr3fNq1j5dJ"]],["2,2,0,0,0,0",["c5CD51rS5OqYsz3udImVsA"]],["2,2,2,2,0,0",["f1KiPEuSRDIqJgPZgkKPHo"]],["2,2,2,2,0,0",["ffuIqPr2JI9I8dPLYGRDpD"]]]}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
[1,0,0,[["RenderQueueDesc",["stages","isTransparent","sortMode"],0],["ForwardPipeline",["_flows"],3,9],["ShadowFlow",["_name","_stages"],2,9],["ShadowStage",["_name"],2],["ForwardFlow",["_name","_priority","_stages"],1,9],["ForwardStage",["_name","renderQueues"],2,9]],[[1,0,1],[2,0,1,2],[3,0,2],[4,0,1,2,3],[5,0,1,2],[0,0,2],[0,1,2,0,4]],[[0,[[1,"ShadowFlow",[[2,"ShadowStage"]]],[3,"ForwardFlow",1,[[4,"ForwardStage",[[5,["default"]],[6,true,1,["default"]]]]]]]]],0,0,[],[],[]]

View File

@ -0,0 +1,74 @@
System.register("chunks:///_virtual/abi.ts",["cc"],(function(e){"use strict";var t;return{setters:[function(e){t=e.cclegacy}],execute:function(){t._RF.push({},"b0940sbvspGMZGVpUs1utrr","abi",void 0);e("default",[{inputs:[{internalType:"string",name:"tokenName",type:"string"},{internalType:"string",name:"tokenSymbol",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"Mint",outputs:[],stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}]);t._RF.pop()}}}));
System.register("chunks:///_virtual/ajax.ts",["cc"],(function(t){"use strict";var e;return{setters:[function(t){e=t.cclegacy}],execute:function(){e._RF.push({},"5996a3xpdxGV52P28C8e5pq","ajax",void 0);t("default",{hosturl:"http://81.71.13.173:8080",sendAjax:function(t,e,a,s){var n=new XMLHttpRequest;n.open(a,this.hosturl+t,!0);var r=localStorage.getItem("token");r&&n.setRequestHeader("Authorization",r);var u=JSON.stringify(e);n.send(u),n.onreadystatechange=function(){if(4==n.readyState&&200==n.status){var t=JSON.parse(n.responseText);s(t)}}}});e._RF.pop()}}}));
System.register("chunks:///_virtual/Btn.ts",["./rollupPluginModLoBabelHelpers.js","cc","./TanChuang.ts"],(function(n){"use strict";var t,e,r,a,i,o,c,u;return{setters:[function(n){t=n.applyDecoratedDescriptor,e=n.inheritsLoose,r=n.initializerDefineProperty,a=n.assertThisInitialized},function(n){i=n.cclegacy,o=n._decorator,c=n.Component},function(n){u=n.tanchuan}],execute:function(){var s,l,p,h,f;i._RF.push({},"1d631zpvopGu6QN11mMr05g","Btn",void 0);var g=o.ccclass,y=o.property;n("TanChuangBtn",(s=g("TanChuangBtn"),l=y(u),s((f=t((h=function(n){function t(){for(var t,e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];return t=n.call.apply(n,[this].concat(i))||this,r(t,"tanchuan",f,a(t)),t}e(t,n);var i=t.prototype;return i.start=function(){},i.close=function(){this.tanchuan.close()},i.update=function(n){},t}(c)).prototype,"tanchuan",[l],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),p=h))||p));i._RF.pop()}}}));
System.register("chunks:///_virtual/close.ts",["./rollupPluginModLoBabelHelpers.js","cc","./rachageModel.ts","./RechageNum.ts","./Substitute.ts","./userdata.ts","./WithdrawalModal.ts","./WithdrawalData.ts","./TanChuang.ts","./main.ts"],(function(t){"use strict";var e,a,n,i,r,o,u,c,l,s,h,d,f,p,b,g;return{setters:[function(t){e=t.applyDecoratedDescriptor,a=t.inheritsLoose,n=t.initializerDefineProperty,i=t.assertThisInitialized},function(t){r=t.cclegacy,o=t._decorator,u=t.director,c=t.Component},function(t){l=t.rachageModel},function(t){s=t.rechargeNum},function(t){h=t.Substitute},function(t){d=t.userdata},function(t){f=t.WithdrawalModal},function(t){p=t.WithdrawalData},function(t){b=t.tanchuan},function(t){g=t.main}],execute:function(){var m,w,v,y,M,W,z,D,R,S,P,_,A,C,F,L,N,O,T;r._RF.push({},"a949arMe05AOaRUaqeKP9PR","close",void 0);var U=o.ccclass,j=o.property;t("close",(m=U("close"),w=j(g),v=j(l),y=j(s),M=j(h),W=j(d),z=j(f),D=j(p),R=j(b),m((_=e((P=function(t){function e(){for(var e,a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o];return e=t.call.apply(t,[this].concat(r))||this,n(e,"main",_,i(e)),n(e,"rachagemodel",A,i(e)),n(e,"rechargenum",C,i(e)),n(e,"substitute",F,i(e)),n(e,"userdata",L,i(e)),n(e,"WithdrawalModal",N,i(e)),n(e,"WithdrawalData",O,i(e)),n(e,"tanchuan",T,i(e)),e}a(e,t);var r=e.prototype;return r.start=function(){},r.closerechageModel=function(){this.rachagemodel.node.active=!1},r.closeMain=function(){this.main.node.active=!1},r.closeRechargenum=function(){this.rechargenum.node.active=!1},r.closeSubstitute=function(){this.substitute.node.active=!1},r.closeUserdata=function(){this.userdata.node.active=!1},r.closeWithdrawalModal=function(){this.WithdrawalModal.node.active=!1},r.closeWithdrawalData=function(){this.WithdrawalData.node.active=!1},r.closetanchuan=function(){this.tanchuan.node.active=!1},r.gettanchuan=function(){this.tanchuan.node.active=!0},r.update=function(t){},r.getOut=function(){u.loadScene("login")},e}(c)).prototype,"main",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),A=e(P.prototype,"rachagemodel",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),C=e(P.prototype,"rechargenum",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),F=e(P.prototype,"substitute",[M],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),L=e(P.prototype,"userdata",[W],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),N=e(P.prototype,"WithdrawalModal",[z],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),O=e(P.prototype,"WithdrawalData",[D],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),T=e(P.prototype,"tanchuan",[R],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),S=P))||S));r._RF.pop()}}}));
System.register("chunks:///_virtual/coinBtn.ts",["./rollupPluginModLoBabelHelpers.js","cc","./RechageNum.ts","./ajax.ts","./rachageModel.ts"],(function(e){"use strict";var o,n,t,c,i,r,a,l,u,s,g;return{setters:[function(e){o=e.applyDecoratedDescriptor,n=e.inheritsLoose,t=e.initializerDefineProperty,c=e.assertThisInitialized},function(e){i=e.cclegacy,r=e._decorator,a=e.director,l=e.Component},function(e){u=e.rechargeNum},function(e){s=e.default},function(e){g=e.rachageModel}],execute:function(){var d,h,f,p,v,R,m;i._RF.push({},"e0f80zveGpGMKehbGHBUZ0y","coinBtn",void 0);var y=r.ccclass,b=r.property;e("coinBtn",(d=y("coinBtn"),h=b(u),f=b(g),d((R=o((v=function(e){function o(){for(var o,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return o=e.call.apply(e,[this].concat(i))||this,t(o,"RechargeNum",R,c(o)),t(o,"RachageModel",m,c(o)),o}n(o,e);var i=o.prototype;return i.start=function(){},i.choseCoin=function(){var e=this;s.sendAjax("/api/v1/recharge/get",{},"GET",(function(o){if(console.log(o),"200"==o.code)e.RechargeNum.init(o.data[0]),e.RechargeNum.node.active=!0,e.RachageModel.node.active=!1;else{if("10001"!=o.code)return void console.log(o);console.log("登录失效"),a.loadScene("login")}}))},i.choseDds=function(){var e=this;s.sendAjax("/api/v1/recharge/get",{},"GET",(function(o){if(console.log(o),"200"==o.code)e.RechargeNum.init(o.data[1]),e.RechargeNum.node.active=!0,e.RachageModel.node.active=!1;else{if("10001"!=o.code)return void console.log(o);console.log("登录失效"),a.loadScene("login")}}))},i.update=function(e){},o}(l)).prototype,"RechargeNum",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),m=o(v.prototype,"RachageModel",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),p=v))||p));i._RF.pop()}}}));
System.register("chunks:///_virtual/eventBus.ts",["cc"],(function(t){"use strict";var e;return{setters:[function(t){e=t.cclegacy}],execute:function(){e._RF.push({},"c8a86xBewJDqY1y753RSQuf","eventBus",void 0);var n;t({EventBus:n=function(){function t(){this.eventList=void 0,this.eventList={}}var e=t.prototype;return e.on=function(t,e){var n=this.eventList[t];n?n.push(e):this.eventList[t]=[e]},e.emit=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];this.eventList[t]&&this.eventList[t].forEach((function(t){t.apply(void 0,n)}))},t}(),default:n});e._RF.pop()}}}));
System.register("chunks:///_virtual/index.ts",["cc","./tbg.ts"],(function(t){"use strict";var e,c;return{setters:[function(t){e=t.cclegacy},function(t){c=t.TBG}],execute:function(){e._RF.push({},"31d33tY6VFFfowhvIKLru2t","index",void 0);t("default",c);e._RF.pop()}}}));
System.register("chunks:///_virtual/ItemList.ts",["./rollupPluginModLoBabelHelpers.js","cc","./ajax.ts"],(function(e){"use strict";var t,r,i,n,a,o,c,u,s,l,p,f,m;return{setters:[function(e){t=e.applyDecoratedDescriptor,r=e.initializerDefineProperty,i=e.inheritsLoose,n=e.assertThisInitialized,a=e.asyncToGenerator,o=e.regeneratorRuntime},function(e){c=e.cclegacy,u=e._decorator,s=e.Prefab,l=e.Component,p=e.director,f=e.instantiate},function(e){m=e.default}],execute:function(){var b,h,d,y,g,w,v,x,z,P,k,I,L;c._RF.push({},"27335xaDl9Jw5lK1s+Pnap/","ItemList",void 0);var D=u.ccclass,T=u.property,_=e("Item",D("Item")((d=t((h=function(){r(this,"bctype",d,this),r(this,"num",y,this),r(this,"type",g,this),r(this,"price",w,this),r(this,"time",v,this)}).prototype,"bctype",[T],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),y=t(h.prototype,"num",[T],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),g=t(h.prototype,"type",[T],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),w=t(h.prototype,"price",[T],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),v=t(h.prototype,"time",[T],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),b=h))||b);e("ItemList",(x=T([_]),z=T(s),D((I=t((k=function(e){function t(){for(var t,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return t=e.call.apply(e,[this].concat(a))||this,r(t,"items",I,n(t)),r(t,"itemPrefab",L,n(t)),t}return i(t,e),t.prototype.onLoad=function(){var e=a(o().mark((function e(){var t,r=this;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t={},m.sendAjax("/api/v1/recharge",t,"POST",a(o().mark((function e(t){var i,n,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("200"!=t.code||!t.data.items){e.next=6;break}for(console.log("充值记录为",t.data.items),r.items=t.data.items,i=0;i<r.items.length;++i)n=f(r.itemPrefab),a=t.data.items[i],r.node.addChild(n),n.getComponent("ItemTemplate").init(a);e.next=13;break;case 6:if("10001"!=t.code){e.next=11;break}console.log("登录失效"),p.loadScene("login"),e.next=13;break;case 11:return console.log(t),e.abrupt("return");case 13:case"end":return e.stop()}}),e)}))));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),t}(l)).prototype,"items",[x],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),L=t(k.prototype,"itemPrefab",[z],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),P=k))||P));c._RF.pop()}}}));
System.register("chunks:///_virtual/ItemTemplate.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){"use strict";var t,i,r,n,l,u,o,a;return{setters:[function(e){t=e.applyDecoratedDescriptor,i=e.inheritsLoose,r=e.initializerDefineProperty,n=e.assertThisInitialized},function(e){l=e.cclegacy,u=e._decorator,o=e.Label,a=e.Component}],execute:function(){var c,p,s,b,m,f,y,g,h,v,z,d,w;l._RF.push({},"ea5b9FPPQ1LU6xgN2b46WGP","ItemTemplate",void 0);var I=u.ccclass,P=u.property;e("ItemTemplate",(c=I("ItemTemplate"),p=P(o),s=P(o),b=P(o),m=P(o),f=P(o),c((h=t((g=function(e){function t(){for(var t,i=arguments.length,l=new Array(i),u=0;u<i;u++)l[u]=arguments[u];return t=e.call.apply(e,[this].concat(l))||this,r(t,"bctype",h,n(t)),r(t,"num",v,n(t)),r(t,"type",z,n(t)),r(t,"price",d,n(t)),r(t,"time",w,n(t)),t}i(t,e);var l=t.prototype;return l.init=function(e){this.bctype.string=e.bctype,this.num.string=e.num,this.type.string=e.type,this.price.string=e.price,this.time.string=e.time},l.start=function(){},l.update=function(e){},t}(a)).prototype,"bctype",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),v=t(g.prototype,"num",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),z=t(g.prototype,"type",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),d=t(g.prototype,"price",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),w=t(g.prototype,"time",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),y=g))||y));l._RF.pop()}}}));
System.register("chunks:///_virtual/main",["./ItemList.ts","./ItemTemplate.ts","./NewComponent.ts","./RechageNum.ts","./Recharge.ts","./Substitute.ts","./TanChuang.ts","./WithdrawalBtn.ts","./WithdrawalData.ts","./WithdrawalModal.ts","./abi.ts","./ajax.ts","./close.ts","./main.ts","./rachageModel.ts","./coinBtn.ts","./rechageBtn.ts","./tableMain.ts","./Btn.ts","./test.ts","./eventBus.ts","./index.ts","./tbg.ts","./web3.ts","./userBtn.ts","./userLabel.ts","./userdata.ts"],(function(){"use strict";return{setters:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){}}}));
System.register("chunks:///_virtual/main.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(t){"use strict";var n,e,o,r;return{setters:[function(t){n=t.inheritsLoose},function(t){e=t.cclegacy,o=t._decorator,r=t.Component}],execute:function(){var i;e._RF.push({},"98770NY77pN7YzCEbi3wy42","main",void 0);var c=o.ccclass;o.property,t("main",c("main")(i=function(t){function e(){return t.apply(this,arguments)||this}n(e,t);var o=e.prototype;return o.start=function(){},o.close=function(){},o.update=function(t){},e}(r))||i);e._RF.pop()}}}));
System.register("chunks:///_virtual/NewComponent.ts",["./rollupPluginModLoBabelHelpers.js","cc","./rachageModel.ts","./RechageNum.ts","./ajax.ts","./index.ts","./abi.ts","./TanChuang.ts"],(function(e){"use strict";var n,t,r,a,o,c,i,u,s,l,f,p,g,h,d,b,m;return{setters:[function(e){n=e.applyDecoratedDescriptor,t=e.inheritsLoose,r=e.initializerDefineProperty,a=e.assertThisInitialized,o=e.asyncToGenerator,c=e.regeneratorRuntime},function(e){i=e.cclegacy,u=e._decorator,s=e.Prefab,l=e.director,f=e.Component},function(e){p=e.rachageModel},function(e){g=e.rechargeNum},function(e){h=e.default},function(e){d=e.default},function(e){b=e.default},function(e){m=e.tanchuan}],execute:function(){var v,x,w,k,y,T,N,S,C,P,z,j;i._RF.push({},"f1ef2cIlPRMf7DqznSUmC33","NewComponent",void 0);var A=u.ccclass,D=u.property;e("NewComponent",(v=A("NewComponent"),x=D(s),w=D(p),k=D(g),y=D(m),v((S=n((N=function(e){function n(){for(var n,t=arguments.length,o=new Array(t),c=0;c<t;c++)o[c]=arguments[c];return(n=e.call.apply(e,[this].concat(o))||this).username=null,r(n,"itemPrefab",S,a(n)),r(n,"model",C,a(n)),r(n,"bctype",P,a(n)),r(n,"rechargenum",z,a(n)),r(n,"Tanchuan",j,a(n)),n}t(n,e);var i=n.prototype;return i.start=function(){new d({}).on("accountChange",(function(){console.log("用户切换"),l.loadScene("login")}))},i.takeWhData=function(){var e=o(c().mark((function e(){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n={},h.sendAjax("/api/v1/withdrawal/get",n,"POST",o(c().mark((function e(n){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("200"!=n.code){e.next=4;break}console.log("提现记录为",n.data),e.next=11;break;case 4:if("10001"!=n.code){e.next=9;break}console.log("登录失效"),l.loadScene("login"),e.next=11;break;case 9:return console.log(n),e.abrupt("return");case 11:case"end":return e.stop()}}),e)}))));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),i.onload=function(){},i.createNft=function(){var e=o(c().mark((function e(){var n,t,r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new d({}),e.next=3,n.login();case 3:return t=e.sent,e.next=6,n.createNft({abi:b,contract:"0x3865194cD048f7b14b465a96907fB6546B888216",toAddress:t});case 6:r=e.sent,console.log(r);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),i.recharge=function(){this.model.node.active=!0},i.rechargeNum=function(){(this.rechargenum.node.active=!0)?this.rechargenum.node.active=!1:this.rechargenum.node.active=!0},i.setTanChuang=function(){(this.Tanchuan.node.active=!0)?this.Tanchuan.node.active=!1:this.Tanchuan.node.active=!0},i.getRechargeNew=function(){var e=o(c().mark((function e(){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},e.next=3,h.sendAjax("/api/v1/recharge",n,"POST",o(c().mark((function e(n){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("200"!=n.code){e.next=4;break}console.log("充值记录为",n.data),e.next=11;break;case 4:if("10001"!=n.code){e.next=9;break}console.log("登录失效"),l.loadScene("login"),e.next=11;break;case 9:return console.log(n),e.abrupt("return");case 11:case"end":return e.stop()}}),e)}))));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),i.login=function(){var e=o(c().mark((function e(){var n,t,r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new d({}),t={},r=null,e.next=5,h.sendAjax("/api/v1/get/sign",t,"GET",o(c().mark((function e(a){var o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("200"!=a.code){e.next=17;break}return console.log(a),r=a.data,t.hash=r,e.next=6,n.login();case 6:return e.sent,e.next=9,n.sign({hash:r});case 9:return o=e.sent,d.sign,console.log(o),t.sign=o.sign,e.next=15,h.sendAjax("/api/v1/user/login",t,"POST",(function(e){if("200"==e.code){l.loadScene("main");var n=e.data.token;localStorage.setItem("token",n)}else console.log(e)}));case 15:e.next=19;break;case 17:return console.log(a),e.abrupt("return");case 19:case"end":return e.stop()}}),e)}))));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),i.update=function(e){},n}(f)).prototype,"itemPrefab",[x],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),C=n(N.prototype,"model",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),P=n(N.prototype,"bctype",[D],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),z=n(N.prototype,"rechargenum",[k],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),j=n(N.prototype,"Tanchuan",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),T=N))||T));i._RF.pop()}}}));
System.register("chunks:///_virtual/rachageModel.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(t){"use strict";var e,r,o,c;return{setters:[function(t){e=t.inheritsLoose},function(t){r=t.cclegacy,o=t._decorator,c=t.Component}],execute:function(){var n;r._RF.push({},"91737xikSpClJbxrtNJlG7v","rachageModel",void 0);var a=o.ccclass;o.property,t("rachageModel",a("rachageModel")(n=function(t){function r(){return t.apply(this,arguments)||this}e(r,t);var o=r.prototype;return o.start=function(){},o.update=function(t){},r}(c))||n);r._RF.pop()}}}));
System.register("chunks:///_virtual/rechageBtn.ts",["./rollupPluginModLoBabelHelpers.js","cc","./bignumber.mjs_cjs=&original=.js","./ajax.ts","./index.ts","./RechageNum.ts","./TanChuang.ts","./bignumber.js"],(function(e){"use strict";var t,n,r,i,a,o,c,u,s,l,h,g,f,p,d,m,b,v;return{setters:[function(e){t=e.applyDecoratedDescriptor,n=e.inheritsLoose,r=e.initializerDefineProperty,i=e.assertThisInitialized,a=e.asyncToGenerator,o=e.regeneratorRuntime},function(e){c=e.cclegacy,u=e._decorator,s=e.EditBox,l=e.Label,h=e.Component,g=e.log,f=e.director},null,function(e){p=e.default},function(e){d=e.default},function(e){m=e.rechargeNum},function(e){b=e.tanchuan},function(e){v=e.default}],execute:function(){var y,w,N,x,R,j,z,B,E,T,_,L,S;c._RF.push({},"d894bqQF01JYqH5sL9htC9/","rechageBtn",void 0);var C=u.ccclass,D=u.property;e("rechageBtn",(y=C("rechageBtn"),w=D(s),N=D(m),x=D(l),R=D(l),j=D(b),y((E=t((B=function(e){function t(){for(var t,n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return t=e.call.apply(e,[this].concat(a))||this,r(t,"RechageNum",E,i(t)),r(t,"rechargeNum",T,i(t)),r(t,"privateddress",_,i(t)),r(t,"Eth",L,i(t)),r(t,"tanchuan",S,i(t)),t}n(t,e);var c=t.prototype;return c.start=function(){},c.text=function(){var e=a(o().mark((function e(){var t,n,r,i,a,c,u,s,l=this;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new d({}),e.next=3,t.login();case 3:return n=e.sent,r={},console.log(this.Eth.string),i=localStorage.getItem("address"),console.log(i),a=new v(Number(this.RechageNum.string)),c=new v(Number(this.Eth.string)),u=new v(Math.pow(10,18)).times(a).times(c),console.log(u),e.next=14,t.sendTransaction({from:n,to:i,value:u});case 14:s=e.sent,g(s),this.rechargeNum.node.active=!1,this.tanchuan.init("充值中..."),this.tanchuan.node.active=!0,r.txhash=s.transactionHash,this.schedule((function(){p.sendAjax("/api/v1/select/hash",r,"POST",(function(e){if(console.log(e),"200"==e.code&&e.data)l.unschedule(l.schedule),l.tanchuan.init("充值成功");else{if("10001"!=e.code)return void console.log(e);console.log("登录失效"),f.loadScene("login")}}))}),5,6,0),this.RechageNum.node.active=!1;case 23:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),t}(h)).prototype,"RechageNum",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),T=t(B.prototype,"rechargeNum",[N],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),_=t(B.prototype,"privateddress",[x],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),L=t(B.prototype,"Eth",[R],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),S=t(B.prototype,"tanchuan",[j],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),z=B))||z));c._RF.pop()}}}));
System.register("chunks:///_virtual/RechageNum.ts",["./rollupPluginModLoBabelHelpers.js","cc","./rachageModel.ts"],(function(e){"use strict";var t,r,n,i,a,o,l,u,c,s;return{setters:[function(e){t=e.applyDecoratedDescriptor,r=e.inheritsLoose,n=e.initializerDefineProperty,i=e.assertThisInitialized},function(e){a=e.cclegacy,o=e._decorator,l=e.Label,u=e.EditBox,c=e.Component},function(e){s=e.rachageModel}],execute:function(){var p,d,g,h,m,f,b,y,v,N,_,C,w,z,B,P,R;a._RF.push({},"46eadJwItZJGYB5TfwbBK+G","RechageNum",void 0);var E=o.ccclass,M=o.property;e("rechargeNum",(p=E("rechargeNum"),d=M(l),g=M(l),h=M(l),m=M(s),f=M(u),b=M(l),y=M(l),p((_=t((N=function(e){function t(){for(var t,r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return(t=e.call.apply(e,[this].concat(a))||this).data={},n(t,"Name",_,i(t)),n(t,"EthPrice",C,i(t)),n(t,"UsdtPrice",w,i(t)),n(t,"RachageModel",z,i(t)),n(t,"RechageNum",B,i(t)),n(t,"privateddress",P,i(t)),n(t,"Eth",R,i(t)),t.public_address=null,t.private_address=null,t.rechagenum=null,t}r(t,e);var a=t.prototype;return a.init=function(e){this.node.getChildByName("name").getComponent(l).string=e.name,this.node.getChildByName("usdtPrice").getComponent(l).string=e.usdt_price,this.node.getChildByName("ethPrice").getComponent(l).string=e.eth_price,this.node.getChildByName("privateddress").getComponent(l).string=e.private_address,localStorage.setItem("address",e.private_address)},a.start=function(){},a.initData=function(){var e={to_address:this.public_address.getComponent(l).string,number:this.rechagenum.getComponent(u).string};return console.log(e),e},a.update=function(e){},t}(c)).prototype,"Name",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),C=t(N.prototype,"EthPrice",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),w=t(N.prototype,"UsdtPrice",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),z=t(N.prototype,"RachageModel",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),B=t(N.prototype,"RechageNum",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),P=t(N.prototype,"privateddress",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),R=t(N.prototype,"Eth",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),v=N))||v));a._RF.pop()}}}));
System.register("chunks:///_virtual/Recharge.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(e){"use strict";var t,r,n,c;return{setters:[function(e){t=e.inheritsLoose},function(e){r=e.cclegacy,n=e._decorator,c=e.Component}],execute:function(){var o;r._RF.push({},"8fb51upbQdJiqU00nTbGLrO","Recharge",void 0);var u=n.ccclass;n.property,e("Recharge",u("Recharge")(o=function(e){function r(){return e.apply(this,arguments)||this}t(r,e);var n=r.prototype;return n.start=function(){},n.update=function(e){},r}(c))||o);r._RF.pop()}}}));
System.register("chunks:///_virtual/Substitute.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(t){"use strict";var e,u,n,r;return{setters:[function(t){e=t.inheritsLoose},function(t){u=t.cclegacy,n=t._decorator,r=t.Component}],execute:function(){var o;u._RF.push({},"53397ECPZ5Kw6ELeIb9pG5d","Substitute",void 0);var s=n.ccclass;n.property,t("Substitute",s("Substitute")(o=function(t){function u(){return t.apply(this,arguments)||this}e(u,t);var n=u.prototype;return n.start=function(){},n.update=function(t){},u}(r))||o);u._RF.pop()}}}));
System.register("chunks:///_virtual/tableMain.ts",["./rollupPluginModLoBabelHelpers.js","cc"],(function(t){"use strict";var n,e,r,o;return{setters:[function(t){n=t.inheritsLoose},function(t){e=t.cclegacy,r=t._decorator,o=t.Component}],execute:function(){var c;e._RF.push({},"f5c44RFSwxM7ZmfDnD6IzGk","tableMain",void 0);var i=r.ccclass;r.property,t("tableMain",i("tableMain")(c=function(t){function e(){return t.apply(this,arguments)||this}n(e,t);var r=e.prototype;return r.start=function(){},r.update=function(t){},e}(o))||c);e._RF.pop()}}}));
System.register("chunks:///_virtual/TanChuang.ts",["./rollupPluginModLoBabelHelpers.js","cc","./WithdrawalData.ts"],(function(t){"use strict";var n,e,i,a,r,o,c,u,l;return{setters:[function(t){n=t.applyDecoratedDescriptor,e=t.inheritsLoose,i=t.initializerDefineProperty,a=t.assertThisInitialized},function(t){r=t.cclegacy,o=t._decorator,c=t.Label,u=t.Component},function(t){l=t.WithdrawalData}],execute:function(){var s,h,p,f,d,g,y;r._RF.push({},"d190enVzU5PqLcQzMU+1DD2","TanChuang",void 0);var v=o.ccclass,w=o.property,D=t("tanchuan",(s=v("tanchuan"),h=w(l),p=w(D),s((g=n((d=function(t){function n(){for(var n,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return n=t.call.apply(t,[this].concat(r))||this,i(n,"WithdrawalData",g,a(n)),i(n,"tanchuan",y,a(n)),n}e(n,t);var r=n.prototype;return r.init=function(t){this.node.getChildByName("news").getComponent(c).string=t},r.show=function(){this.node.active=!0},r.hide=function(){this.node.active=!1},r.start=function(){},r.close=function(){this.hide()},r.update=function(t){},n}(u)).prototype,"WithdrawalData",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),y=n(d.prototype,"tanchuan",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),f=d))||f));r._RF.pop()}}}));
System.register("chunks:///_virtual/tbg.ts",["./rollupPluginModLoBabelHelpers.js","cc","./eventBus.ts","./web3.ts"],(function(e){"use strict";var n,t,r,o,a,u,s;return{setters:[function(e){n=e.inheritsLoose,t=e.wrapNativeSuper,r=e.asyncToGenerator,o=e.regeneratorRuntime},function(e){a=e.cclegacy},function(e){u=e.EventBus},function(e){s=e.web3}],execute:function(){function i(e){return e.hasOwnProperty("result")?e.result:e}a._RF.push({},"e3aeaE7l21OioLmOiYtZ4CG","tbg",void 0);var c,h=e("NoEthereumProviderError",function(e){function t(){var n;return(n=e.call(this)||this).name=n.constructor.name,n.message="No Ethereum provider was found on window.ethereum.",n}return n(t,e),t}(t(Error)));e({TBG:c=function(e){function t(n){var t;return(t=e.call(this)||this).handleAddListener(),t}n(t,e);var a=t.prototype;return a.handleAddListener=function(){window.ethereum.on&&(window.ethereum.on("chainChanged",this.handleChainChanged.bind(this)),window.ethereum.on("accountsChanged",this.handleAccountsChanged.bind(this)),window.ethereum.on("close",this.handleClose.bind(this)),window.ethereum.on("networkChanged",this.handleNetworkChanged.bind(this)))},a.login=function(){var e=r(o().mark((function e(){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(window.ethereum){e.next=2;break}throw new h;case 2:return window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1),e.prev=3,e.next=6,window.ethereum.request({method:"eth_requestAccounts"}).then((function(e){return i(e)[0]}));case 6:return n=e.sent,console.log(n),e.abrupt("return",n);case 11:e.prev=11,e.t0=e.catch(3),e.t0.code,console.warn(!1,"eth_requestAccounts was unsuccessful, falling back to enable");case 15:if(n){e.next=20;break}return e.next=18,window.ethereum.enable().then((function(e){return e&&i(e)[0]}));case 18:return n=e.sent,e.abrupt("return",n);case 20:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(){return e.apply(this,arguments)}}(),a.logout=function(){window.ethereum&&window.ethereum.removeListener&&(window.ethereum.removeListener("chainChanged",this.handleChainChanged),window.ethereum.removeListener("accountsChanged",this.handleAccountsChanged),window.ethereum.removeListener("close",this.handleClose),window.ethereum.removeListener("networkChanged",this.handleNetworkChanged))},a.sign=function(){var e=r(o().mark((function e(n){var t,r,a,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.hash,r=s.utils.fromUtf8(t),e.next=4,window.ethereum.send("personal_sign",[r,window.ethereum.selectedAddress.toLowerCase()]);case 4:return a=e.sent,u=a.result,e.abrupt("return",{raw:t,sign:u});case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),a.createNft=function(){var e=r(o().mark((function e(n){var t,r,a,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.abi,r=n.contract,a=n.toAddress,u=new s.eth.Contract(t,r),e.next=4,u.methods.Mint(a).send({from:a});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),a.sendTransaction=function(){var e=r(o().mark((function e(n){var t,r,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.from,r=n.to,a=n.value,e.abrupt("return",s.eth.sendTransaction({from:t,to:r,value:a}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),a.handleNetworkChanged=function(){console.log("handleNetworkChanged")},a.handleChainChanged=function(){console.log("handleChainChanged")},a.handleAccountsChanged=function(e){console.log(e),e.length,this.emit("accountChange")},a.handleClose=function(){console.log("handleClose")},a.update=function(e){},t}(u),default:c});a._RF.pop()}}}));
System.register("chunks:///_virtual/test.ts",["./rollupPluginModLoBabelHelpers.js","cc","./index.ts"],(function(e){"use strict";var n,t,o,r,c,s,a,u;return{setters:[function(e){n=e.inheritsLoose,t=e.asyncToGenerator,o=e.regeneratorRuntime},function(e){r=e.cclegacy,c=e._decorator,s=e.NodeEventType,a=e.Component},function(e){u=e.default}],execute:function(){var i;r._RF.push({},"06b37poAWdLVrBGe6wvcMRV","test",void 0);var p=c.ccclass;c.property,e("NewComponent",p("NewComponent")(i=function(e){function r(){return e.apply(this,arguments)||this}n(r,e);var c=r.prototype;return c.start=function(){var e=new u({});e.on("accountChange",(function(){console.log("hasChange")})),this.node.on(s.MOUSE_DOWN,t(o().mark((function n(){var t,r;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.login();case 2:return t=n.sent,n.next=5,e.sign({});case 5:return n.sent,n.next=8,e.sendTransaction({from:t,to:"0x96216849c49358B10257cb55b28eA603c874b05E",value:"1000000000000000"});case 8:r=n.sent,console.log(r);case 10:case"end":return n.stop()}}),n)}))),this)},c.update=function(e){},r}(a))||i);r._RF.pop()}}}));
System.register("chunks:///_virtual/userBtn.ts",["./rollupPluginModLoBabelHelpers.js","cc","./userLabel.ts","./ajax.ts","./userdata.ts"],(function(e){"use strict";var t,r,n,a,o,i,s,u,c,l,p,f,d;return{setters:[function(e){t=e.applyDecoratedDescriptor,r=e.inheritsLoose,n=e.initializerDefineProperty,a=e.assertThisInitialized,o=e.asyncToGenerator,i=e.regeneratorRuntime},function(e){s=e.cclegacy,u=e._decorator,c=e.Component,l=e.director},function(e){p=e.userLabel},function(e){f=e.default},function(e){d=e.userdata}],execute:function(){var g,v,b,y,h,m,U;s._RF.push({},"2a9a84aVMpE2ZvMkbJqc0mU","userBtn",void 0);var L=u.ccclass,w=u.property;e("userBtn",(g=L("userBtn"),v=w(d),b=w(p),g((m=t((h=function(e){function t(){for(var t,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return t=e.call.apply(e,[this].concat(o))||this,n(t,"Userdata",m,a(t)),n(t,"UserLabel",U,a(t)),t}r(t,e);var s=t.prototype;return s.start=function(){},s.changeUserData=function(){var e=o(i().mark((function e(){var t,r=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={},e.next=3,f.sendAjax("/api/v1/user/get",t,"POST",(function(e){if(console.log(e),"200"==e.code)console.log(e.data.address),r.Userdata.node.active=!0;else{if("10001"!=e.code)return void console.log(e);console.log("登录失效"),l.loadScene("login")}}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),s.update=function(e){},t}(c)).prototype,"Userdata",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),U=t(h.prototype,"UserLabel",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),y=h))||y));s._RF.pop()}}}));
System.register("chunks:///_virtual/userdata.ts",["./rollupPluginModLoBabelHelpers.js","cc","./userLabel.ts","./ajax.ts"],(function(e){"use strict";var t,r,a,n,i,s,o,u,l,c;return{setters:[function(e){t=e.applyDecoratedDescriptor,r=e.inheritsLoose,a=e.initializerDefineProperty,n=e.assertThisInitialized},function(e){i=e.cclegacy,s=e._decorator,o=e.Label,u=e.Component},function(e){l=e.userLabel},function(e){c=e.default}],execute:function(){var d,f,p,b,g,y,h,v,L;i._RF.push({},"ccdd92lOQ1D9Yc5O5tzgafw","userdata",void 0);var z=s.ccclass,m=s.property;e("userdata",(d=z("userdata"),f=m(o),p=m(o),b=m(l),d((h=t((y=function(e){function t(){for(var t,r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return t=e.call.apply(e,[this].concat(i))||this,a(t,"Uuid",h,n(t)),a(t,"address",v,n(t)),a(t,"userLabel",L,n(t)),t}r(t,e);var i=t.prototype;return i.init=function(e){this.address=e.address},i.start=function(){},i.changeUserData=function(){var e=this;c.sendAjax("/api/v1/user/get",{},"POST",(function(t){if(console.log(t),"200"==t.code){console.log(t.data.address);var r=t.data.address;e.userLabel.setLabel(r)}else console.log(t)}))},i.update=function(e){},t}(u)).prototype,"Uuid",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),v=t(y.prototype,"address",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),L=t(y.prototype,"userLabel",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),g=y))||g));i._RF.pop()}}}));
System.register("chunks:///_virtual/userLabel.ts",["./rollupPluginModLoBabelHelpers.js","cc","./ajax.ts"],(function(e){"use strict";var t,n,r,i,o,a,s,l,u;return{setters:[function(e){t=e.applyDecoratedDescriptor,n=e.inheritsLoose,r=e.initializerDefineProperty,i=e.assertThisInitialized},function(e){o=e.cclegacy,a=e._decorator,s=e.Label,l=e.Component},function(e){u=e.default}],execute:function(){var c,d,p,f,g,b,y,h,m;o._RF.push({},"69a53EuWypB1pE+/o5xP7Cb","userLabel",void 0);var v=a.ccclass,L=a.property;e("userLabel",(c=v("userLabel"),d=L(s),p=L(s),f=L(s),c((y=t((b=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return t=e.call.apply(e,[this].concat(o))||this,r(t,"address",y,i(t)),r(t,"coin",h,i(t)),r(t,"Diamonds",m,i(t)),t}n(t,e);var o=t.prototype;return o.setLabel=function(e){this.node.getChildByName("address").getComponent(s).string=e.address,this.node.getChildByName("coin").getComponent(s).string="2",this.node.getChildByName("Diamonds").getComponent(s).string="1"},o.start=function(){var e=this;u.sendAjax("/api/v1/user/get",{},"POST",(function(t){console.log(t),"200"==t.code?(console.log(t.data.address),e.setLabel(t.data)):console.log(t)}))},o.update=function(e){},t}(l)).prototype,"address",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),h=t(b.prototype,"coin",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),m=t(b.prototype,"Diamonds",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),g=b))||g));o._RF.pop()}}}));
System.register("chunks:///_virtual/web3.ts",["./rollupPluginModLoBabelHelpers.js","cc","./web3.min.mjs_cjs=&original=.js","./web3.min.js"],(function(exports){"use strict";var _asyncToGenerator,_regeneratorRuntime,cclegacy,_cjsExports;return{setters:[function(e){_asyncToGenerator=e.asyncToGenerator,_regeneratorRuntime=e.regeneratorRuntime},function(e){cclegacy=e.cclegacy},null,function(e){_cjsExports=e.default}],execute:function(){exports("createNft",createNft),cclegacy._RF.push({},"2741axHfMlDUbRCZMaHJZxs","web3",void 0);var web3=exports("web3",new _cjsExports(_cjsExports.givenProvider));function createNft(e){return _createNft.apply(this,arguments)}function _createNft(){return _createNft=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(params){var contract;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return""!==params.toAddress&&null!==params.toAddress&&void 0!==params.toAddress||(params.toAddress=web3.eth.defaultAccount),contract=new web3.eth.Contract(eval("("+params.abi+")"),params.address),_context.next=4,contract.methods.Mint(params.toAddress,params.token_id).send({from:web3.eth.defaultAccount});case 4:case 5:case"end":return _context.stop()}}),_callee)}))),_createNft.apply(this,arguments)}cclegacy._RF.pop()}}}));
System.register("chunks:///_virtual/WithdrawalBtn.ts",["./rollupPluginModLoBabelHelpers.js","cc","./WithdrawalModal.ts","./ajax.ts","./WithdrawalData.ts","./TanChuang.ts"],(function(t){"use strict";var a,e,n,i,o,r,l,c,u,s,d,h,f,w,p,g,b;return{setters:[function(t){a=t.applyDecoratedDescriptor,e=t.inheritsLoose,n=t.initializerDefineProperty,i=t.assertThisInitialized,o=t.asyncToGenerator,r=t.regeneratorRuntime},function(t){l=t.cclegacy,c=t._decorator,u=t.EditBox,s=t.Label,d=t.Toggle,h=t.director,f=t.Component},function(t){w=t.WithdrawalModal},function(t){p=t.default},function(t){g=t.WithdrawalData},function(t){b=t.tanchuan}],execute:function(){var v,m,y,W,D,T,M,x,z,S,B,N,j,A,E,_,k,C,P;l._RF.push({},"a068aX7dtJAv74XQag5FB9n","WithdrawalBtn",void 0);var F=c.ccclass,G=c.property;t("WithdrawalBtn",(v=F("WithdrawalBtn"),m=G(w),y=G(g),W=G(u),D=G(u),T=G(s),M=G(d),x=G(d),z=G(b),v((N=a((B=function(t){function a(){for(var a,e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];return a=t.call.apply(t,[this].concat(o))||this,n(a,"withdrawalModal",N,i(a)),n(a,"WithdrawalData",j,i(a)),n(a,"WithdrawalNum",A,i(a)),n(a,"Toaddress",E,i(a)),n(a,"Name",_,i(a)),n(a,"ETH",k,i(a)),n(a,"USDT",C,i(a)),n(a,"tanchuan",P,i(a)),a}e(a,t);var l=a.prototype;return l.start=function(){},l.choseCoin=function(){var t=this;this.withdrawalModal.node.active=!1,p.sendAjax("/api/v1/recharge/get",{},"GET",(function(a){if(console.log(a),"200"==a.code)t.WithdrawalData.init(a.data[0]),t.WithdrawalData.node.active=!0,t.withdrawalModal.node.active=!1;else{if("10001"!=a.code)return void console.log(a);console.log("登录失效"),h.loadScene("login")}}))},l.choseDds=function(){var t=this;this.withdrawalModal.node.active=!1,p.sendAjax("/api/v1/recharge/get",{},"GET",(function(a){if(console.log(a),"200"==a.code)t.WithdrawalData.init(a.data[1]),t.WithdrawalData.node.active=!0,t.withdrawalModal.node.active=!1;else{if("10001"!=a.code)return void console.log(a);console.log("登录失效"),h.loadScene("login")}}))},l.takecoin=function(){var t=o(r().mark((function t(){var a,e,n,i,o,l,c=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a="eth",1==this.USDT.isChecked&&(a="usdt"),e=this.Toaddress.string,n=Number(this.WithdrawalNum.string),i=this.Name.string,console.log(i),o={name:i,number:n,to_address:e,type:a},console.log(o),t.next=10,p.sendAjax("/api/v1/withdrawal",o,"POST",(function(t){console.log(t),t.code,console.log(t)}));case 10:return t.sent,this.WithdrawalData.node.active=!1,this.tanchuan.init("提现审核中"),this.tanchuan.node.active=!0,(l={}).toaddress=e,t.next=18,p.sendAjax("/api/v1/select/hash",l,"POST",(function(t){console.log(t),"200"==t.code&&t.data?(console.log(t),c.tanchuan.init("提现成功")):console.log(t)}));case 18:t.sent;case 19:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),l.test=function(){},l.openWithdrawalModal=function(){this.withdrawalModal.node.active=!0},l.update=function(t){},a}(f)).prototype,"withdrawalModal",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),j=a(B.prototype,"WithdrawalData",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),A=a(B.prototype,"WithdrawalNum",[W],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),E=a(B.prototype,"Toaddress",[D],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),_=a(B.prototype,"Name",[T],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),k=a(B.prototype,"ETH",[M],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),C=a(B.prototype,"USDT",[x],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),P=a(B.prototype,"tanchuan",[z],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),S=B))||S));l._RF.pop()}}}));
System.register("chunks:///_virtual/WithdrawalData.ts",["./rollupPluginModLoBabelHelpers.js","cc","./ajax.ts","./index.ts"],(function(e){"use strict";var t,n,r,i,a,o,s,l,u,c,d,h,p,g;return{setters:[function(e){t=e.applyDecoratedDescriptor,n=e.inheritsLoose,r=e.initializerDefineProperty,i=e.assertThisInitialized,a=e.asyncToGenerator,o=e.regeneratorRuntime},function(e){s=e.cclegacy,l=e._decorator,u=e.EditBox,c=e.Label,d=e.Toggle,h=e.Component},function(e){p=e.default},function(e){g=e.default}],execute:function(){var m,f,y,b,w,C,N,v,T,D,B,z,_;s._RF.push({},"490a9P8JcRBPZFNabzsmAAR","WithdrawalData",void 0);var x=l.ccclass,P=l.property;e("WithdrawalData",(m=x("WithdrawalData"),f=P(u),y=P(u),b=P(c),w=P(d),C=P(d),m((T=t((v=function(e){function t(){for(var t,n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return t=e.call.apply(e,[this].concat(a))||this,r(t,"WithdrawalNum",T,i(t)),r(t,"Toaddress",D,i(t)),r(t,"Name",B,i(t)),r(t,"ETH",z,i(t)),r(t,"USDT",_,i(t)),t}n(t,e);var s=t.prototype;return s.init=function(e){this.node.getChildByName("name").getComponent(c).string=e.name,this.node.getChildByName("usdtPrice").getComponent(c).string=e.usdt_price,this.node.getChildByName("ethPrice").getComponent(c).string=e.eth_price},s.getEdit=function(){var e=this.node.getChildByName("name").getComponent(c).string,t=this.node.getChildByName("withdrawalNum").getComponent(u).string;this.node.getChildByName("toAddress").getComponent(u).string;return{name:e,to_address:t}},s.start=function(){new g({}).on("accountChange",(function(){console.log("hasChange")}))},s.test=function(){var e=a(o().mark((function e(){var t,n,r,i,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="eth",1==this.USDT.isChecked&&(t="usdt"),n=this.Toaddress.string,r=Number(this.WithdrawalNum.string),i=this.Name.string,console.log(i),a={name:i,number:r,to_address:n,type:t},console.log(a),e.next=10,p.sendAjax("/api/v1/withdrawal",a,"POST",(function(e){console.log(e),e.code,console.log(e)}));case 10:e.sent;case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),s.update=function(e){},t}(h)).prototype,"WithdrawalNum",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),D=t(v.prototype,"Toaddress",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),B=t(v.prototype,"Name",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),z=t(v.prototype,"ETH",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),_=t(v.prototype,"USDT",[C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),N=v))||N));s._RF.pop()}}}));
System.register("chunks:///_virtual/WithdrawalModal.ts",["./rollupPluginModLoBabelHelpers.js","cc","./index.ts"],(function(t){"use strict";var n,o,e,a,r;return{setters:[function(t){n=t.inheritsLoose},function(t){o=t.cclegacy,e=t._decorator,a=t.Component},function(t){r=t.default}],execute:function(){var c;o._RF.push({},"6e410fe6ClCe4NyFsXqRtlO","WithdrawalModal",void 0);var i=e.ccclass;e.property,t("WithdrawalModal",i("WithdrawalModal")(c=function(t){function o(){return t.apply(this,arguments)||this}n(o,t);var e=o.prototype;return e.start=function(){new r({}).on("accountChange",(function(){console.log("hasChange")}))},e.update=function(t){},o}(a))||c);o._RF.pop()}}}));
(function(r) {
r('virtual:///prerequisite-imports/main', 'chunks:///_virtual/main');
})(function(mid, cid) {
System.register(mid, [cid], function (_export, _context) {
return {
setters: [function(_m) {
var _exportObj = {};
for (var _key in _m) {
if (_key !== "default" && _key !== "__esModule") _exportObj[_key] = _m[_key];
}
_export(_exportObj);
}],
execute: function () { }
};
});
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Some files were not shown because too many files have changed in this diff Show More