From c57d37f601e2dd2eb4d1beff4b8e2982bbb3fd18 Mon Sep 17 00:00:00 2001 From: Mrx <18278715334@163.com> Date: Sat, 6 Jun 2026 17:03:15 +0800 Subject: [PATCH] f --- .env | 4 +- manifest.config.js | 2 +- project.config.json | 2 +- src/api/http.js | 2 +- src/api/pay.js | 6 +++ src/manifest.json | 2 +- src/pages/inquire/index.vue | 79 +++++++++++++++++++++++++++++-------- src/utils/wxMiniAuth.js | 62 ++++++++++++++++++++++++++--- src/utils/xpayPay.js | 36 +++++++++++++++++ 9 files changed, 166 insertions(+), 29 deletions(-) create mode 100644 src/utils/xpayPay.js diff --git a/.env b/.env index da50170..b27a37e 100644 --- a/.env +++ b/.env @@ -11,8 +11,8 @@ # ────────────────────────────────────────────── # 想用线上接口时取消下面这行注释: -VITE_API_BASE_URL=https://www.quannengcha.com/api/v1 +# VITE_API_BASE_URL=https://www.quannengcha.com/api/v1 # 想用本地接口时注释掉上面那行,取消下面这行注释: -# VITE_API_BASE_URL=http://127.0.0.1:8888/api/v1 +VITE_API_BASE_URL=http://127.0.0.1:8888/api/v1 diff --git a/manifest.config.js b/manifest.config.js index 0339e47..544c9a1 100644 --- a/manifest.config.js +++ b/manifest.config.js @@ -52,7 +52,7 @@ export default defineManifestConfig({ 'quickapp': {}, /* 小程序特有相关 */ 'mp-weixin': { - appid: '', + appid: 'wx5bacc94add2da981', setting: { urlCheck: false, }, diff --git a/project.config.json b/project.config.json index d7f618b..8b5536e 100644 --- a/project.config.json +++ b/project.config.json @@ -13,7 +13,7 @@ }, "compileType": "miniprogram", "libVersion": "", - "appid": "touristappid", + "appid": "wx5bacc94add2da981", "projectname": "qnc-uniapp", "miniprogramRoot": "dist/dev/mp-weixin/", "condition": {} diff --git a/src/api/http.js b/src/api/http.js index ea1f8a4..5091ea8 100644 --- a/src/api/http.js +++ b/src/api/http.js @@ -5,7 +5,7 @@ import { QNC_API } from '@/config/api' const AUTH_FALLBACK_PAGE = '/pages/login' const TOKEN_KEY = 'token' -const SILENT_TOAST_CODES = new Set([200002, 200003, 200004, 100009]) +const SILENT_TOAST_CODES = new Set([200002, 200003, 200004, 100009, 100007]) let loadingCount = 0 diff --git a/src/api/pay.js b/src/api/pay.js index d0b6427..6e08951 100644 --- a/src/api/pay.js +++ b/src/api/pay.js @@ -5,3 +5,9 @@ export async function postPayPayment(body, requestConfig) { const res = await http.post('/pay/payment', body, requestConfig) return res.data } + +/** 查询支付状态(xpay 轮询兜底) */ +export async function postPayCheck(body, requestConfig) { + const res = await http.post('/pay/check', body, requestConfig) + return res.data +} diff --git a/src/manifest.json b/src/manifest.json index e7c6c11..80aabb2 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -48,7 +48,7 @@ }, "quickapp": {}, "mp-weixin": { - "appid": "", + "appid": "wx5bacc94add2da981", "setting": { "urlCheck": false }, diff --git a/src/pages/inquire/index.vue b/src/pages/inquire/index.vue index aaa3276..bcabba6 100644 --- a/src/pages/inquire/index.vue +++ b/src/pages/inquire/index.vue @@ -1,7 +1,8 @@