|
|
@@ -35,7 +35,7 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { codePayCheck,scanPay} from "@/api/order/index";
|
|
|
+import { codePayCheck,scanPay,scanPayCheck} from "@/api/order/index";
|
|
|
export default {
|
|
|
name: "toPay",
|
|
|
components: {
|
|
|
@@ -71,6 +71,7 @@ export default {
|
|
|
// #endif
|
|
|
if(this.isCashier == false){
|
|
|
this.toScanPay()
|
|
|
+ this.checkPayInfo()
|
|
|
}
|
|
|
|
|
|
},
|
|
|
@@ -80,6 +81,16 @@ export default {
|
|
|
uni.removeStorageSync('globalCodePayId')
|
|
|
},
|
|
|
methods: {
|
|
|
+ checkPayInfo(){
|
|
|
+ let that = this
|
|
|
+ setInterval(function(){
|
|
|
+ scanPayCheck({id:that.orderId}).then(res=>{
|
|
|
+ if(res.code == 1 && res.data.returnStatus == 'SUCCESS'){
|
|
|
+ that.$util.pageTo({ url: '/admin/billing/result',type:2,query: {orderId:this.orderId,orderSn:this.orderSn,title:'支付成功'}})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }, 4000);
|
|
|
+ },
|
|
|
changePayWay(payWay){
|
|
|
this.payWay = payWay
|
|
|
this.toScanPay()
|