From 8b637cf4995d3fe820d13cc7a36c39d92dee0282 Mon Sep 17 00:00:00 2001 From: yml2213 Date: Thu, 16 Jul 2026 21:01:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E6=91=B8=E5=A4=A7=E7=BA=A2PC?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=96=B9=E5=BC=8F=E9=80=89=E6=8B=A9=E4=B8=BA?= =?UTF-8?q?=E5=B8=A6=E5=9B=BE=E6=A0=87=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 抽取PayWaySelectDialog,与租号端一致展示微信/支付宝图标。 --- .../mohong/views/MohongDetailView.vue | 56 +------ .../features/mohong/views/MohongListView.vue | 48 +----- .../mohong/views/MohongOrderDetailView.vue | 55 +------ .../orders/components/PayWaySelectDialog.vue | 141 ++++++++++++++++++ 4 files changed, 155 insertions(+), 145 deletions(-) create mode 100644 frontend/src/features/orders/components/PayWaySelectDialog.vue diff --git a/frontend/src/features/mohong/views/MohongDetailView.vue b/frontend/src/features/mohong/views/MohongDetailView.vue index 24d1eb4..ef54504 100644 --- a/frontend/src/features/mohong/views/MohongDetailView.vue +++ b/frontend/src/features/mohong/views/MohongDetailView.vue @@ -11,6 +11,7 @@ import { } from '@/features/mohong/api/mohong' import MohongCartPanel from '@/features/mohong/components/MohongCartPanel.vue' import { useMohongCart } from '@/features/mohong/composables/useMohongCart' +import PayWaySelectDialog from '@/features/orders/components/PayWaySelectDialog.vue' import type { PaymentPayWay } from '@/features/orders/api/orders' import { useOrderPaymentCashier } from '@/features/orders/composables/useOrderPaymentCashier' import { useSessionStore } from '@/stores/session' @@ -260,25 +261,11 @@ async function handleBuy() { :start-cashier="(payment, onPaid) => cashier.openPaymentCashier(payment, onPaid)" /> - -

选择渠道后将生成对应的支付二维码

-
- - -
-
+ /> - -
- - -
-
+ /> @@ -543,31 +531,7 @@ async function handleSupportClick() { font-size: 12px; } -.pay-way-options { - display: grid; - gap: 10px; -} -.pay-way-option { - display: grid; - gap: 4px; - padding: 14px 16px; - border: 1px solid #e5e7eb; - border-radius: 12px; - background: #fff; - text-align: left; - cursor: pointer; -} -.pay-way-option:hover { - border-color: #ff6a00; -} -.pay-way-option strong { - color: #0f172a; - font-size: 15px; -} -.pay-way-option small { - color: #94a3b8; - font-size: 12px; -} + @media (max-width: 900px) { .shop-layout { diff --git a/frontend/src/features/mohong/views/MohongOrderDetailView.vue b/frontend/src/features/mohong/views/MohongOrderDetailView.vue index 39b5145..d5a20da 100644 --- a/frontend/src/features/mohong/views/MohongOrderDetailView.vue +++ b/frontend/src/features/mohong/views/MohongOrderDetailView.vue @@ -10,6 +10,7 @@ import { startMohongPayment, type MohongOrder, } from '@/features/mohong/api/mohong' +import PayWaySelectDialog from '@/features/orders/components/PayWaySelectDialog.vue' import type { PaymentPayWay } from '@/features/orders/api/orders' import { useOrderPaymentCashier } from '@/features/orders/composables/useOrderPaymentCashier' import { formatCent } from '@/shared/utils/money' @@ -214,24 +215,11 @@ async function copyText() { - -
- - -
-
+ /> +import type { PaymentPayWay } from '@/features/orders/api/orders' + +defineProps<{ + modelValue: boolean +}>() + +const emit = defineEmits<{ + 'update:modelValue': [value: boolean] + choose: [payWay: PaymentPayWay] + closed: [] +}>() + +function choose(payWay: PaymentPayWay) { + emit('choose', payWay) + emit('update:modelValue', false) +} + + + + + + +