|
|
@ -2,7 +2,7 @@ |
|
|
|
<view class="content"> |
|
|
|
<tab-bar /> |
|
|
|
<view class="container"> |
|
|
|
<view class="tip" v-if="showTip"> |
|
|
|
<view class="tip" :class="showTip?'tipShow':''"> |
|
|
|
提交成功,等待区块确认。 |
|
|
|
</view> |
|
|
|
<view class="top"> |
|
|
@ -156,12 +156,11 @@ |
|
|
|
.on("confirmation", (confirmation, receipt, |
|
|
|
latestBlockHash) => { |
|
|
|
if (confirmation >= 5) { |
|
|
|
this.showTip = true |
|
|
|
console.log("区块确认") |
|
|
|
uni.hideLoading() |
|
|
|
} |
|
|
|
}) |
|
|
|
// uni.$u.toast('提交成功,等待区块确认') |
|
|
|
// this.showTip = true |
|
|
|
// uni.hideLoading() |
|
|
|
} else { |
|
|
|
// 否则则需要重新授权为 0, 然后在进行极限授权 |
|
|
|
// 提示最小需授权 XXX USDT, 请取消授权后重新授权 |
|
|
@ -169,7 +168,7 @@ |
|
|
|
if (allowance == 0) { |
|
|
|
// 然后在进行极限授权 |
|
|
|
web3x.usdt.approveMAX(ipptAddress) |
|
|
|
.on("transactionHash", async () => { |
|
|
|
.on("transactionHash", () => { |
|
|
|
// console.log("调用极限授权") |
|
|
|
// 调用IPPT 合约绑定上级关系 |
|
|
|
// 0xFb4FC7Ddb8c4aa6b944703CE1e89D2B9Aa67a400: 上级地址 |
|
|
@ -179,11 +178,11 @@ |
|
|
|
latestBlockHash) => { |
|
|
|
if (confirmation >= 5) { |
|
|
|
console.log("区块确认") |
|
|
|
this.showTip = true |
|
|
|
uni.hideLoading() |
|
|
|
} |
|
|
|
}) |
|
|
|
// uni.$u.toast('提交成功,等待区块确认') |
|
|
|
// this.showTip = true |
|
|
|
// uni.hideLoading() |
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
uni.hideLoading() |
|
|
|
}) |
|
|
@ -200,8 +199,6 @@ |
|
|
|
// web3x.selectedAddress: 当前钱包地址 |
|
|
|
web3x.ippt.$creatCode(this.form.supAddress, web3x |
|
|
|
.selectedAddress) |
|
|
|
|
|
|
|
uni.$u.toast('提交成功,等待区块确认') |
|
|
|
this.showTip = true |
|
|
|
uni.hideLoading() |
|
|
|
}).catch(() => { |
|
|
@ -233,16 +230,22 @@ |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
.tip { |
|
|
|
opacity: 0; |
|
|
|
transition: .5s all; |
|
|
|
position: fixed; |
|
|
|
width: 100%; |
|
|
|
height: 70rpx; |
|
|
|
left: 50%; |
|
|
|
transform: translateX(-50%); |
|
|
|
top: 100rpx; |
|
|
|
top: 120rpx; |
|
|
|
padding: 14rpx 30rpx; |
|
|
|
color: #fff; |
|
|
|
background: radial-gradient(104.53% 5436.39% at -4.53% 16.35%, #7F97EC 3.77%, #8D6CEA 11.22%, #5944D7 24.63%, #2D2EA8 36.47%, #182390 63.92%, #16228E 100%); |
|
|
|
} |
|
|
|
.tipShow{ |
|
|
|
top: 100rpx; |
|
|
|
opacity: 1; |
|
|
|
} |
|
|
|
|
|
|
|
.m48 { |
|
|
|
margin-top: 48rpx; |
|
|
|