完善功能

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

@ -92,7 +92,7 @@
<view class="w-full fixed bottom-0 left-0 right-0 bg-white h-152rpx" v-if="orderStatus !== DouYinOrderStatus.Used">
<!-- 待使用 -->
<view class="text-32rpx leading-44rpx flex items-center justify-center leading-90rpx text-center pt-34rpx" >
<view class="w-692rpx h-90rpx bg-[#4C9F44] rounded-8rpx text-[#fff]">立即预定</view>
<view class="w-692rpx h-90rpx bg-[#4C9F44] rounded-8rpx text-[#fff]" @click="DouYinOrderDetail.handleToCombo()">立即预定</view>
</view>
</view>
</view>
@ -137,7 +137,7 @@
// 跳转到套餐详情
handleToCombo: () => {
router.navigateTo(`/bundle/tea-room/room?id=${order.value.store.id}&type=${order.value.store.operation_type}`)
},
// 跳转到包间详情

View File

@ -86,9 +86,13 @@
</view>
</view>
<!-- <view class="text-center flex items-center text-28rpx mt-28rpx justify-end">
<view class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#4C9F44] text-[#4C9F44]" v-if="order.status === DouYinOrderStatus.ToUse">立即预定</view>
</view> -->
<view class="text-center flex items-center text-28rpx mt-28rpx justify-end">
<view class="w-178rpx h-70rpx leading-70rpx rounded-8rpx border-[2rpx] border-[#4C9F44] text-[#4C9F44]"
v-if="order.status === DouYinOrderStatus.ToUse"
@click="ComboCard.handleUsePackage(order.store_id, order.operation_type)">
立即预定
</view>
</view>
</view>
</view>
</view>
@ -310,7 +314,7 @@
},
/**
* 使用套餐
* 使用套餐(抖音、团购,都跳转到对应的页面)
*/
handleUsePackage: (store_id: number, operation_type: number) => {
router.navigateTo(`/bundle/tea-room/room?id=${store_id}&type=${operation_type}`)

View File

@ -269,6 +269,7 @@
{
"path": "tea-room/choose-room-reserve",
"type": "page",
"needLogin": true,
"layout": "tabbar",
"style": {
"navigationStyle": "custom"
@ -277,6 +278,7 @@
{
"path": "tea-room/choose-room",
"type": "page",
"needLogin": true,
"layout": "tabbar",
"style": {
"navigationStyle": "custom"

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')
}