完善转账和充值
This commit is contained in:
@@ -93,10 +93,12 @@
|
||||
provider: 'wxpay',
|
||||
orderInfo: JSON.parse(res),
|
||||
success: res => {
|
||||
console.log(res)
|
||||
uni.redirectTo({
|
||||
url: './results?type=recharge'
|
||||
})
|
||||
},
|
||||
fail(err) {
|
||||
let showToast = err.message
|
||||
let showToast = err.errMsg
|
||||
if(err.errMsg === 'requestPayment:fail [payment微信:-2]User canceled'){
|
||||
showToast = '充值被取消'
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<view>
|
||||
<view class="vertical results">
|
||||
<uni-icons type="checkbox-filled" size="88" color="#34CE98"></uni-icons>
|
||||
<view class="title">交易已提交</view>
|
||||
<view class="sub-title">预计10秒内到账,可在交易记录中查询,以实际到账时间为准</view>
|
||||
<view class="hash">
|
||||
<view class="title">{{type !== 'recharge' ? '转账交易已提交' : '充值信息已提交'}}</view>
|
||||
<view class="sub-title">预计10秒内到账,{{type !== 'recharge' ? '可在DT积分账户交易记录中查询,以实际到账时间为准' : '可在DT积分账户交易记录中查询,如充值失败充值金额原路退还'}}</view>
|
||||
<view class="hash" v-if="type !== 'recharge'">
|
||||
<view class="hash-title">交易哈希</view>
|
||||
<view class="hash-text">{{hash}}</view>
|
||||
</view>
|
||||
@@ -17,11 +17,20 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
type: 'recharge',
|
||||
hash: ''
|
||||
};
|
||||
},
|
||||
onLoad(e){
|
||||
this.hash = e.hash
|
||||
this.type = e.type
|
||||
if(e.type === 'recharge'){
|
||||
uni.setNavigationBarTitle({
|
||||
title: '充值结果'
|
||||
})
|
||||
}
|
||||
if(e.hash){
|
||||
this.hash = e.hash
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
navBack(){
|
||||
|
||||
Reference in New Issue
Block a user