ca382606 by yyx

1

1 parent a5ad2c35
......@@ -125,22 +125,25 @@ const detail = reactive({
payment() {
if (detail.pay_loading) return;
detail.pay_loading = true;
immediatePay({ orderSn: detail.data.orderSn, payType: 1 })
.then((res) => {
if (res.data.language == "zh-cn") {
detail.qrInfo = res.data;
qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => {
if (url) {
detail.qrCodeData = url;
}
});
startCheckSuccessListener(detail.data.orderSn);
detail.showCodeDialog = true;
} else {
// TODO: 这里是PayPal支付
}
})
.finally(() => (detail.pay_loading = false));
if (language.value) {
// 中文支付
immediatePay({ orderSn: detail.data.orderSn, payType: 1 })
.then((res) => {
if (res.data.language == "zh-cn") {
detail.qrInfo = res.data;
qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => {
if (url) {
detail.qrCodeData = url;
}
});
startCheckSuccessListener(detail.data.orderSn);
detail.showCodeDialog = true;
}
})
.finally(() => (detail.pay_loading = false));
} else {
// TODO: 这里是英文支付
}
},
handleClose() {
detail.showCodeDialog = false;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!