2
0

fix:余额支付额外确认

This commit is contained in:
zhongzm
2025-03-05 15:03:01 +08:00
parent c0c4e81cf6
commit 7a56fd8fa8
4 changed files with 38 additions and 12 deletions

View File

@@ -2,6 +2,7 @@
import { defineProps, defineEmits } from 'vue';
import { useI18n } from 'vue-i18n';
import { AlipayOutlined, WechatOutlined, WalletOutlined } from '@ant-design/icons-vue';
import { Modal } from 'ant-design-vue';
const { t } = useI18n();
@@ -26,7 +27,19 @@ const orderTypeMap = {
} as const;
const handleConfirm = (paymentMethod: 'alipay' | 'wxpay' | 'balance') => {
emit('confirm', paymentMethod);
if (paymentMethod === 'balance') {
Modal.confirm({
title: t('page.order.confirmPayment'),
content: t('page.order.balancePayConfirm'),
okText: t('page.order.confirm'),
cancelText: t('page.order.cancel'),
onOk: () => {
emit('confirm', paymentMethod);
}
});
} else {
emit('confirm', paymentMethod);
}
};
const handleCancel = () => {
@@ -109,7 +122,7 @@ const handleCancel = () => {
<style scoped>
.order-info {
padding: 20px;
background: var(--text-color, var(--ant-text-color)); /* 使用主题变量 */
background: #f8f8f8;
border-radius: 8px;
margin-bottom: 24px;
}
@@ -127,12 +140,12 @@ const handleCancel = () => {
.label {
width: 84px;
color: var(--text-color, var(--ant-text-color)); /* 使用主题变量 */
color: #666;
}
.value {
flex: 1;
color: var(--text-color, var(--ant-text-color)); /* 使用主题变量 */
color: #333;
}
.value.highlight {
@@ -147,7 +160,7 @@ const handleCancel = () => {
.payment-methods h4 {
margin-bottom: 16px;
color: var(--text-color, var(--ant-text-color)); /* 使用主题变量 */
color: #333;
font-size: 14px;
font-weight: normal;
}
@@ -171,7 +184,7 @@ const handleCancel = () => {
.method-item:hover {
border-color: #1890ff;
background: rgba(6, 42, 77, 0.192);
background: #f0f5ff;
}
.payment-icon {
@@ -190,7 +203,7 @@ const handleCancel = () => {
.method-item.disabled {
opacity: 0.5;
cursor: not-allowed;
background: var(--text-color, var(--ant-text-color)); /* 使用主题变量 */
background: #f5f5f5;
}
.balance-icon {
@@ -199,7 +212,7 @@ const handleCancel = () => {
.balance-info {
font-size: 12px;
color: var(--text-color, var(--ant-text-color)); /* 使用主题变量 */
color: #666;
margin-top: 4px;
}