|
|
@@ -6,10 +6,14 @@
|
|
|
<view style="margin-top:20upx;font-weight:bold;font-size:35upx;color:black;">¥{{price}}</view>
|
|
|
<view class="show-code" v-if="goPay == 0">请出示付款码</view>
|
|
|
<view class="paying" v-if="goPay == 1">请求中</view>
|
|
|
+ <view style="font-size:19upx;margin:55upx auto 10upx auto;color:red;font-weight:bold;" v-if="goPay == 2">
|
|
|
+ {{ remindText }}
|
|
|
+ <text v-if="returnCode=='BBS11105' || returnCode=='BBS10000'" style="margin-left:10upx;color:green;" @click="checkPay">查询结果</text>
|
|
|
+ </view>
|
|
|
<image style="width:40upx;height:40upx;position:absolute;top:200upx;left:165upx;" :src="`${constant.imgUrl}/icon/loading.gif`" v-if="goPay == 1" mode="scaleToFill" />
|
|
|
<view style="margin-top:30upx;">
|
|
|
<view @click="cancelPayFn" class="btn-default">取消</view>
|
|
|
- <view @click="manualCheck()" style="margin-left:20upx;background-color:#3385FF;color:white;" class="btn-default">手动查结果</view>
|
|
|
+ <view @click="reScan()" style="margin-left:20upx;background-color:#1c7b20;color:white;width:150upx;" class="btn-default">重新出示付款码</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -41,7 +45,9 @@ export default {
|
|
|
return {
|
|
|
showSuccess:false,
|
|
|
T:null,
|
|
|
- goPay:0
|
|
|
+ goPay:0,
|
|
|
+ remindText:'',
|
|
|
+ returnCode:''
|
|
|
}
|
|
|
},
|
|
|
props: {
|
|
|
@@ -72,24 +78,10 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- manualCheck(){
|
|
|
- let that = this
|
|
|
- codePayCheck({id:this.orderId}).then(res=>{
|
|
|
- if(res.code == 1){
|
|
|
- if(res.data.returnStatus == 'SUCCESS'){
|
|
|
- uni.hideLoading()
|
|
|
- that.showSuccess = true
|
|
|
- //clearInterval(that.T)
|
|
|
- setTimeout(function(){
|
|
|
- that.payFinish()
|
|
|
- },1500)
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
- that.$msg('没有付款,请跟客户确认')
|
|
|
- })
|
|
|
+ reScan(){
|
|
|
+ this.remindText = ''
|
|
|
+ this.goPay = 0
|
|
|
},
|
|
|
- //查询付款结果
|
|
|
checkPay(){
|
|
|
let that = this
|
|
|
codePayCheck({id:this.orderId}).then(res=>{
|
|
|
@@ -97,11 +89,9 @@ export default {
|
|
|
if(res.data.returnStatus == 'SUCCESS'){
|
|
|
uni.hideLoading()
|
|
|
that.showSuccess = true
|
|
|
- //clearInterval(that.T)
|
|
|
setTimeout(function(){
|
|
|
that.payFinish()
|
|
|
},1500)
|
|
|
- return
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -110,7 +100,7 @@ export default {
|
|
|
requestCodePay(authCode){
|
|
|
let that = this
|
|
|
this.goPay = 1
|
|
|
- codePay({id:this.orderId,authCode:authCode}).then(res=>{
|
|
|
+ codePay({id:this.orderId,authCode:authCode,version:2}).then(res=>{
|
|
|
if(res.code == 1){
|
|
|
if(res.data.returnStatus == 'SUCCESS'){
|
|
|
that.showSuccess = true
|
|
|
@@ -118,8 +108,9 @@ export default {
|
|
|
that.payFinish()
|
|
|
},1500)
|
|
|
}else{
|
|
|
- that.$msg(res.msg)
|
|
|
- that.goPay = 0
|
|
|
+ that.remindText = res.msg
|
|
|
+ that.returnCode = res.data.returnCode ? res.data.returnCode : ''
|
|
|
+ that.goPay = 2
|
|
|
// that.T = setInterval(function(){
|
|
|
// that.checkPay()
|
|
|
// }, 1000)
|
|
|
@@ -151,14 +142,12 @@ export default {
|
|
|
if(res.data.returnStatus == 'SUCCESS'){
|
|
|
uni.hideLoading()
|
|
|
that.showSuccess = true
|
|
|
- //clearInterval(that.T)
|
|
|
setTimeout(function(){
|
|
|
that.payFinish()
|
|
|
},1500)
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- //clearInterval(that.T)
|
|
|
cancelOrderFn({id:this.orderId}).then(res=>{
|
|
|
if(res.code == 1){
|
|
|
that.$msg('已取消')
|