Fix:4865 【商城小程序】康养旅居的旅居分类调整
This commit is contained in:
@@ -1,30 +1,58 @@
|
||||
<template>
|
||||
<view class="sanctum-wrap">
|
||||
<view
|
||||
class="banner-wrap"
|
||||
v-if="topImageConfig && topImageConfig.backgroundImage"
|
||||
>
|
||||
|
||||
<!-- <view class="v12-justify-center">
|
||||
<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>
|
||||
</view> -->
|
||||
<view class="banner-tabs v12-justify-center">
|
||||
<image
|
||||
:src="topImageConfig.backgroundImage"
|
||||
class="banner-img"
|
||||
class="tab-btn v12-mr-3"
|
||||
:src="travelButtonSrc"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<view class="banner-tabs v12-justify-center">
|
||||
<image
|
||||
class="tab-btn v12-mr-3"
|
||||
:src="travelButtonSrc"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<image
|
||||
class="tab-btn"
|
||||
:src="wellnessButtonSrc"
|
||||
mode="widthFix"
|
||||
@click="toFoods"
|
||||
/>
|
||||
<image
|
||||
class="tab-btn"
|
||||
:src="wellnessButtonSrc"
|
||||
mode="widthFix"
|
||||
@click="toFoods"
|
||||
/>
|
||||
</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>
|
||||
<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
|
||||
<!-- <view
|
||||
class="tab v12-font-34 v12-dark-text v12-mr-5"
|
||||
v-for="(tab, index) in tabs"
|
||||
@click="handleTab(index,tab)"
|
||||
@@ -32,7 +60,8 @@
|
||||
:key="index">
|
||||
<text>{{ tab.name }}</text>
|
||||
<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 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)">
|
||||
@@ -74,7 +103,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getCategory } from '@/api/health'
|
||||
import { getCategory,getWellnessPlace } from '@/api/health'
|
||||
import { getJiaLouList } from '@/api/qianxian'
|
||||
import { getWellnessTopImage } from '@/api/health'
|
||||
export default {
|
||||
@@ -99,9 +128,12 @@ export default {
|
||||
wellnessButtonSrc() {
|
||||
const config = this.topImageConfig || {}
|
||||
return config.wellnessButtonImage || config.wellnessButtonImageFocus || ''
|
||||
keyword: ''
|
||||
}
|
||||
},
|
||||
onLoad(opts) {
|
||||
console.log(opts);
|
||||
|
||||
this.cityId = opts.city
|
||||
this.cityName = decodeURIComponent(decodeURIComponent(opts.cityName))
|
||||
getCategory().then(res => {
|
||||
@@ -113,6 +145,9 @@ export default {
|
||||
this.getTopImage()
|
||||
},
|
||||
onUnload() {
|
||||
// uni.navigateBack({
|
||||
// delta: 0
|
||||
// })
|
||||
},
|
||||
methods: {
|
||||
handleTab(index, tab) {
|
||||
@@ -127,13 +162,14 @@ export default {
|
||||
},
|
||||
getList() {
|
||||
const params = {
|
||||
// countyId: this.cityId,
|
||||
goodCityId: this.cityId,
|
||||
wellnessPlaceCateId : this.categoryId,
|
||||
shopType: 'wellnessCate',
|
||||
page: 1,
|
||||
limit: 9999
|
||||
}
|
||||
getJiaLouList(params).then(res => {
|
||||
// console.log(res);
|
||||
this.items = res.data.records
|
||||
})
|
||||
},
|
||||
@@ -150,6 +186,7 @@ export default {
|
||||
limit: 9999
|
||||
}
|
||||
getJiaLouList(params).then(res => {
|
||||
// console.log(res);
|
||||
this.traveItems = res.data.records
|
||||
})
|
||||
},
|
||||
@@ -186,7 +223,6 @@ export default {
|
||||
will-change: transform;
|
||||
}
|
||||
.banner-tabs{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 40rpx;
|
||||
|
||||
Reference in New Issue
Block a user