fix: 首页弹窗收货信息优化
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 2m23s
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 2m23s
This commit is contained in:
@@ -25,7 +25,8 @@
|
||||
<image v-else-if="method.value === 'wechat'" class="method-icon" src="/static/微信支付.png" mode="aspectFit"></image>
|
||||
<text class="method-name">{{ method.label }}</text>
|
||||
</view>
|
||||
<view class="method-radio" :class="{ checked: paymentMethod === method.value }"></view>
|
||||
<text v-if="operationMode === 'order-payment'" class="method-locked-label">订单支付方式</text>
|
||||
<view v-else class="method-radio" :class="{ checked: paymentMethod === method.value }"></view>
|
||||
</view>
|
||||
<view v-if="paymentMethodOptions.length === 0" class="method-empty">暂无可用支付方式</view>
|
||||
</view>
|
||||
@@ -146,10 +147,11 @@
|
||||
show.value = true;
|
||||
};
|
||||
|
||||
const openOrderPayment = async (orderId, names = []) => {
|
||||
const openOrderPayment = (orderId, names = [], method = '') => {
|
||||
if (!orderId) return;
|
||||
if (!props.identifier) {
|
||||
uni.showToast({ title: '未找到当前资产', icon: 'none' });
|
||||
const selectedMethod = normalizePaymentMethods([String(method || '').trim().toLowerCase()])[0];
|
||||
if (!selectedMethod) {
|
||||
uni.showToast({ title: '订单支付方式无效,请刷新订单后重试', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -158,22 +160,13 @@
|
||||
renewalPrice.value = null;
|
||||
packageIds.value = [];
|
||||
packageNames.value = Array.isArray(names) ? names.filter(Boolean) : [];
|
||||
try {
|
||||
await loadAssetInfo();
|
||||
} catch (error) {
|
||||
console.error('加载订单支付方式失败', error);
|
||||
uni.showToast({ title: error.msg || error.message || '加载支付方式失败', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
if (!paymentMethodOptions.value.length) {
|
||||
uni.showToast({ title: '暂无可用支付方式', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
allowedPaymentMethods.value = [selectedMethod];
|
||||
paymentMethod.value = selectedMethod;
|
||||
show.value = true;
|
||||
};
|
||||
|
||||
const selectPaymentMethod = (method) => {
|
||||
if (operationMode.value === 'order-payment') return;
|
||||
if (paymentMethodOptions.value.some((item) => item.value === method)) {
|
||||
paymentMethod.value = method;
|
||||
}
|
||||
@@ -481,6 +474,7 @@
|
||||
|
||||
.method-badge-alipay { background: #1677ff; }
|
||||
.method-name { color: var(--text-primary); font-size: 28rpx; }
|
||||
.method-locked-label { color: var(--text-tertiary); font-size: 24rpx; white-space: nowrap; }
|
||||
|
||||
.method-radio {
|
||||
width: 36rpx;
|
||||
|
||||
Reference in New Issue
Block a user