From 42581ffe8a6a733ea7d3a92ce6d801ec4899c386 Mon Sep 17 00:00:00 2001 From: Mrx <18278715334@163.com> Date: Sun, 7 Jun 2026 15:11:30 +0800 Subject: [PATCH] fadd --- src/api/http.js | 8 +- src/api/pay.js | 8 + src/components/report/ReportShareBar.vue | 5 +- src/pages/inquire/index.vue | 63 +++++- src/utils/loading.js | 10 + src/utils/xpayPay.js | 262 +++++++++++++++++++++-- 6 files changed, 331 insertions(+), 25 deletions(-) create mode 100644 src/utils/loading.js diff --git a/src/api/http.js b/src/api/http.js index 5091ea8..0169d8a 100644 --- a/src/api/http.js +++ b/src/api/http.js @@ -1,5 +1,6 @@ import un from '@uni-helper/uni-network' import { QNC_API } from '@/config/api' +import { safeHideLoading } from '@/utils/loading' /** 未单独配置登录页时,401 回到登录页 */ const AUTH_FALLBACK_PAGE = '/pages/login' @@ -18,12 +19,7 @@ function showRequestLoading() { function hideRequestLoading() { if (--loadingCount <= 0) { loadingCount = 0 - try { - uni.hideLoading() - } - catch { - // 微信小程序真机调试时,如果没有 loading 显示会报错 "toast can't be found",忽略即可 - } + safeHideLoading() } } diff --git a/src/api/pay.js b/src/api/pay.js index 6e08951..931f919 100644 --- a/src/api/pay.js +++ b/src/api/pay.js @@ -11,3 +11,11 @@ export async function postPayCheck(body, requestConfig) { const res = await http.post('/pay/check', body, requestConfig) return res.data } + +/** + * 上报虚拟支付客户端步骤/微信·Apple 提示语(写入后端日志,并触发 query_order 快照) + */ +export async function postXpayClientEvent(body, requestConfig) { + const res = await http.post('/pay/xpay/client-event', body, requestConfig) + return res.data +} diff --git a/src/components/report/ReportShareBar.vue b/src/components/report/ReportShareBar.vue index 1d26021..577e473 100644 --- a/src/components/report/ReportShareBar.vue +++ b/src/components/report/ReportShareBar.vue @@ -1,5 +1,6 @@