完善功能

This commit is contained in:
wangxiaowei
2025-12-27 01:34:44 +08:00
parent a92e4354ad
commit 18b7d483a6
6 changed files with 46 additions and 28 deletions

View File

@ -278,29 +278,39 @@
router.navigateBack(1, 500)
} else if (pay.value == PayValue.WeChatPay) {
// 微信支付
wechatPay(res.pay.config).then((res) => {
uni.hideLoading()
if (res === 'success') {
toast.success('支付成功')
result.value = 'success'
} else if (res === 'cancel') {
toast.info('已取消支付')
result.value = 'fail'
} else {
toast.info('支付失败,请重试')
result.value = 'fail'
}
console.log("🚀 ~ res.pay:", res.pay)
if (res.pay_type && res.pay_type == 1) {
toast.success('支付成功')
result.value = 'success'
isSubmitting.value = false
router.navigateBack(1, 500)
return
}).catch(() => {
uni.hideLoading()
toast.info('支付失败,请重试')
return
})
}
} else {
wechatPay(res.pay.config).then((res) => {
console.log("🚀 ~ res:", res)
uni.hideLoading()
if (res === 'success') {
toast.success('支付成功')
result.value = 'success'
} else if (res === 'cancel') {
toast.info('已取消支付')
result.value = 'fail'
} else {
toast.info('支付失败,请重试')
result.value = 'fail'
}
isSubmitting.value = false
router.navigateBack(1, 500)
return
}).catch((e) => {
console.log("🚀 ~ error:", e)
uni.hideLoading()
toast.info('支付失败,请重试')
return
})
}
}
} catch (error) {
isSubmitting.value = false
uni.hideLoading()

View File

@ -95,7 +95,7 @@
<wd-icon name="add" color="#fff" size="20rpx" custom-style="font-weight: bold;" />
</view>
</view>
<view class="text-24rpx text-[#92928C] font-400 mt-12rpx">距您{{ item.distance }}km</view>
<view class="text-24rpx text-[#92928C] font-400 mt-12rpx">距您{{ item.distance }}</view>
</view>
</view>
</view>

View File

@ -44,11 +44,13 @@
const storeId = ref<number>(0) // 店铺ID
const storeType = ref<number>(0) // 1. 直营 2. 加盟
const orderId = ref<number>(0) // 订单ID
onLoad((args) => {
storeId.value = Number(args.storeId) || 0
storeType.value = Number(args.storeType) || 0
console.log("🚀 ~ 456 storeId:", storeId.value, storeType.value)
orderId.value = Number(args.orderId) || 0
console.log("🚀 ~ orderId.value:", orderId.value)
type.value = args.type || ''
isGroupBuying.value = Number(args.isGroupBuying) || 0
@ -60,7 +62,7 @@
*/
handleRoomSeeOrder: () => {
if (isGroupBuying.value) {
router.reLaunch( `/bundle/tea-room/room?id=${storeId.value}&type=${storeType.value}`)
router.navigateTo('/bundle/order/platform/order-list')
} else {
router.navigateTo('/bundle/order/tea-room/order-list')
}