feat: 设备: 微信和支付宝/卡: 支付宝
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m43s

This commit is contained in:
luo
2026-07-27 16:32:45 +08:00
parent 59696a7e8e
commit 189d64c290
3 changed files with 20 additions and 2 deletions

View File

@@ -155,6 +155,14 @@
</view>
<view class="payment-methods">
<view v-if="isDeviceAsset" class="method-item" :class="{ active: rechargePaymentMethod === 'wechat' }" @tap="selectRechargePaymentMethod('wechat')">
<view class="method-left">
<image class="method-icon" src="/static/wechat.png" mode="aspectFit"></image>
<text class="method-name">微信支付</text>
</view>
<view class="method-radio" :class="{ checked: rechargePaymentMethod === 'wechat' }"></view>
</view>
<view class="method-item" :class="{ active: rechargePaymentMethod === 'alipay' }" @tap="selectRechargePaymentMethod('alipay')">
<view class="method-left">
<view class="method-icon method-badge method-badge-alipay"></view>
@@ -224,6 +232,7 @@
const isDeviceAsset = ref(true);
let assetTypePromise = null;
const paymentMethodOptions = computed(() => [
...(isDeviceAsset.value ? [{ label: '微信支付', value: 'wechat' }] : []),
{ label: '支付宝支付', value: 'alipay' }
]);
const rechargeAmounts = [
@@ -377,7 +386,7 @@
};
const selectRechargePaymentMethod = (method) => {
if (method !== getDefaultRechargePaymentMethod()) return;
if (!paymentMethodOptions.value.some((item) => item.value === method)) return;
rechargePaymentMethod.value = method;
};