Browse Source

更新’

git commit -m 更新’
master
j1ack 2 years ago
parent
commit
dc25d7ad4c
  1. 25
      pages/index/index.vue

25
pages/index/index.vue

@ -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;

Loading…
Cancel
Save