From 98e8a4af10e32de8c2efba7e2647e83ebea239fb Mon Sep 17 00:00:00 2001 From: 15820893422 <1978476055@qq.com> Date: Tue, 26 Mar 2024 15:06:27 +0800 Subject: [PATCH] add --- pages/shop/index.vue | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pages/shop/index.vue b/pages/shop/index.vue index 901e34e..433827a 100644 --- a/pages/shop/index.vue +++ b/pages/shop/index.vue @@ -73,6 +73,7 @@ import customTab from '@/components/customTab'; import { mapGetters } from "vuex"; import {shopInit,shopNearby} from '@/api/shop.js' + import {getOrderOfflinePay} from '@/api/admin.js' export default { components:{ customTab, @@ -201,8 +202,20 @@ // #ifdef APP-PLUS uni.scanCode({ scanType:['qrCode'], - success: function (res) { - console.log('二维码信息:' + res); + success: async (res)=> { + let result = JSON.parse(res.result) + let val = await getOrderOfflinePay(result.sn) + if(val.status == 200){ + this.$util.Tips({ + title: '支付成功', + icon: 'success' + }); + setTimeout(()=>{ + uni.navigateTo({ + url:'/pages/users/order_list/index?status=-1' + }) + },1000) + } } }); // #endif