From 5e1106d8ce0d97452d819119569eade4c1536ffa Mon Sep 17 00:00:00 2001 From: "weicw1996@qq.com" Date: Sun, 20 Sep 2026 20:44:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B4=AD=E6=A0=87=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=EF=BC=88/buy=EF=BC=89=E6=94=AF=E6=8C=81=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E5=AE=9D=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 上一轮我只改了独立收银台 `/tender/pay`,**漏了购标流程**—— `/buy` 走的是 `templates/template-07/pages/BuyDocument.vue`, 它自己那一套支付步骤同样硬编码微信:「提交订单并用微信支付」、 「请使用微信扫码支付」,且调 `/api/tender/pay` 不传 payType。 结果是用户从标书详情页买标书(主路径)根本看不到支付宝入口。 改动(与收银台保持同一套交互,便于对照): - 支付步骤加支付方式选择器(微信支付 / 支付宝),默认微信, 保持接入前行为不变。 - 支付宝走电脑网站支付:后端返回自提交表单,`document.write` 进新窗口。 用 document.write 而非 v-html——后者插入的脚本标签不会执行(HTML 规范), 表单永远不会自动提交。原页面留在原标签页继续轮询查单。 - 弹窗被拦截时给出可行动提示,并用「前往支付宝付款」按钮兜底重试。 - 切换支付方式清掉上一张码,避免两张码同时留在页面上。 - 两处 `/api/tender/pay` 调用(submit 与 refreshQr)都带上 payType。 - 文案按渠道取词(channelLabel / qrAlt),状态判定仍走渠道无关的 useHjcPayStatus,不引入支付宝词表。 验证:eslint 0 error;npm run build:dev 通过。 --- .../template-07/pages/BuyDocument.vue | 153 +++++++++++++++--- 1 file changed, 128 insertions(+), 25 deletions(-) diff --git a/app/templates/template-07/pages/BuyDocument.vue b/app/templates/template-07/pages/BuyDocument.vue index e8c8071..6ca54c0 100644 --- a/app/templates/template-07/pages/BuyDocument.vue +++ b/app/templates/template-07/pages/BuyDocument.vue @@ -41,7 +41,7 @@

{{ error }}

@@ -49,24 +49,65 @@
-

请使用微信扫码支付

+

请使用{{ channelLabel }}扫码支付

订单号:{{ orderNo }}

¥{{ formatMoney(totalAmount) }}

-