完善茶室订单
This commit is contained in:
@ -31,8 +31,7 @@
|
||||
<view :style="{ paddingTop: navbarHeight + 'px' }">
|
||||
<view class="mt-32rpx mx-30rpx">
|
||||
<wd-swiper height="240rpx" indicatorPosition="bottom-left"
|
||||
:indicator="{ type: 'dots-bar' }" :list="swiperList" v-model:current="current"
|
||||
@click="Index.handleClick" mode="aspectFit"></wd-swiper>
|
||||
:indicator="{ type: 'dots-bar' }" :list="swiperList" v-model:current="current" mode="aspectFit"></wd-swiper>
|
||||
</view>
|
||||
|
||||
<view class="mt-40rpx flex items-center h-36rpx mx-30rpx">
|
||||
@ -113,7 +112,7 @@
|
||||
import useMescroll from "@/uni_modules/mescroll-uni/hooks/useMescroll.js"
|
||||
import { LOCATION_DENY_TIME_KEY, handleEnsureLocationAuthHooks } from '@/hooks/useLocation'
|
||||
import { getHomeBannerList } from '@/api/home'
|
||||
import { getHomeTeaRoomList } from '@/api/tea-room'
|
||||
import { getHomeTeaStoreList } from '@/api/tea-room'
|
||||
import { useUserStore } from '@/store'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
@ -162,7 +161,10 @@
|
||||
})
|
||||
|
||||
const Index = {
|
||||
// 上拉加载的回调: 其中num:当前页 从1开始, size:每页数据条数,默认10
|
||||
/**
|
||||
* 茶室门店列表
|
||||
* @param mescroll
|
||||
*/
|
||||
upCallback: (mescroll) => {
|
||||
const userStore = useUserStore()
|
||||
const userId = userStore.userInfo?.id || 0
|
||||
@ -176,7 +178,7 @@
|
||||
user_id: userId
|
||||
}
|
||||
|
||||
getHomeTeaRoomList(filter).then( res => {
|
||||
getHomeTeaStoreList(filter).then( res => {
|
||||
console.log("🚀 ~ res:", res)
|
||||
const curPageData = res.list || [] // 当前页数据
|
||||
if(mescroll.num == 1) list.value = [] // 第一页需手动制空列表
|
||||
@ -187,18 +189,25 @@
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化首页数据
|
||||
*/
|
||||
handleInit: () => {
|
||||
// 初始化操作
|
||||
getHomeBannerList().then(res => {
|
||||
swiperList.value = res.list.map(item => item.address)
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 跳转城市选择
|
||||
*/
|
||||
handleToCity: () => {
|
||||
router.navigateTo(`/pages/city/city?lat=${latitude.value}&lng=${longitude.value}`)
|
||||
},
|
||||
|
||||
// 跳转茶室搜索
|
||||
/**
|
||||
* 跳转茶室搜索
|
||||
*/
|
||||
handleToSearch: () => {
|
||||
uni.$on('refreshTeaRoomList', params => {
|
||||
keywords.value = params.keywords
|
||||
@ -209,18 +218,18 @@
|
||||
router.navigateTo(`/pages/search/search?keywords=${keywords.value}`)
|
||||
},
|
||||
|
||||
handleClick: (item: any) => {
|
||||
// 处理点击事件
|
||||
console.log('Clicked item:', item)
|
||||
},
|
||||
|
||||
/**
|
||||
* 跳转到预约茶室页面
|
||||
*/
|
||||
handleToReserveRoom: (id: number = 0) => {
|
||||
// 跳转到预约茶室页面
|
||||
uni.navigateTo({
|
||||
url: `/bundle/tea-room/room?id=${id}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 重置搜索
|
||||
*/
|
||||
handleResetSearch: () => {
|
||||
list.value = []
|
||||
getMescroll().resetUpScroll()
|
||||
|
||||
Reference in New Issue
Block a user