Fix:4865 【商城小程序】康养旅居的旅居分类调整

This commit is contained in:
LinCyJang
2026-02-04 23:42:09 +08:00
parent f486d35470
commit 0ac517f969
+50 -14
View File
@@ -1,14 +1,10 @@
<template> <template>
<view class="sanctum-wrap"> <view class="sanctum-wrap">
<view
class="banner-wrap" <!-- <view class="v12-justify-center">
v-if="topImageConfig && topImageConfig.backgroundImage" <view class="v12-mr-3 v12-radius-100 v12-primary v12-white-text v12-px-5 v12-py-2 v12-font-28 v12-font-bold">养生胜地</view>
> <view class="v12-radius-100 v12-grey v12-dark-text v12-px-5 v12-py-2 v12-font-28 v12-font-bold" @click="toFoods">养生食材</view>
<image </view> -->
:src="topImageConfig.backgroundImage"
class="banner-img"
mode="widthFix"
/>
<view class="banner-tabs v12-justify-center"> <view class="banner-tabs v12-justify-center">
<image <image
class="tab-btn v12-mr-3" class="tab-btn v12-mr-3"
@@ -22,9 +18,41 @@
@click="toFoods" @click="toFoods"
/> />
</view> </view>
<view class="v12-justify-between v12-align-center v12-mt-5">
<image
:src="webUrl + '/orderIcon/map_dark.png'"
mode="widthFix"
class="icon"
/>
<view class="v12-font-28 v12-secondary-dark-text v12-mr-3">{{ cityName }}</view>
<view class="flex-1" @click="search">
<u-search searchIconColor="#C52733" :disabled="true" :showAction="false" v-model="keyword" ></u-search>
</view> </view>
</view>
<swiper v-if="traveItems.length > 0" class="v12-justify-between swap" autoplay circular next-margin="300rpx" duration="10000" interval="3000" >
<swiper-item v-for="(item, index) in traveItems" :key="index" >
<view class="trave-item v12-mr-3 v12-mt-3" @click="toStore(item)">
<view class="trave-item">
<image class="trave-item" :src="item.cover" v-if="item.coverType === 1"></image>
<video
class="trave-item"
:src="item.cover"
:show-fullscreen-btn="false"
:show-center-play-btn="false"
:show-play-btn="false"
:poster="item.cover + '?vframe/jpg/offset/1'"
v-if="item.coverType === 2"
></video>
</view>
<view class="trave-btn">
<text>旅居预约</text>
<image :src="webUrl + '/orderIcon/arrow.png'" class="arrow-icon v12-ml-1"></image>
</view>
</view>
</swiper-item>
</swiper>
<view class="v12-justify-between v12-align-center v12-px-3 v12-mt-3 tabs-wrap"> <view class="v12-justify-between v12-align-center v12-px-3 v12-mt-3 tabs-wrap">
<view <!-- <view
class="tab v12-font-34 v12-dark-text v12-mr-5" class="tab v12-font-34 v12-dark-text v12-mr-5"
v-for="(tab, index) in tabs" v-for="(tab, index) in tabs"
@click="handleTab(index,tab)" @click="handleTab(index,tab)"
@@ -32,7 +60,8 @@
:key="index"> :key="index">
<text>{{ tab.name }}</text> <text>{{ tab.name }}</text>
<view :class="{'slider': index === actived}"></view> <view :class="{'slider': index === actived}"></view>
</view> </view> -->
<text class=" v12-font-34 v12-dark-text v12-mr-5 v12-font-bold">大家都在看</text>
</view> </view>
<view class="v12-justify-between sanctup-items v12-mt-3"> <view class="v12-justify-between sanctup-items v12-mt-3">
<view v-for="(item, index) in items" :key="index" class="v12-pa-1" @click="toStore(item)"> <view v-for="(item, index) in items" :key="index" class="v12-pa-1" @click="toStore(item)">
@@ -74,7 +103,7 @@
</view> </view>
</template> </template>
<script> <script>
import { getCategory } from '@/api/health' import { getCategory,getWellnessPlace } from '@/api/health'
import { getJiaLouList } from '@/api/qianxian' import { getJiaLouList } from '@/api/qianxian'
import { getWellnessTopImage } from '@/api/health' import { getWellnessTopImage } from '@/api/health'
export default { export default {
@@ -99,9 +128,12 @@ export default {
wellnessButtonSrc() { wellnessButtonSrc() {
const config = this.topImageConfig || {} const config = this.topImageConfig || {}
return config.wellnessButtonImage || config.wellnessButtonImageFocus || '' return config.wellnessButtonImage || config.wellnessButtonImageFocus || ''
keyword: ''
} }
}, },
onLoad(opts) { onLoad(opts) {
console.log(opts);
this.cityId = opts.city this.cityId = opts.city
this.cityName = decodeURIComponent(decodeURIComponent(opts.cityName)) this.cityName = decodeURIComponent(decodeURIComponent(opts.cityName))
getCategory().then(res => { getCategory().then(res => {
@@ -113,6 +145,9 @@ export default {
this.getTopImage() this.getTopImage()
}, },
onUnload() { onUnload() {
// uni.navigateBack({
// delta: 0
// })
}, },
methods: { methods: {
handleTab(index, tab) { handleTab(index, tab) {
@@ -127,13 +162,14 @@ export default {
}, },
getList() { getList() {
const params = { const params = {
// countyId: this.cityId,
goodCityId: this.cityId, goodCityId: this.cityId,
wellnessPlaceCateId : this.categoryId,
shopType: 'wellnessCate', shopType: 'wellnessCate',
page: 1, page: 1,
limit: 9999 limit: 9999
} }
getJiaLouList(params).then(res => { getJiaLouList(params).then(res => {
// console.log(res);
this.items = res.data.records this.items = res.data.records
}) })
}, },
@@ -150,6 +186,7 @@ export default {
limit: 9999 limit: 9999
} }
getJiaLouList(params).then(res => { getJiaLouList(params).then(res => {
// console.log(res);
this.traveItems = res.data.records this.traveItems = res.data.records
}) })
}, },
@@ -186,7 +223,6 @@ export default {
will-change: transform; will-change: transform;
} }
.banner-tabs{ .banner-tabs{
position: absolute;
left: 0; left: 0;
right: 0; right: 0;
top: 40rpx; top: 40rpx;