This commit is contained in:
2026-01-16 03:33:17 +08:00
parent 3c6b5da687
commit a002599a15

View File

@@ -68,6 +68,26 @@
</template>
</van-cell>
<!-- 云印签支付-微信 -->
<van-cell v-if="isWeChat" title="云印签支付(微信)" clickable @click="selectedPaymentMethod = 'yunyinSignPay_wechat'">
<template #icon>
<van-icon size="24" name="wechat-pay" color="#1AAD19" class="mr-2" />
</template>
<template #right-icon>
<van-radio v-model="selectedPaymentMethod" name="yunyinSignPay_wechat" />
</template>
</van-cell>
<!-- 云印签支付-支付宝 -->
<van-cell v-if="!isWeChat" title="云印签支付(支付宝)" clickable @click="selectedPaymentMethod = 'yunyinSignPay_alipay'">
<template #icon>
<van-icon size="24" name="alipay" color="#00A1E9" class="mr-2" />
</template>
<template #right-icon>
<van-radio v-model="selectedPaymentMethod" name="yunyinSignPay_alipay" />
</template>
</van-cell>
<!-- 支付宝支付官方SDK -->
<!-- <van-cell v-if="!isWeChat" title="支付宝支付(官方)" clickable @click="selectedPaymentMethod = 'alipay'">
<template #icon>
@@ -178,6 +198,20 @@ async function getPayment() {
message: '获取支付链接失败,请重试'
});
}
} else if (selectedPaymentMethod.value === "yunyinSignPay_wechat" || selectedPaymentMethod.value === "yunyinSignPay_alipay") {
// 云印签支付直接跳转到支付URL
orderNo.value = data.value.data.order_no;
const prepayUrl = data.value.data.prepay_id || data.value.data.prepay_data;
if (prepayUrl) {
// 直接跳转到云印签支付页面
window.location.href = prepayUrl;
} else {
console.error("支付URL获取失败");
showToast({
type: 'fail',
message: '获取支付链接失败,请重试'
});
}
} else if (selectedPaymentMethod.value === "alipay") {
orderNo.value = data.value.data.order_no;
// 存储订单ID以便支付宝返回时获取