调试接口
This commit is contained in:
@ -48,7 +48,7 @@
|
||||
<view @click="Room.handleToRecharge">
|
||||
<recharge-btn name="充值"></recharge-btn>
|
||||
</view>
|
||||
<view class="text-24rpx text-[#818CA9] mt-18rpx">{{ teaRoom.rechange_times }} 分钟前有人充值</view>
|
||||
<!-- <view class="text-24rpx text-[#818CA9] mt-18rpx">{{ teaRoom.rechange_times }} 分钟前有人充值</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-26rpx">
|
||||
@ -80,12 +80,29 @@
|
||||
<wd-gap bg-color="#F6F7F9" height="20rpx"></wd-gap>
|
||||
</view>
|
||||
<view class="tabs">
|
||||
<wd-tabs v-model="tab" swipeable slidable="always" @change="Room.handleChangeTab" :lazy="false">
|
||||
<wd-tabs ref="tabsRef" v-model="tab" swipeable slidable="always" @change="Room.handleChangeTab" :lazy="false" :duration="0">
|
||||
<wd-tab title="茶室预定" v-if="storeType != 2"></wd-tab>
|
||||
<wd-tab title="团购套餐"></wd-tab>
|
||||
<wd-tab title="抖音兑换" v-if="storeType != 2"></wd-tab>
|
||||
</wd-tabs>
|
||||
|
||||
<view class="mx-30rpx mt-34rpx">
|
||||
<view class="text-24rpx flex items-center justify-end" v-if="storeType != 2">
|
||||
<view class="flex items-center mr-12rpx">
|
||||
<view class="bg-[#C9C9C9] w-20rpx h-20rpx rounded-10rpx mr-10rpx"></view>
|
||||
<view>过期</view>
|
||||
</view>
|
||||
|
||||
<view class="flex items-center mr-12rpx">
|
||||
<view class="bg-[#4C9F44] w-20rpx h-20rpx rounded-10rpx mr-10rpx"></view>
|
||||
<view>可预约</view>
|
||||
</view>
|
||||
|
||||
<view class="flex items-center mr-12rpx">
|
||||
<view class="bg-[#F55726] w-20rpx h-20rpx rounded-10rpx mr-10rpx"></view>
|
||||
<view>已预约</view>
|
||||
</view>
|
||||
</view>
|
||||
<mescroll-body @init="mescrollInit" @down="downCallback" :down="downOption" :up="upOption" @up="Room.upCallback">
|
||||
<room-list :is-reserve="tabIndexs === 0" :is-group-buying="tabIndexs === 1" :list="list"></room-list>
|
||||
</mescroll-body>
|
||||
@ -123,11 +140,7 @@
|
||||
const rightPadding = inject('capsuleOffset')
|
||||
const OSS = inject('OSS')
|
||||
|
||||
const swiperList = ref<string[]>([
|
||||
`${OSS}images/banner1.png`,
|
||||
`${OSS}images/banner1.png`,
|
||||
`${OSS}images/banner1.png`
|
||||
])
|
||||
const swiperList = ref<string[]>([])
|
||||
const current = ref<number>(0)
|
||||
|
||||
// 茶室ID
|
||||
@ -139,6 +152,7 @@
|
||||
|
||||
// tab
|
||||
const tab = ref<number>(0)
|
||||
const tabsRef = ref()
|
||||
|
||||
// 弹窗
|
||||
const showAction = ref<boolean>(false)
|
||||
@ -159,6 +173,15 @@
|
||||
const list = ref<Array<any>>([])
|
||||
const tabIndexs = ref<number>(0)
|
||||
|
||||
// 随机颜色列表
|
||||
const tagColors = ['#40AE36', '#F55726']
|
||||
|
||||
onShow(() => {
|
||||
// 刷新茶室详情
|
||||
list.value = []
|
||||
getMescroll().resetUpScroll()
|
||||
})
|
||||
|
||||
onLoad((args) => {
|
||||
console.log("🚀 ~ args:", uni.getStorageSync('latitude'), uni.getStorageSync('longitude'))
|
||||
if (args.id) {
|
||||
@ -227,7 +250,7 @@
|
||||
teaRoom.value = res.details
|
||||
storeType.value = teaRoom.value.operation_type
|
||||
|
||||
swiperList.value = teaRoom.value.img_arr
|
||||
swiperList.value = teaRoom.value.image_arr
|
||||
},
|
||||
|
||||
/**
|
||||
@ -317,6 +340,23 @@
|
||||
* tab切换获取index
|
||||
*/
|
||||
handleChangeTab: (item: { index: number }) => {
|
||||
console.log("🚀 ~ item.index:", item.index)
|
||||
if (item.index == 2) {
|
||||
uni.showLoading({ title: '跳转中...' })
|
||||
|
||||
// 直营店抖音兑换,强制切回第一个tab
|
||||
nextTick(() => {
|
||||
if (tabsRef.value && typeof tabsRef.value.setActive === 'function') {
|
||||
tabsRef.value.setActive(0, false, true)
|
||||
}
|
||||
})
|
||||
tab.value = 0
|
||||
tabIndexs.value = 0
|
||||
|
||||
router.navigateTo(`/bundle/order/douyin/excharge?storeId=${teaRoomId.value}`, 200)
|
||||
uni.hideLoading()
|
||||
return
|
||||
}
|
||||
tabIndexs.value = item.index
|
||||
list.value = []
|
||||
getMescroll().resetUpScroll()
|
||||
|
||||
Reference in New Issue
Block a user