|
|
@@ -10,6 +10,7 @@ const orderNumber = ref()
|
|
|
onLoad((options: any) => {
|
|
|
orderNumber.value = options.orderNumber
|
|
|
tenantCode.value = options.tenantCode
|
|
|
+ token.value = ''
|
|
|
handleLogin(options.phone)
|
|
|
console.log(options, '============options=======')
|
|
|
})
|
|
|
@@ -41,6 +42,7 @@ function handleLogin(phoneCode: string) {
|
|
|
async function handlePay() {
|
|
|
const res = await useUserStore().handleCommonPayMent(orderNumber.value)
|
|
|
priceInfo.value = res
|
|
|
+ console.log(priceInfo.value, '=========================')
|
|
|
}
|
|
|
async function handleGoPay() {
|
|
|
if (priceInfo.value?.payType !== 1) {
|
|
|
@@ -48,7 +50,10 @@ async function handleGoPay() {
|
|
|
await useUserStore().getWxCommonPayment(priceInfo.value as wxpay)
|
|
|
router.push({ name: 'common-threePayRes', params: { price: String(priceInfo.value?.price), type: '1' } })
|
|
|
}
|
|
|
- catch {
|
|
|
+ catch (error: any) {
|
|
|
+ console.log(error, '=========================')
|
|
|
+
|
|
|
+ router.push({ name: 'common-threePayRes', params: { price: String(priceInfo.value?.price), type: '0', error: error.errMsg } })
|
|
|
// console.log(111)
|
|
|
}
|
|
|
}
|
|
|
@@ -119,7 +124,7 @@ onUnload(() => {
|
|
|
|
|
|
<template>
|
|
|
<view>
|
|
|
- <wd-navbar title="支付" :bordered="false" :z-index="99" placeholder safe-area-inset-top fixed />
|
|
|
+ <wd-navbar title="支付" :bordered="false" :z-index="99" safe-area-inset-top placeholder fixed />
|
|
|
<view v-if="priceInfo" class="px20rpx pt20rpx">
|
|
|
<view class="text-center text-48rpx text-#FF4A39">
|
|
|
¥{{ (priceInfo?.price / 100).toFixed(2) }}
|