完善转账和充值

This commit is contained in:
唐明明
2022-06-10 12:35:24 +08:00
parent f4a2fa5160
commit d7cd566e57
7 changed files with 4352 additions and 4311 deletions

View File

@@ -80,7 +80,6 @@ const submitTransfer = data => {
}) })
} }
export { export {
dt, dt,
recharge, recharge,

View File

@@ -93,10 +93,12 @@
provider: 'wxpay', provider: 'wxpay',
orderInfo: JSON.parse(res), orderInfo: JSON.parse(res),
success: res => { success: res => {
console.log(res) uni.redirectTo({
url: './results?type=recharge'
})
}, },
fail(err) { fail(err) {
let showToast = err.message let showToast = err.errMsg
if(err.errMsg === 'requestPayment:fail [payment微信:-2]User canceled'){ if(err.errMsg === 'requestPayment:fail [payment微信:-2]User canceled'){
showToast = '充值被取消' showToast = '充值被取消'
} }

View File

@@ -2,9 +2,9 @@
<view> <view>
<view class="vertical results"> <view class="vertical results">
<uni-icons type="checkbox-filled" size="88" color="#34CE98"></uni-icons> <uni-icons type="checkbox-filled" size="88" color="#34CE98"></uni-icons>
<view class="title">交易已提交</view> <view class="title">{{type !== 'recharge' ? '转账交易已提交' : '充值信息已提交'}}</view>
<view class="sub-title">预计10秒内到账可在交易记录中查询以实际到账时间为准</view> <view class="sub-title">预计10秒内到账{{type !== 'recharge' ? '可在DT积分账户交易记录中查询以实际到账时间为准' : '可在DT积分账户交易记录中查询如充值失败充值金额原路退还'}}</view>
<view class="hash"> <view class="hash" v-if="type !== 'recharge'">
<view class="hash-title">交易哈希</view> <view class="hash-title">交易哈希</view>
<view class="hash-text">{{hash}}</view> <view class="hash-text">{{hash}}</view>
</view> </view>
@@ -17,11 +17,20 @@
export default { export default {
data() { data() {
return { return {
type: 'recharge',
hash: '' hash: ''
}; };
}, },
onLoad(e){ onLoad(e){
this.type = e.type
if(e.type === 'recharge'){
uni.setNavigationBarTitle({
title: '充值结果'
})
}
if(e.hash){
this.hash = e.hash this.hash = e.hash
}
}, },
methods:{ methods:{
navBack(){ navBack(){

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -19043,12 +19043,13 @@ var render = function() {
[ [
_c("uni-icons", { attrs: { _i: 2 } }), _c("uni-icons", { attrs: { _i: 2 } }),
_c("uni-view", { staticClass: _vm._$g(3, "sc"), attrs: { _i: 3 } }, [ _c("uni-view", { staticClass: _vm._$g(3, "sc"), attrs: { _i: 3 } }, [
_vm._v("交易已提交") _vm._v(_vm._$g(3, "t0-0"))
]), ]),
_c("uni-view", { staticClass: _vm._$g(4, "sc"), attrs: { _i: 4 } }, [ _c("uni-view", { staticClass: _vm._$g(4, "sc"), attrs: { _i: 4 } }, [
_vm._v("预计10秒内到账可在交易记录中查询,以实际到账时间为准") _vm._v("预计10秒内到账" + _vm._$g(4, "t0-0"))
]), ]),
_c( _vm._$g(5, "i")
? _c(
"uni-view", "uni-view",
{ staticClass: _vm._$g(5, "sc"), attrs: { _i: 5 } }, { staticClass: _vm._$g(5, "sc"), attrs: { _i: 5 } },
[ [
@@ -19064,7 +19065,8 @@ var render = function() {
) )
], ],
1 1
), )
: _vm._e(),
_c( _c(
"v-uni-button", "v-uni-button",
{ {

File diff suppressed because one or more lines are too long