调试接口
This commit is contained in:
@ -198,6 +198,8 @@
|
||||
} else {
|
||||
coupon = groupCouponList.value.find(item => item.id === checkedId.value)
|
||||
}
|
||||
console.log("🚀 ~ coupon:", coupon)
|
||||
|
||||
uni.$emit('chooseCoupon', { coupon })
|
||||
router.navigateBack()
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
<view class="text-[#606266] text-right mt-26rpx">
|
||||
<text class="text-24rpx leading-34rpx mr-12rpx">实付</text>
|
||||
<text class="tetx-32rpx leading-36rpx">¥{{ order.order_amount }}</text>
|
||||
<wd-icon name="chevron-right" size="32rpx"></wd-icon>
|
||||
<!-- <wd-icon name="chevron-right" size="32rpx"></wd-icon> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -67,7 +67,8 @@
|
||||
<view class="mt-30rpx font-500 leading-48rpx" v-if="order.store.operation_type === StoreType.Franchise">
|
||||
<view class="px-30rpx mt-60rpx">
|
||||
<view class="text-center">
|
||||
<wd-img width="230rpx" height="230rpx" :src="order.user_group.qr_url"></wd-img>
|
||||
<!-- <wd-img width="230rpx" height="230rpx" :src="order.user_group.qr_url" enable-preview></wd-img> -->
|
||||
<image :src="order.user_group.qr_url" style="width: 230rpx; height: 230rpx" show-menu-by-longpress></image>
|
||||
</view>
|
||||
<view class="text-28rpx text-[#303133] mt-32rpx text-center">
|
||||
<text class="mr-20rpx">券码 {{ order.user_group.qr_sn }}</text>
|
||||
|
||||
@ -144,7 +144,7 @@
|
||||
<view class="text-[#606266] text-right mt-26rpx" v-if="orderStatus !== TeaRoomOrderStatus.Pending">
|
||||
<text class="text-24rpx leading-34rpx mr-12rpx">实付</text>
|
||||
<text class="tetx-32rpx leading-36rpx">¥{{ order.order_amount }}</text>
|
||||
<wd-icon name="chevron-right" size="32rpx"></wd-icon>
|
||||
<!-- <wd-icon name="chevron-right" size="32rpx"></wd-icon> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -164,20 +164,10 @@
|
||||
一键续订
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="mt-20rpx px-30rpx" >续订时长:1小时</view> -->
|
||||
<!-- <view class="mb-20rpx px-30rpx" v-if="order.renew_hour">续订时长:{{ order?.renew_hour }}小时</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bg-white rounded-16rpx px-30rpx py-34rpx mx-30rpx mt-20rpx" v-if="order.renew_hour">
|
||||
<view class="text-[#303133] text-32rpx leading-44rpx">续订信息</view>
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view>续订时长</view>
|
||||
<view>{{ order.renew_hour }} 小时</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 已预约和消费中显示开门锁 -->
|
||||
<view class="bg-white rounded-16rpx mx-30rpx mt-20rpx" v-if="orderStatus === TeaRoomOrderStatus.Pay || orderStatus === TeaRoomOrderStatus.Consumption">
|
||||
<view class="pt-32rpx text-[#303133] text-32rpx leading-44rpx px-30rpx">开门锁</view>
|
||||
@ -187,7 +177,7 @@
|
||||
<view class="">
|
||||
<view class="flex justify-between items-center mt-18rpx pb-18rpx px-62rpx">
|
||||
<view class="w-224rpx">
|
||||
<view class="relative h-64rpx">
|
||||
<view class="relative h-64rpx" @click="OrderDetail.handleOpenDoorLock('door')">
|
||||
<wd-img width="224rpx" height="64rpx" :src="`${OSS}images/reserve_room/reserve_room_image5.png`"/>
|
||||
<view class="text-[#4C9F44] font-bold text-32rpx leading-44rpx absolute top-[50%] transform translate-y-[-50%] right-22rpx">点击开锁</view>
|
||||
</view>
|
||||
@ -195,7 +185,7 @@
|
||||
<view class="text-[#606266] text-26rpx leading-48rpx mt-4rpx text-center font-500">手动输入 1052 32#</view>
|
||||
</view>
|
||||
<view class="border-r-2rpx border-r-solid border-r-[#F6F7F9] h-224rpx"></view>
|
||||
<view class="w-224rpx">
|
||||
<view class="w-224rpx" @click="OrderDetail.handleOpenDoorLock('room')">
|
||||
<view class="relative h-64rpx">
|
||||
<wd-img width="224rpx" height="64rpx" :src="`${OSS}images/reserve_room/reserve_room_image6.png`"/>
|
||||
<view class="text-[#4C9F44] font-bold text-32rpx leading-44rpx absolute top-[50%] transform translate-y-[-50%] right-22rpx">点击开锁</view>
|
||||
@ -310,6 +300,7 @@
|
||||
import { toTimes, copy } from '@/utils/tools'
|
||||
import { useUserStore } from '@/store'
|
||||
import { PayOrderType } from '@/utils/pay'
|
||||
import { openLock } from '@/api/user'
|
||||
|
||||
|
||||
const OSS = inject('OSS')
|
||||
@ -703,6 +694,23 @@
|
||||
}
|
||||
}
|
||||
}).catch(() => {})
|
||||
},
|
||||
|
||||
/**
|
||||
* 开锁
|
||||
* @param type 锁的类型 room-房间锁 door-大门锁
|
||||
*/
|
||||
handleOpenDoorLock: async (lockType: string) => {
|
||||
uni.showLoading({ title: '开锁中...', mask: true })
|
||||
try {
|
||||
const type = lockType === 'door' ? 1 : 2
|
||||
await openLock(orderId.value, type)
|
||||
uni.hideLoading()
|
||||
toast.info('开锁成功')
|
||||
} catch(e) {
|
||||
uni.hideLoading()
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -223,6 +223,7 @@
|
||||
*/
|
||||
handleToEditMobile: async (e: any) => {
|
||||
const res = await getMobileByMnp(e.code)
|
||||
Profile.handleInit()
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@ -398,6 +398,7 @@
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
// 防止重复提交
|
||||
|
||||
const Detail = {
|
||||
@ -494,15 +495,18 @@
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
uni.$off('chooseCoupon');
|
||||
uni.$on('chooseCoupon', params => {
|
||||
console.log("🚀 ~ params:", params)
|
||||
console.log(12312312)
|
||||
uni.$off('chooseCoupon')
|
||||
|
||||
console.log("🚀 ~ type:", type)
|
||||
if (type === CouponType.Discount) {
|
||||
selectedCoupon.value = {id: params.coupon.id, name: `${params.coupon.name}减${params.coupon.coupon_price}` }
|
||||
bill.value.coupon = params.coupon.coupon_price
|
||||
selectCouponId.value = params.coupon.id // 这里的ID是在数据表自增的ID,保存下来是为了回显列表的,没有其他作用
|
||||
} else {
|
||||
console.log('gropu')
|
||||
selectedGroupCoupon.value = {id: params.coupon.id, name: `团购券-${params.coupon?.title}` }
|
||||
bill.value.groupCoupon = params.coupon.coupon_price
|
||||
selectGroupCouponId.value = params.coupon.id // 这里的ID是在数据表自增的ID,保存下来是为了回显列表的,没有其他作用
|
||||
|
||||
@ -12,14 +12,14 @@
|
||||
<navbar title="预约茶室" fixed>
|
||||
<template #right>
|
||||
<view class="flex items-center ml-114rpx right-slot">
|
||||
<view class="mr-16rpx flex items-center" @click="Room.handleCollect">
|
||||
<!-- <view class="mr-16rpx flex items-center" @click="Room.handleCollect">
|
||||
<template v-if="teaRoom.collect > 0">
|
||||
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_sc_s.png`"></wd-img>
|
||||
</template>
|
||||
<template v-else>
|
||||
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_sc.png`"></wd-img>
|
||||
</template>
|
||||
</view>
|
||||
</view> -->
|
||||
<view @click="showServicePopup = true" class="flex items-center">
|
||||
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_kefu.png`"></wd-img>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user