优化功能
This commit is contained in:
@ -121,7 +121,7 @@
|
||||
|
||||
<!-- 专属定制 -->
|
||||
<view class="flex justify-center mt-24rpx" @click="router.navigateTo(`/bundle_b/pages/tea-specialist/list`)" v-if="setting.status == 1">
|
||||
<wd-img :src="`${OSS}images/home/home_image_19.png`" width="690rpx" height="200rpx" mode="scaleToFill" />
|
||||
<wd-img :src="teaArtistEntrance" width="690rpx" height="200rpx" mode="scaleToFill" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -203,7 +203,7 @@
|
||||
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
|
||||
import useMescroll from "@/uni_modules/mescroll-uni/hooks/useMescroll.js"
|
||||
import { LOCATION_DENY_TIME_KEY, handleEnsureLocationAuthHooks, LOCATION_DEFAULT_CITY, handleGetLocationCity, LOCATION_CITY_KEY, handleForceGetLocation } from '@/hooks/useLocation'
|
||||
import { getHomeBannerList, getHomeCouponPopup, claimIndexCoupon } from '@/api/home'
|
||||
import { getHomeBannerList, getHomeCouponPopup, claimIndexCoupon, getTeaArtistEntrance } from '@/api/home'
|
||||
import { getTeaPackageList } from '@/api/tea-package'
|
||||
import { getHomeTeaStoreList } from '@/api/tea-room'
|
||||
import { useUserStore } from '@/store'
|
||||
@ -257,6 +257,9 @@
|
||||
// 获取设置
|
||||
const setting = ref<any>({})
|
||||
|
||||
// 茶艺师入口图
|
||||
const teaArtistEntrance = ref<string>('')
|
||||
|
||||
onShow(async () => {
|
||||
// if (canLocation) {
|
||||
// const location = await handleGetLocationCity(latitude.value, longitude.value)
|
||||
@ -386,19 +389,28 @@
|
||||
* 初始化首页数据
|
||||
*/
|
||||
handleInit: () => {
|
||||
// 获取设置
|
||||
getSetting().then(res => {
|
||||
setting.value = res
|
||||
})
|
||||
|
||||
// 获取轮播图
|
||||
getHomeBannerList().then(res => {
|
||||
swiperList.value = res.list.map(item => item.address)
|
||||
})
|
||||
|
||||
// 获取茶艺师入口图
|
||||
getTeaArtistEntrance().then(res => {
|
||||
console.log("🚀 ~ res:", res)
|
||||
// 如果接口返回的状态是1,才显示茶艺师入口图
|
||||
teaArtistEntrance.value = res.url
|
||||
})
|
||||
|
||||
// 获取套餐列表
|
||||
getTeaPackageList().then(res => {
|
||||
teaPackageList.value = res
|
||||
})
|
||||
|
||||
getSetting().then(res => {
|
||||
setting.value = res
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user