From ff8b5df8b4e488d02afdb65583f939ce33005b43 Mon Sep 17 00:00:00 2001 From: bootx Date: Wed, 26 Nov 2025 20:55:00 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E8=81=9A=E5=90=88=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../daxpay/h5/aggregate/Aggregate.api.ts | 30 ++----------------- .../h5/aggregate/alipay/AlipayAggregate.vue | 22 +++++++------- .../h5/aggregate/wechat/WechatAggregate.vue | 11 ++++--- 3 files changed, 18 insertions(+), 45 deletions(-) diff --git a/src/views/daxpay/h5/aggregate/Aggregate.api.ts b/src/views/daxpay/h5/aggregate/Aggregate.api.ts index dac6d58..94822aa 100644 --- a/src/views/daxpay/h5/aggregate/Aggregate.api.ts +++ b/src/views/daxpay/h5/aggregate/Aggregate.api.ts @@ -21,7 +21,7 @@ export function generateAuthUrl(orderNo, scene) { return http.request>({ url: '/unipay/gateway/generateAuthUrl', method: 'POST', - data: { orderNo, scene }, + params: { orderNo, scene }, }) } @@ -66,22 +66,6 @@ export interface AggregateOrderAndConfig { order?: GatewayOrder /** 收银台配置信息 */ config?: GatewayPayConfig - /** 聚合支付配置信息 */ - aggregateConfig?: AggregateConfig -} - -/** - * 收银台聚合配置信息 - */ -export interface AggregateConfig { - /** 支付类型 */ - scene?: string - /** 通道 */ - channel?: string - /** 支付方式 */ - payMethod?: string - /** 其他支付方式 */ - otherMethod?: string /** 自动拉起支付 */ autoLaunch?: boolean /** 需要获取OpenId */ @@ -90,16 +74,6 @@ export interface AggregateConfig { callType?: string } -/** - * 获取认证URL参数 - */ -export interface GatewayAuthUrlParam { - // 订单号 - orderNo?: string - // 聚合支付类型 - scene?: string -} - /** * 认证参数 */ @@ -172,5 +146,5 @@ export interface paySuccess { // 金额 amount: number // 超时时间 - expiredTime + expiredTime: number } diff --git a/src/views/daxpay/h5/aggregate/alipay/AlipayAggregate.vue b/src/views/daxpay/h5/aggregate/alipay/AlipayAggregate.vue index bb654fc..10370d5 100644 --- a/src/views/daxpay/h5/aggregate/alipay/AlipayAggregate.vue +++ b/src/views/daxpay/h5/aggregate/alipay/AlipayAggregate.vue @@ -6,7 +6,7 @@
- {{ orderAndConfig?.order.amount }} + {{ orderAndConfig?.order?.amount }}
@@ -19,14 +19,14 @@
- {{ orderAndConfig?.order.title }} + {{ orderAndConfig?.order?.title }}
订单编号
- {{ orderAndConfig?.order.orderNo }} + {{ orderAndConfig?.order?.orderNo }}
@@ -34,10 +34,10 @@ 商户订单号
- {{ orderAndConfig?.order.bizOrderNo }} + {{ orderAndConfig?.order?.bizOrderNo }}
-
+
订单描述
@@ -50,13 +50,13 @@ 订单结束时间
- {{ orderAndConfig?.order.expiredTime }} + {{ orderAndConfig?.order?.expiredTime }}
-
+
立即支付
@@ -145,18 +145,18 @@ function init() { return } show.value = true + loading.value = false orderAndConfig.value = data // 判断是否自动拉起支付 - if (orderAndConfig.value?.aggregateConfig?.autoLaunch) { + if (orderAndConfig.value?.autoLaunch) { isAutoLaunch.value = true pay() } else { isAutoLaunch.value = false // 控制是否显示倒计时和时间 - orderTime.getDownTotalTime(data.order.expiredTime) // 计算倒计时 + orderTime.getDownTotalTime(orderAndConfig.value?.order?.expiredTime) // 计算倒计时 orderTime.getMinter() // 先执行一下 解决进入页面一秒后才显示倒计时 resume() // 开启倒计时 - pay() } }) } @@ -166,7 +166,7 @@ function init() { */ function pay() { loading.value = true - if (orderAndConfig.value?.aggregateConfig?.callType === GatewayCallTypeEnum.link) { + if (orderAndConfig.value?.callType === GatewayCallTypeEnum.link) { const from = { orderNo: orderNo as string, scene: AggregateEnum.ALI, diff --git a/src/views/daxpay/h5/aggregate/wechat/WechatAggregate.vue b/src/views/daxpay/h5/aggregate/wechat/WechatAggregate.vue index 72d7a31..fbbaf13 100644 --- a/src/views/daxpay/h5/aggregate/wechat/WechatAggregate.vue +++ b/src/views/daxpay/h5/aggregate/wechat/WechatAggregate.vue @@ -56,7 +56,7 @@
-
+
立即支付
@@ -176,7 +176,7 @@ async function init() { orderAndConfig.value = data }) // 判断是否需要获取OpenId - if (orderAndConfig.value?.aggregateConfig?.needOpenId) { + if (orderAndConfig.value?.needOpenId) { // 不等于9说明是微信重定向过来的 if (isChannel !== '9') { if (isChannel === '1') { @@ -259,7 +259,7 @@ async function wxAuth() { function payMethod() { show.value = true // 判断是否自动拉起支付 - if (orderAndConfig.value?.aggregateConfig?.autoLaunch) { + if (orderAndConfig.value?.autoLaunch) { isAutoLaunch.value = true payCallback() } @@ -268,7 +268,6 @@ function payMethod() { orderTime.getDownTotalTime(orderAndConfig.value?.order?.expiredTime) // 计算倒计时 orderTime.getMinter() // 先执行一下 解决进入页面一秒后才显示倒计时 resume() // 开启倒计时 - payCallback() } } @@ -289,11 +288,11 @@ function payCallback() { return } // 根据类型拉起对应的支付 支持跳转和jsapi - if (orderAndConfig.value?.aggregateConfig?.callType === GatewayCallTypeEnum.jsapi) { + if (orderAndConfig.value?.callType === GatewayCallTypeEnum.jsapi) { const json = JSON.parse(data.payBody) jsapiPay(json) } - if (orderAndConfig.value?.aggregateConfig?.callType === GatewayCallTypeEnum.link) { + if (orderAndConfig.value?.callType === GatewayCallTypeEnum.link) { location.replace(data.payBody as any) } })