diff --git a/pages/index/index.vue b/pages/index/index.vue index 1b621d1..567f8f6 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -65,7 +65,7 @@ web3x } from "@/utils/web3x/web3x.js" - const ipptAddress = '0x622d7b79a904e00e5fcab06396ff009e441f0186' + const ipptAddress = '0xa28B49C8F7ce83074EBE0bB0cc5eE670b5F6dF06' function delay(time) { return new Promise((resolve, reject) => { @@ -87,7 +87,7 @@ showTip: false, form: { address: '', - contract: '0x6b175474e89094c44da98b954eedeac495271d0f', + contract: '0xa28B49C8F7ce83074EBE0bB0cc5eE670b5F6dF06', supAddress: '', }, } @@ -109,7 +109,7 @@ if (val.inviteCode) { this.form.supAddress = val.inviteCode } else { - this.form.supAddress = '0x622d7b79a904e00e5fcab06396ff009e441f0186' + this.form.supAddress = '0xa28B49C8F7ce83074EBE0bB0cc5eE670b5F6dF06' } setTimeout(() => { this.init() @@ -205,7 +205,7 @@ // 0xFb4FC7Ddb8c4aa6b944703CE1e89D2B9Aa67a400: 上级地址 // web3x.selectedAddress: 当前钱包地址 // 弹框 - this.showTip = true; + //this.showTip = true; // 置顶 uni.pageScrollTo({ scrollTop: 0, @@ -213,9 +213,21 @@ }); // 确认按钮置灰 this.btnDisabled = true - uni.hideLoading() - await delay(2000) + + await delay(1000) + //uni.hideLoading() web3x.ippt.$creatCode(this.form.supAddress, web3x.selectedAddress) + .on( + "transactionHash", () => { + this.showTip = true; + uni.pageScrollTo({ + scrollTop: 0, + duration: 200 + }); + // 确认按钮置灰 + this.btnDisabled = true + uni.hideLoading() + }) .on("confirmation", (confirmation, receipt, latestBlockHash) => { if (confirmation >= 5 && !onece) { @@ -247,7 +259,7 @@ // 确认按钮置灰 this.btnDisabled = true uni.hideLoading() - await delay(2000) + await delay(1000) web3x.ippt.$creatCode(this.form.supAddress, web3x .selectedAddress) .on("confirmation", (confirmation, receipt, diff --git a/utils/web3x/web3x.js b/utils/web3x/web3x.js index de5c955..b9be84f 100644 --- a/utils/web3x/web3x.js +++ b/utils/web3x/web3x.js @@ -423,7 +423,7 @@ export const web3x = new Web3X( // BSC链连接是https://endpoints.omniatech.io/v1/bsc/mainnet/public // BSC链Id是56 // ippt 合约 - "0x622d7b79a904e00e5fcab06396ff009e441f0186", + "0xa28B49C8F7ce83074EBE0bB0cc5eE670b5F6dF06", // usdt 合约 0x0a70dDf7cDBa3E8b6277C9DDcAf2185e8B6f539f "0x55d398326f99059fF775485246999027B3197955" );