1
Showing
2 changed files
with
37 additions
and
41 deletions
| ... | @@ -80,28 +80,26 @@ const payment = reactive({ | ... | @@ -80,28 +80,26 @@ const payment = reactive({ |
| 80 | ), | 80 | ), |
| 81 | }); | 81 | }); |
| 82 | } | 82 | } |
| 83 | if (language.value == 0) { | 83 | payOrder({ |
| 84 | payOrder({ | 84 | contactPhone: payment.form.phone, |
| 85 | contactPhone: payment.form.phone, | 85 | customerIds: payment.form.viewers, |
| 86 | customerIds: payment.form.viewers, | 86 | orderToken: order.data?.orderToken, |
| 87 | orderToken: order.data?.orderToken, | 87 | payType: 1, |
| 88 | payType: 1, | 88 | paymentAmount: order.data?.paymentAmount, |
| 89 | paymentAmount: order.data?.paymentAmount, | 89 | }).then((res) => { |
| 90 | }).then((res) => { | 90 | if (res.data.language == "zh-cn") { |
| 91 | if (res.data.language == "zh-cn") { | 91 | payment.qrInfo = res.data; |
| 92 | payment.qrInfo = res.data; | 92 | qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => { |
| 93 | qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => { | 93 | if (url) { |
| 94 | if (url) { | 94 | payment.qrCodeData = url; |
| 95 | payment.qrCodeData = url; | 95 | } |
| 96 | } | 96 | }); |
| 97 | }); | 97 | payment.showCodeDialog = true; |
| 98 | payment.showCodeDialog = true; | 98 | startCheckSuccessListener(res.data.orderSn, props.activityId); |
| 99 | startCheckSuccessListener(res.data.orderSn, props.activityId); | 99 | } else { |
| 100 | } | 100 | // TODO:这里是英文环境支付 |
| 101 | }); | 101 | } |
| 102 | } else { | 102 | }); |
| 103 | // 这里是英文环境支付 | ||
| 104 | } | ||
| 105 | }, | 103 | }, |
| 106 | handleCloce() { | 104 | handleCloce() { |
| 107 | payment.showCodeDialog = false; | 105 | payment.showCodeDialog = false; | ... | ... |
| ... | @@ -126,25 +126,23 @@ const detail = reactive({ | ... | @@ -126,25 +126,23 @@ const detail = reactive({ |
| 126 | payment() { | 126 | payment() { |
| 127 | if (detail.pay_loading) return; | 127 | if (detail.pay_loading) return; |
| 128 | detail.pay_loading = true; | 128 | detail.pay_loading = true; |
| 129 | if (language.value == 0) { | 129 | // 中文支付 |
| 130 | // 中文支付 | 130 | immediatePay({ orderSn: detail.data.orderSn, payType: 1 }) |
| 131 | immediatePay({ orderSn: detail.data.orderSn, payType: 1 }) | 131 | .then((res) => { |
| 132 | .then((res) => { | 132 | if (res.data.language == "zh-cn") { |
| 133 | if (res.data.language == "zh-cn") { | 133 | detail.qrInfo = res.data; |
| 134 | detail.qrInfo = res.data; | 134 | qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => { |
| 135 | qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => { | 135 | if (url) { |
| 136 | if (url) { | 136 | detail.qrCodeData = url; |
| 137 | detail.qrCodeData = url; | 137 | } |
| 138 | } | 138 | }); |
| 139 | }); | 139 | detail.showCodeDialog = true; |
| 140 | detail.showCodeDialog = true; | 140 | startCheckSuccessListener(detail.data.orderSn); |
| 141 | startCheckSuccessListener(detail.data.orderSn); | 141 | } else { |
| 142 | } | 142 | // TODO:这里是英文环境支付 |
| 143 | }) | 143 | } |
| 144 | .finally(() => (detail.pay_loading = false)); | 144 | }) |
| 145 | } else { | 145 | .finally(() => (detail.pay_loading = false)); |
| 146 | // TODO: 这里是英文支付 | ||
| 147 | } | ||
| 148 | }, | 146 | }, |
| 149 | handleClose() { | 147 | handleClose() { |
| 150 | detail.showCodeDialog = false; | 148 | detail.showCodeDialog = false; | ... | ... |
-
Please register or sign in to post a comment