|
@@ -252,36 +252,39 @@
|
|
|
this.showPayway = false;
|
|
|
},
|
|
|
scanPay(){
|
|
|
- uni.scanCode({
|
|
|
- onlyFromCamera: true,
|
|
|
- scanType:['barCode','qrCode'],
|
|
|
- success: (res) => {
|
|
|
- console.log(res)
|
|
|
- this.payParams.code = res.result;
|
|
|
- this.$u.api.gzbankSwept(this.payParams)
|
|
|
- .then(res=>{
|
|
|
- // 启动定时器查询订单状态
|
|
|
- uni.showLoading({
|
|
|
- title: '查询支付状态中'
|
|
|
+ setTimeout(() =>{
|
|
|
+ uni.scanCode({
|
|
|
+ onlyFromCamera: true,
|
|
|
+ scanType:['barCode','qrCode'],
|
|
|
+ success: (res) => {
|
|
|
+ console.log(res)
|
|
|
+ this.payParams.code = res.result;
|
|
|
+ this.$u.api.gzbankSwept(this.payParams)
|
|
|
+ .then(res=>{
|
|
|
+ // 启动定时器查询订单状态
|
|
|
+ uni.showLoading({
|
|
|
+ title: '查询支付状态中'
|
|
|
+ });
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ this.handlePayQuery(res.data.polyOrderId)
|
|
|
+ }, 3000);
|
|
|
+
|
|
|
+ }).catch(err=>{
|
|
|
+ //#ifdef APP-PLUS
|
|
|
+ plus.nativeUI.toast(err.msg);
|
|
|
+ //#endif
|
|
|
});
|
|
|
- this.timer = setInterval(() => {
|
|
|
- this.handlePayQuery(res.data.polyOrderId)
|
|
|
- }, 3000);
|
|
|
-
|
|
|
- }).catch(err=>{
|
|
|
+
|
|
|
+ },
|
|
|
+ fail:function(err){
|
|
|
//#ifdef APP-PLUS
|
|
|
- plus.nativeUI.toast(err.msg);
|
|
|
+ plus.nativeUI.toast('扫码失败');
|
|
|
+ ALog.info({msg:'条码类型:err' + err});
|
|
|
//#endif
|
|
|
- });
|
|
|
-
|
|
|
- },
|
|
|
- fail:function(err){
|
|
|
- //#ifdef APP-PLUS
|
|
|
- plus.nativeUI.toast('扫码失败');
|
|
|
- ALog.info({msg:'条码类型:err' + err});
|
|
|
- //#endif
|
|
|
- }
|
|
|
- });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },1000)
|
|
|
+
|
|
|
|
|
|
},
|
|
|
qrPay(){
|