|
@@ -131,10 +131,10 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- this.info = info
|
|
|
uni.showLoading({
|
|
|
title:'加载中...'
|
|
|
})
|
|
|
+ this.info = info
|
|
|
createRechargeOrder({
|
|
|
rechargeRuleSn: info.rechargeRuleSn,
|
|
|
rechargeAmount:info.rechargeAmount,
|
|
@@ -145,24 +145,7 @@ export default {
|
|
|
storeSn:this.shelfInfo.storeSn,
|
|
|
}).then(res =>{
|
|
|
if(res.status == 200){
|
|
|
- purchasePay({
|
|
|
- bizSn:res.data.rechargeSn,
|
|
|
- bizNo:res.data.rechargeNo,
|
|
|
- bizType:'RECHARGE_BILL',
|
|
|
- payUserOpenId: this.$store.state.vuex_openid || uni.getStorageSync('openid')
|
|
|
- }).then(ret=>{
|
|
|
- if(ret.status == 200){
|
|
|
- this.showPopu = true
|
|
|
- this.payData = ret.data?ret.data.payRequestRest:null
|
|
|
- }
|
|
|
- setTimeout(()=>{
|
|
|
- uni.hideLoading()
|
|
|
- },300)
|
|
|
- uni.showToast({
|
|
|
- title: ret.message,
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- })
|
|
|
+ this.toPay(res.data)
|
|
|
}else{
|
|
|
setTimeout(()=>{
|
|
|
uni.hideLoading()
|
|
@@ -174,6 +157,26 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ toPay(data){
|
|
|
+ purchasePay({
|
|
|
+ bizSn:data.rechargeSn,
|
|
|
+ bizNo:data.rechargeNo,
|
|
|
+ bizType:'RECHARGE_BILL',
|
|
|
+ payUserOpenId: this.$store.state.vuex_openid || uni.getStorageSync('openid')
|
|
|
+ }).then(ret=>{
|
|
|
+ if(ret.status == 200){
|
|
|
+ this.showPopu = true
|
|
|
+ this.payData = ret.data?ret.data.payRequestRest:null
|
|
|
+ }
|
|
|
+ setTimeout(()=>{
|
|
|
+ uni.hideLoading()
|
|
|
+ },300)
|
|
|
+ uni.showToast({
|
|
|
+ title: ret.message,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
payComplete(item,isOk){
|
|
|
this.showPopu = false
|
|
|
if(isOk){
|