fix: 扫码
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 11m24s

This commit is contained in:
luo
2026-08-10 15:57:09 +08:00
parent 373ad4c2a5
commit 8650b490d7

View File

@@ -160,13 +160,27 @@
@closed="handleQrDialogClosed"
>
<div class="online-recharge-qr-dialog">
<QrcodeVue
v-if="qrContent"
:value="qrContent"
:size="240"
level="H"
render-as="canvas"
/>
<template v-if="qrContent">
<div class="online-recharge-qr-dialog__code-surface">
<QrcodeVue
:value="qrContent"
:size="240"
level="H"
background="#FFFFFF"
foreground="#000000"
render-as="canvas"
/>
</div>
<ElTag
v-if="onlinePaymentMethodLabel"
class="online-recharge-qr-dialog__method"
type="primary"
effect="dark"
size="large"
>
{{ onlinePaymentMethodLabel }}扫码支付
</ElTag>
</template>
<ElEmpty v-else description="暂未获取到支付二维码" />
<div v-if="onlineQrRecharge" class="online-recharge-qr-dialog__summary">
<div>充值单号:{{ onlineQrRecharge.recharge_no || '-' }}</div>
@@ -552,9 +566,15 @@
paymentMethodsLoading.value ||
(createMode.value === 'online' && onlinePaymentMethods.value.length === 0)
)
const onlinePaymentMethodLabel = computed(() => {
const method = onlineQrRecharge.value?.payment_method
if (method === 'wechat') return '微信支付'
if (method === 'alipay') return '支付宝'
return ''
})
const onlinePaymentStatusMessage = computed(() => {
const status = onlinePaymentStatus.value?.status ?? onlineQrRecharge.value?.status
if (status === 1) return '请使用对应支付方式扫码完成支付'
if (status === 1) return `请使用${onlinePaymentMethodLabel.value || '对应支付方式'}扫码完成支付`
if (status === 2) return '支付已成功,钱包正在入账,请稍候'
if (status === 3) return '充值成功,钱包已到账'
if (status === 4) return '充值订单已关闭,请重新发起充值'
@@ -1357,6 +1377,17 @@
align-items: center;
gap: 16px;
&__code-surface {
display: flex;
padding: 20px;
background: #fff;
border-radius: 8px;
}
&__method {
font-weight: 600;
}
&__summary {
display: flex;
flex-direction: column;