完善功能

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

View File

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

View File

@ -278,7 +278,16 @@
router.navigateBack(1, 500) router.navigateBack(1, 500)
} else if (pay.value == PayValue.WeChatPay) { } else if (pay.value == PayValue.WeChatPay) {
// 微信支付 // 微信支付
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
} else {
wechatPay(res.pay.config).then((res) => { wechatPay(res.pay.config).then((res) => {
console.log("🚀 ~ res:", res)
uni.hideLoading() uni.hideLoading()
if (res === 'success') { if (res === 'success') {
toast.success('支付成功') toast.success('支付成功')
@ -294,13 +303,14 @@
isSubmitting.value = false isSubmitting.value = false
router.navigateBack(1, 500) router.navigateBack(1, 500)
return return
}).catch(() => { }).catch((e) => {
console.log("🚀 ~ error:", e)
uni.hideLoading() uni.hideLoading()
toast.info('支付失败,请重试') toast.info('支付失败,请重试')
return return
}) })
} }
}
} catch (error) { } catch (error) {
isSubmitting.value = false isSubmitting.value = false
uni.hideLoading() uni.hideLoading()

View File

@ -95,7 +95,7 @@
<wd-icon name="add" color="#fff" size="20rpx" custom-style="font-weight: bold;" /> <wd-icon name="add" color="#fff" size="20rpx" custom-style="font-weight: bold;" />
</view> </view>
</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>
</view> </view>

View File

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