|
@@ -110,6 +110,7 @@
|
|
|
<script>
|
|
|
//#ifdef APP-PLUS
|
|
|
let speak = uni.requireNativePlugin("SpeechPlug");
|
|
|
+ let device = uni.requireNativePlugin("DeviceInfo");
|
|
|
let ALog = uni.requireNativePlugin("AndroidLog")
|
|
|
//#endif
|
|
|
import tkiQrcode from "tki-qrcode";
|
|
@@ -139,6 +140,7 @@
|
|
|
},
|
|
|
showQrcode:false,
|
|
|
qrcontent:'https://postest.bgzchina.com/mobilePay?sysId=ZDM20210510000088857402',
|
|
|
+ timer: null // 定时器
|
|
|
|
|
|
|
|
|
}
|
|
@@ -223,10 +225,10 @@
|
|
|
plus.nativeUI.toast(res.msg);
|
|
|
ALog.info({msg:'条码类型:err' + err});
|
|
|
//#endif
|
|
|
- // this.$refs.uToast.show({
|
|
|
- // title: res.msg,
|
|
|
- // type: 'success',
|
|
|
- // });
|
|
|
+ // 启动定时器查询订单状态
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ this.handlePayQuery(res.data.polyOrderId)
|
|
|
+ }, 3000);
|
|
|
|
|
|
}).catch(err=>{
|
|
|
//#ifdef APP-PLUS
|
|
@@ -261,8 +263,10 @@
|
|
|
this.qrcontent = res.data.qrCodeUrl;
|
|
|
},500)
|
|
|
|
|
|
- // tkiQrcode.methods._makeCode({val:"val"});
|
|
|
-
|
|
|
+ // 启动定时器查询订单状态
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ this.handlePayQuery(res.data.polyOrderId)
|
|
|
+ }, 3000);
|
|
|
console.log('gzbankPolypay',res)
|
|
|
}).catch(err=>{
|
|
|
this.$refs.uToast.show({
|
|
@@ -287,6 +291,7 @@
|
|
|
// type: 'success',
|
|
|
// url:'pages/getout/getout'
|
|
|
// });
|
|
|
+ device.print(res.data.print);
|
|
|
console.log('getOut',res)
|
|
|
}).catch(err=>{
|
|
|
this.$refs.uToast.show({
|
|
@@ -296,6 +301,36 @@
|
|
|
console.log('getOut ',err)
|
|
|
});
|
|
|
},
|
|
|
+ handlePayQuery(polyOrderId){
|
|
|
+ this.$u.api.payQuery({polyOrderId:polyOrderId})
|
|
|
+ .then(res=>{
|
|
|
+ // this.$refs.uToast.show({
|
|
|
+ // title: res.msg,
|
|
|
+ // type: 'success',
|
|
|
+ // });
|
|
|
+ // 支付成功后的页面跳转
|
|
|
+ if (res.data.payStatus==1) {
|
|
|
+ clearInterval(this.timer)
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ title:'支付成功',
|
|
|
+ type: 'success',
|
|
|
+ url:'pages/getout/getout',
|
|
|
+ // params: {
|
|
|
+ // vehicleNo:this.orderVehicleNo,
|
|
|
+ // },
|
|
|
+ duration:10000
|
|
|
+ });
|
|
|
+ };
|
|
|
+ console.log('handlePayQuery',res)
|
|
|
+ }).catch(err=>{
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ title: err.msg,
|
|
|
+ type: 'error',
|
|
|
+ });
|
|
|
+ console.log('handlePayQuery ',err)
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
goOwelist(){
|
|
|
this.$u.route({
|
|
|
url: 'pages/owelist/owelist',
|