|
@@ -22,14 +22,14 @@
|
|
|
<image style="width:40upx;height:40upx;margin:0 auto;" :src="`${constant.imgUrl}/icon/loading.gif`" v-if="goPay == 1" mode="scaleToFill" />
|
|
<image style="width:40upx;height:40upx;margin:0 auto;" :src="`${constant.imgUrl}/icon/loading.gif`" v-if="goPay == 1" mode="scaleToFill" />
|
|
|
<block v-if="goPay == 2">
|
|
<block v-if="goPay == 2">
|
|
|
<text style="color:red;font-weight:bold;font-size:28upx;">{{ remindText }}</text>
|
|
<text style="color:red;font-weight:bold;font-size:28upx;">{{ remindText }}</text>
|
|
|
|
|
+ <view style="width:100%;text-align:center;" v-if="returnCode=='BBS11105' || returnCode=='BBS10000'">
|
|
|
|
|
+ <button style="width:25vh;" class="admin-button-com big" @click="checkResult()">查询结果</button>
|
|
|
|
|
+ </view>
|
|
|
</block>
|
|
</block>
|
|
|
</view>
|
|
</view>
|
|
|
<view style="margin-top:20upx;">
|
|
<view style="margin-top:20upx;">
|
|
|
<button style="width:25vh;" @click="beginScan()" class="admin-button-com big blue">点击扫码</button>
|
|
<button style="width:25vh;" @click="beginScan()" class="admin-button-com big blue">点击扫码</button>
|
|
|
</view>
|
|
</view>
|
|
|
- <view style="margin-top:20upx;">
|
|
|
|
|
- <button style="width:25vh;" class="admin-button-com big blue" @click="checkResult()">查询支付结果</button>
|
|
|
|
|
- </view>
|
|
|
|
|
<view style="margin-top:20upx;">
|
|
<view style="margin-top:20upx;">
|
|
|
<button style="width:25vh;" class="admin-button-com big blue" @click="gotoOrderDetail()">订单详情</button>
|
|
<button style="width:25vh;" class="admin-button-com big blue" @click="gotoOrderDetail()">订单详情</button>
|
|
|
</view>
|
|
</view>
|
|
@@ -71,7 +71,8 @@ export default {
|
|
|
goPay:0,
|
|
goPay:0,
|
|
|
textscan: '扫码',
|
|
textscan: '扫码',
|
|
|
typescan: 'scan-listener',
|
|
typescan: 'scan-listener',
|
|
|
- remindText:''
|
|
|
|
|
|
|
+ remindText:'',
|
|
|
|
|
+ returnCode:''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
@@ -123,6 +124,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
beginScan(){
|
|
beginScan(){
|
|
|
this.remindText = ''
|
|
this.remindText = ''
|
|
|
|
|
+ this.returnCode = ''
|
|
|
// #ifdef MP-WEIXIN
|
|
// #ifdef MP-WEIXIN
|
|
|
this.toScan()
|
|
this.toScan()
|
|
|
// #endif
|
|
// #endif
|
|
@@ -160,39 +162,23 @@ export default {
|
|
|
isAllDigits(str) {
|
|
isAllDigits(str) {
|
|
|
return /^\d+$/.test(str)
|
|
return /^\d+$/.test(str)
|
|
|
},
|
|
},
|
|
|
- //付款
|
|
|
|
|
requestCodePay(authCode){
|
|
requestCodePay(authCode){
|
|
|
let that = this
|
|
let that = this
|
|
|
this.goPay = 1
|
|
this.goPay = 1
|
|
|
codePay({id:this.orderId,authCode:authCode}).then(res=>{
|
|
codePay({id:this.orderId,authCode:authCode}).then(res=>{
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
if(res.data.returnStatus == 'SUCCESS'){
|
|
if(res.data.returnStatus == 'SUCCESS'){
|
|
|
- that.showSuccess = true
|
|
|
|
|
setTimeout(function(){
|
|
setTimeout(function(){
|
|
|
that.payFinish()
|
|
that.payFinish()
|
|
|
},1200)
|
|
},1200)
|
|
|
}else{
|
|
}else{
|
|
|
that.remindText = res.msg
|
|
that.remindText = res.msg
|
|
|
that.goPay = 2
|
|
that.goPay = 2
|
|
|
|
|
+ that.returnCode = res.data.returnCode ? res.data.returnCode : ''
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- //查询付款结果
|
|
|
|
|
- checkPay(){
|
|
|
|
|
- let that = this
|
|
|
|
|
- codePayCheck({id:this.orderId}).then(res=>{
|
|
|
|
|
- if(res.code == 1){
|
|
|
|
|
- if(res.data.returnStatus == 'SUCCESS'){
|
|
|
|
|
- uni.hideLoading()
|
|
|
|
|
- setTimeout(function(){
|
|
|
|
|
- that.payFinish()
|
|
|
|
|
- },1500)
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
init(){
|
|
init(){
|
|
|
|
|
|
|
|
},
|
|
},
|
|
@@ -217,42 +203,28 @@ export default {
|
|
|
},
|
|
},
|
|
|
checkResult(){
|
|
checkResult(){
|
|
|
let that = this
|
|
let that = this
|
|
|
- codePayCheck({id:this.orderId}).then(res=>{
|
|
|
|
|
- if(res.code == 1){
|
|
|
|
|
- if(res.data.returnStatus == 'SUCCESS'){
|
|
|
|
|
- uni.hideLoading()
|
|
|
|
|
- setTimeout(function(){
|
|
|
|
|
- that.payFinish()
|
|
|
|
|
- },1500)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ getDetail({ id:this.orderId}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ if(res.data.payStatus == 1){
|
|
|
|
|
+ setTimeout(function(){
|
|
|
|
|
+ that.payFinish()
|
|
|
|
|
+ },1000)
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.$msg('没有付款成功')
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- confirmToCancel(){
|
|
|
|
|
- let that = this
|
|
|
|
|
- codePayCheck({id:this.orderId}).then(res=>{
|
|
|
|
|
- if(res.code == 1){
|
|
|
|
|
- if(res.data.returnStatus == 'SUCCESS'){
|
|
|
|
|
- uni.hideLoading()
|
|
|
|
|
- setTimeout(function(){
|
|
|
|
|
- that.payFinish()
|
|
|
|
|
- },1500)
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- cancel({id:this.orderId}).then(res=>{
|
|
|
|
|
- if(res.code == 1){
|
|
|
|
|
- that.$msg('已取消')
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
goBack(){
|
|
goBack(){
|
|
|
uni.navigateBack()
|
|
uni.navigateBack()
|
|
|
},
|
|
},
|
|
|
toCancel(){
|
|
toCancel(){
|
|
|
let that = this
|
|
let that = this
|
|
|
- that.$util.confirmModal({content:'确认取消?'},() => {
|
|
|
|
|
|
|
+ let content = '确认取消?'
|
|
|
|
|
+ if(this.returnCode == 'BBS11105' || this.returnCode == 'BBS10000'){
|
|
|
|
|
+ content = '客户正在付款,提醒客户退出付款界面,再点确认'
|
|
|
|
|
+ }
|
|
|
|
|
+ that.$util.confirmModal({content:content,cancelText:'返回'},() => {
|
|
|
cancel({id:this.orderId}).then(res=>{
|
|
cancel({id:this.orderId}).then(res=>{
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
that.$msg(res.msg)
|
|
that.$msg(res.msg)
|