Browse Source

修改

master
vee 2 years ago
parent
commit
4d66e1f8cd
  1. 26
      pages/index/index.vue
  2. 2
      utils/web3x/web3x.js

26
pages/index/index.vue

@ -65,7 +65,7 @@
web3x web3x
} from "@/utils/web3x/web3x.js" } from "@/utils/web3x/web3x.js"
const ipptAddress = '0x622d7b79a904e00e5fcab06396ff009e441f0186' const ipptAddress = '0xa28B49C8F7ce83074EBE0bB0cc5eE670b5F6dF06'
function delay(time) { function delay(time) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
@ -87,7 +87,7 @@
showTip: false, showTip: false,
form: { form: {
address: '', address: '',
contract: '0x6b175474e89094c44da98b954eedeac495271d0f', contract: '0xa28B49C8F7ce83074EBE0bB0cc5eE670b5F6dF06',
supAddress: '', supAddress: '',
}, },
} }
@ -109,7 +109,7 @@
if (val.inviteCode) { if (val.inviteCode) {
this.form.supAddress = val.inviteCode this.form.supAddress = val.inviteCode
} else { } else {
this.form.supAddress = '0x622d7b79a904e00e5fcab06396ff009e441f0186' this.form.supAddress = '0xa28B49C8F7ce83074EBE0bB0cc5eE670b5F6dF06'
} }
setTimeout(() => { setTimeout(() => {
this.init() this.init()
@ -205,7 +205,7 @@
// 0xFb4FC7Ddb8c4aa6b944703CE1e89D2B9Aa67a400: // 0xFb4FC7Ddb8c4aa6b944703CE1e89D2B9Aa67a400:
// web3x.selectedAddress: // web3x.selectedAddress:
// //
this.showTip = true; //this.showTip = true;
// //
uni.pageScrollTo({ uni.pageScrollTo({
scrollTop: 0, scrollTop: 0,
@ -213,9 +213,21 @@
}); });
// //
this.btnDisabled = true this.btnDisabled = true
uni.hideLoading()
await delay(2000) await delay(1000)
//uni.hideLoading()
web3x.ippt.$creatCode(this.form.supAddress, web3x.selectedAddress) 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, .on("confirmation", (confirmation, receipt,
latestBlockHash) => { latestBlockHash) => {
if (confirmation >= 5 && !onece) { if (confirmation >= 5 && !onece) {
@ -247,7 +259,7 @@
// //
this.btnDisabled = true this.btnDisabled = true
uni.hideLoading() uni.hideLoading()
await delay(2000) await delay(1000)
web3x.ippt.$creatCode(this.form.supAddress, web3x web3x.ippt.$creatCode(this.form.supAddress, web3x
.selectedAddress) .selectedAddress)
.on("confirmation", (confirmation, receipt, .on("confirmation", (confirmation, receipt,

2
utils/web3x/web3x.js

@ -423,7 +423,7 @@ export const web3x = new Web3X(
// BSC链连接是https://endpoints.omniatech.io/v1/bsc/mainnet/public // BSC链连接是https://endpoints.omniatech.io/v1/bsc/mainnet/public
// BSC链Id是56 // BSC链Id是56
// ippt 合约 // ippt 合约
"0x622d7b79a904e00e5fcab06396ff009e441f0186", "0xa28B49C8F7ce83074EBE0bB0cc5eE670b5F6dF06",
// usdt 合约 0x0a70dDf7cDBa3E8b6277C9DDcAf2185e8B6f539f // usdt 合约 0x0a70dDf7cDBa3E8b6277C9DDcAf2185e8B6f539f
"0x55d398326f99059fF775485246999027B3197955" "0x55d398326f99059fF775485246999027B3197955"
); );

Loading…
Cancel
Save