Feat:康养部分接口对接(圣地,食材为对接)
This commit is contained in:
@@ -0,0 +1,37 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 康养生活-养生圣地分类列表
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function getCategory() {
|
||||||
|
return request.get("/wellness/place/category")
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 康养生活-养生圣地列表
|
||||||
|
* @param {*} params
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function getWellnessPlace(params) {
|
||||||
|
return request.get("/wellness/place", params)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 康养生活-展会列表
|
||||||
|
* @param {*} params
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function getWellnessExhibition(params) {
|
||||||
|
return request.get("/wellness/exhibition", params)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 康养生活-展会详情
|
||||||
|
* @param {*} id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function getWellnessExhibitionDetails(id) {
|
||||||
|
return request.get("/wellness/exhibition/" + id)
|
||||||
|
}
|
||||||
@@ -1,34 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="expo-details">
|
<view class="expo-details">
|
||||||
<view class="video-wrap">
|
<view class="video-wrap">
|
||||||
<video id="ky-video" class="ky-video" @error="videoErrorCallback" :show-fullscreen-btn="false" src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4" autoplay controls></video>
|
<video id="ky-video" class="ky-video" @error="videoErrorCallback" :show-fullscreen-btn="false" :src="details.video" autoplay controls></video>
|
||||||
</view>
|
</view>
|
||||||
<view class="expo-item">
|
<view class="expo-item">
|
||||||
中国昆明第九届国际大健康暨养生养老产业博览会
|
{{ details.theme }}
|
||||||
</view>
|
</view>
|
||||||
<view class="details-wrap v12-mt-3">
|
<view class="details-wrap v12-mt-3">
|
||||||
<view class="v12-font-bold v12-dark-text v12-font-32 v12-mb-3">展会信息</view>
|
<view class="v12-font-bold v12-dark-text v12-font-32 v12-mb-3">展会信息</view>
|
||||||
<view class="v12-justify-start v12-mb-3">
|
<view class="v12-justify-start v12-mb-3">
|
||||||
<view class="tag v12-success v12-white-text v12-font-20 v12-px-2 v12-py-1 v12-radius-50 v12-nowrap">主题</view>
|
<view class="tag v12-success v12-white-text v12-font-20 v12-px-2 v12-py-1 v12-radius-50 v12-nowrap">主题</view>
|
||||||
<view class="v12-font-bold v12-font-28 v12-dark-text v12-ml-3">中国昆明第九届国际大健康暨养生养老产业博览会</view>
|
<view class="v12-font-bold v12-font-28 v12-dark-text v12-ml-3">{{ details.theme }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-justify-start v12-mb-3">
|
<view class="v12-justify-start v12-mb-3">
|
||||||
<view class="tag v12-success v12-white-text v12-font-20 v12-px-2 v12-py-1 v12-radius-50 v12-nowrap">内容</view>
|
<view class="tag v12-success v12-white-text v12-font-20 v12-px-2 v12-py-1 v12-radius-50 v12-nowrap">内容</view>
|
||||||
<view class="v12-font-24 v12-dark-text v12-ml-3">“中国(昆明)国际大健康养生养老产业博览会”创办于2017
|
<view class="v12-font-24 v12-dark-text v12-ml-3">{{ details.content||'' }}</view>
|
||||||
年,由云南省民政厅、云南省老龄办、云南省贸促会共同发
|
|
||||||
起指导,早云南省商务厅、云南省投促局以及昆明市政府相
|
|
||||||
关部门支持下,至今已连续成功举办了八届,在国内同类型
|
|
||||||
展会中已具一定规模和影响力,被昆明市有关部门综合评估
|
|
||||||
为5A级博览会。
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-justify-start v12-mb-3">
|
<view class="v12-justify-start v12-mb-3">
|
||||||
<view class="tag v12-success v12-white-text v12-font-20 v12-px-2 v12-py-1 v12-radius-50 v12-nowrap">时间</view>
|
<view class="tag v12-success v12-white-text v12-font-20 v12-px-2 v12-py-1 v12-radius-50 v12-nowrap">时间</view>
|
||||||
<view class="v12-font-bold v12-font-28 v12-dark-text v12-ml-3">2024年11月22日--2024年11月24日</view>
|
<view class="v12-font-bold v12-font-28 v12-dark-text v12-ml-3">{{ details.startTime }}--{{ details.endTime }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-justify-start v12-mb-3">
|
<view class="v12-justify-start v12-mb-3">
|
||||||
<view class="tag v12-success v12-white-text v12-font-20 v12-px-2 v12-py-1 v12-radius-50 v12-nowrap">地点</view>
|
<view class="tag v12-success v12-white-text v12-font-20 v12-px-2 v12-py-1 v12-radius-50 v12-nowrap">地点</view>
|
||||||
<view class="v12-font-bold v12-font-28 v12-dark-text v12-ml-3">滇池国际会展中心</view>
|
<view class="v12-font-bold v12-font-28 v12-dark-text v12-ml-3">{{ details.address }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="more-wrap v12-mt-3">
|
<view class="more-wrap v12-mt-3">
|
||||||
@@ -41,23 +35,18 @@
|
|||||||
:key="index"
|
:key="index"
|
||||||
@click="getOther(item.id)"
|
@click="getOther(item.id)"
|
||||||
class="v12-white v12-dark-text v12-font-bold v12-font-26 v12-mb-3 v12-radius-50 v12-pa-2">
|
class="v12-white v12-dark-text v12-font-bold v12-font-26 v12-mb-3 v12-radius-50 v12-pa-2">
|
||||||
{{ item.label }}
|
{{ item.name }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import {getWellnessExhibitionDetails, getWellnessExhibition} from '@/api/health'
|
||||||
export default{
|
export default{
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
keyword: '',
|
keyword: '',
|
||||||
moreList: [
|
moreList: [],
|
||||||
{id: 1, label: '文山州麻栗坡县东南亚中药材集散综合开发项目'},
|
|
||||||
{id: 2, label: '文山州麻栗坡县东南亚中药材集散综合开发项目'},
|
|
||||||
{id: 3, label: '文山州麻栗坡县东南亚中药材集散综合开发项目'},
|
|
||||||
{id: 4, label: '文山州麻栗坡县东南亚中药材集散综合开发项目'},
|
|
||||||
{id: 5, label: '文山州麻栗坡县东南亚中药材集散综合开发项目'},
|
|
||||||
],
|
|
||||||
id: '',
|
id: '',
|
||||||
details: {}
|
details: {}
|
||||||
}
|
}
|
||||||
@@ -72,12 +61,24 @@ export default{
|
|||||||
|
|
||||||
},
|
},
|
||||||
getDetails(id) {
|
getDetails(id) {
|
||||||
|
getWellnessExhibitionDetails(id).then(({data}) => {
|
||||||
|
this.details = data
|
||||||
|
this.getOthers()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getOther(id) {
|
getOther(id) {
|
||||||
this.id = id
|
this.id = id
|
||||||
this.getDetails(this.id)
|
this.getDetails(this.id)
|
||||||
},
|
},
|
||||||
|
getOthers() {
|
||||||
|
let params = {
|
||||||
|
page: 1,
|
||||||
|
limit: 5
|
||||||
|
}
|
||||||
|
getWellnessExhibition(params).then(({data}) => {
|
||||||
|
this.moreList = data.records.filter(e => e.id != this.id)
|
||||||
|
})
|
||||||
|
},
|
||||||
toMore() {
|
toMore() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pkg_product/views/expoList'
|
url: '/pkg_product/views/expoList'
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
v-model="keyword"
|
v-model="keyword"
|
||||||
shape="round"
|
shape="round"
|
||||||
:showAction="false"
|
:showAction="false"
|
||||||
|
@search="getList"
|
||||||
></u-search>
|
></u-search>
|
||||||
</view>
|
</view>
|
||||||
<view class="expo-wrap">
|
<view class="expo-wrap">
|
||||||
@@ -15,30 +16,39 @@
|
|||||||
:key="index"
|
:key="index"
|
||||||
@click="toDetails(item)"
|
@click="toDetails(item)"
|
||||||
>
|
>
|
||||||
{{ item.label }}
|
{{ item.name }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { getWellnessExhibition } from '@/api/health'
|
||||||
export default{
|
export default{
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
keyword: '',
|
keyword: '',
|
||||||
expoList: [
|
expoList: []
|
||||||
{id: 1, label: '文山州麻栗坡县东南亚中药材集散综合开发项目'},
|
|
||||||
{id: 2, label: '文山州麻栗坡县东南亚中药材集散综合开发项目'},
|
|
||||||
{id: 3, label: '文山州麻栗坡县东南亚中药材集散综合开发项目'},
|
|
||||||
{id: 4, label: '文山州麻栗坡县东南亚中药材集散综合开发项目'},
|
|
||||||
{id: 5, label: '文山州麻栗坡县东南亚中药材集散综合开发项目'},
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toDetails(item) {
|
toDetails(item) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pkg_product/views/expoDetails?id='+item.id
|
url: '/pkg_product/views/expoDetails?id='+item.id
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
const params = {
|
||||||
|
page: 1,
|
||||||
|
limit: 9999,
|
||||||
|
keyword: this.keyword
|
||||||
|
}
|
||||||
|
getWellnessExhibition(params).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
this.expoList = res.data.records
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ export default{
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.health-foods{
|
.health-foods{
|
||||||
height: 100vh;
|
min-height: 100vh;
|
||||||
background-color: #FAEED8;
|
background-color: #FAEED8;
|
||||||
padding: 20rpx ;
|
padding: 20rpx ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
<view class="v12-justify-start v12-align-center news-wrap v12-radius-100">
|
<view class="v12-justify-start v12-align-center news-wrap v12-radius-100">
|
||||||
<view class="v12-font-bold v12-primary v12-white-text v12-mr-2 v12-pa-2 v12-radius-100 news-title">最新展会</view>
|
<view class="v12-font-bold v12-primary v12-white-text v12-mr-2 v12-pa-2 v12-radius-100 news-title">最新展会</view>
|
||||||
<view class="v12-font-28 v12-dark-text one-t" @click="toExpo">中国昆明第九届国际大健康暨养生养老博览会</view>
|
<view class="v12-font-28 v12-dark-text one-t" @click="toExpo(sanctum.id)">{{ sanctum.name }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="body-box">
|
<view class="body-box">
|
||||||
@@ -103,24 +103,24 @@
|
|||||||
<view
|
<view
|
||||||
v-if="tabIndex === 0"
|
v-if="tabIndex === 0"
|
||||||
class="item item-store"
|
class="item item-store"
|
||||||
@click="goStore(item.id)"
|
@click="goStore(item.id, item.cityName)"
|
||||||
>
|
>
|
||||||
<image
|
<image
|
||||||
:src="item.cover + (item.coverType === 2 ? '?vframe/jpg/offset/1' : '')"
|
:src="item.icon"
|
||||||
class="cover"
|
class="cover"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
/>
|
/>
|
||||||
<view class="name one-t">{{ item.content }}</view>
|
<!-- <view class="name one-t">{{ item.content }}</view> -->
|
||||||
<view class="price store flex ai-center" style="width: 100%;">
|
<view class="store flex ai-center" style="width: 100%;">
|
||||||
<image
|
<!-- <image
|
||||||
:src="item.logo"
|
:src="item.logo"
|
||||||
class="flex-0"
|
class="flex-0"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
/>
|
/> -->
|
||||||
<view class="one-t">{{ item.name }}</view>
|
<view class="one-t v12-font-28" style="color: #033333">{{ item.cityName }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<!-- <view
|
||||||
v-else
|
v-else
|
||||||
class="item"
|
class="item"
|
||||||
@click="goGoods(item.id)"
|
@click="goGoods(item.id)"
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
/>
|
/>
|
||||||
<view class="name more-t">{{ item.storeName }}</view>
|
<view class="name more-t">{{ item.storeName }}</view>
|
||||||
<view class="price">¥{{ item.price }}</view>
|
<view class="price">¥{{ item.price }}</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="tc" v-else>
|
<view class="tc" v-else>
|
||||||
@@ -158,6 +158,7 @@
|
|||||||
// 康养食材
|
// 康养食材
|
||||||
import { fetchCity } from '@/api/wenwan'
|
import { fetchCity } from '@/api/wenwan'
|
||||||
import { wellnessFood, wellnessPlaceList } from '@/api/product'
|
import { wellnessFood, wellnessPlaceList } from '@/api/product'
|
||||||
|
import { getWellnessPlace, getWellnessExhibition } from '@/api/health'
|
||||||
import { getProducts } from '@/api/store'
|
import { getProducts } from '@/api/store'
|
||||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
export default {
|
export default {
|
||||||
@@ -175,7 +176,8 @@ export default {
|
|||||||
asideIndex: 0,
|
asideIndex: 0,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pageKeyId: Object.freeze('wellnessFoodIndex'),
|
pageKeyId: Object.freeze('wellnessFoodIndex'),
|
||||||
label: ''
|
label: '',
|
||||||
|
sanctum: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@@ -191,10 +193,13 @@ export default {
|
|||||||
this.label = this.asideList[this.asideIndex].label
|
this.label = this.asideList[this.asideIndex].label
|
||||||
this.searchReq()
|
this.searchReq()
|
||||||
})
|
})
|
||||||
|
getWellnessExhibition().then(({data}) => {
|
||||||
|
this.sanctum = data.records[0]
|
||||||
|
})
|
||||||
},
|
},
|
||||||
toExpo() {
|
toExpo(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pkg_product/views/expoDetails'
|
url: '/pkg_product/views/expoDetails?id=' + id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeTab(index) {
|
changeTab(index) {
|
||||||
@@ -221,15 +226,17 @@ export default {
|
|||||||
provinceId: this.asideList.length > 0 ? this.asideList[this.asideIndex].provinceId : ''
|
provinceId: this.asideList.length > 0 ? this.asideList[this.asideIndex].provinceId : ''
|
||||||
}
|
}
|
||||||
if (this.tabIndex === 0) {
|
if (this.tabIndex === 0) {
|
||||||
wellnessPlaceList(param).then(({data}) => {
|
// wellnessPlaceList(param).then(({data}) => {
|
||||||
this.handleData(data)
|
// this.handleData(data)
|
||||||
})
|
// })
|
||||||
} else {
|
this.dataList = this.asideList[this.asideIndex].city
|
||||||
param.isWellnessFood = 1
|
}
|
||||||
getProducts(param).then(({data}) => {
|
// else {
|
||||||
this.handleData(data)
|
// param.isWellnessFood = 1
|
||||||
})
|
// getProducts(param).then(({data}) => {
|
||||||
}
|
// this.handleData(data)
|
||||||
|
// })
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
handleData(data) {
|
handleData(data) {
|
||||||
const that = this
|
const that = this
|
||||||
@@ -258,9 +265,9 @@ export default {
|
|||||||
this.label = label
|
this.label = label
|
||||||
this.searchReq()
|
this.searchReq()
|
||||||
},
|
},
|
||||||
goStore(id) {
|
goStore(id, name) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesInn/inn/innHome?id=' + id + '&from=wellness'
|
url: '/pkg_product/views/healthSanctum?city=' + id +'&cityName=' + name
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goGoods(id) {
|
goGoods(id) {
|
||||||
|
|||||||
@@ -5,8 +5,10 @@
|
|||||||
<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 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>
|
||||||
<view class="v12-justify-between v12-align-center v12-mt-5">
|
<view class="v12-justify-between v12-align-center v12-mt-5">
|
||||||
<view class="v12-font-28 v12-secondary-dark-text v12-mr-3">昆明市</view>
|
<view class="v12-font-28 v12-secondary-dark-text v12-mr-3">{{ cityName }}</view>
|
||||||
<view class="flex-1"><u-search :showAction="false"></u-search></view>
|
<view class="flex-1">
|
||||||
|
<u-search :showAction="false" v-model="keyword" @search="search"></u-search>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-justify-between swap">
|
<view class="v12-justify-between swap">
|
||||||
<view v-for="(item, index) in traveItems" :key="index" class="trave-item-wrap v12-mr-3 v12-mt-3">
|
<view v-for="(item, index) in traveItems" :key="index" class="trave-item-wrap v12-mr-3 v12-mt-3">
|
||||||
@@ -18,44 +20,37 @@
|
|||||||
<view
|
<view
|
||||||
class="tab v12-font-bold v12-font-34 v12-dark-text "
|
class="tab v12-font-bold v12-font-34 v12-dark-text "
|
||||||
v-for="(tab, index) in tabs"
|
v-for="(tab, index) in tabs"
|
||||||
@click="handleTab(index)"
|
@click="handleTab(index,tab)"
|
||||||
:key="index">
|
:key="index">
|
||||||
<text>{{ tab.label }}</text>
|
<text>{{ tab.name }}</text>
|
||||||
<view :class="{'slider': index === actived}"></view>
|
<view :class="{'slider': index === actived}"></view>
|
||||||
</view>
|
</view>
|
||||||
</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">
|
<view v-for="(item, index) in items" :key="index" class="v12-pa-1">
|
||||||
<view class="img">
|
<view class="img">
|
||||||
<view class="v12-white-text v12-font-weight-300 address">{{ item.adress }}</view>
|
<image class="img" :src="item.cover"></image>
|
||||||
|
|
||||||
|
<view class="v12-white-text v12-font-weight-300 address">{{ item.areaName }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-font-bold v12-font-28 more-t">{{ item.title }}</view>
|
<view class="v12-font-bold v12-font-28 more-t">{{ item.address }}</view>
|
||||||
<view class="v12-justify-start v12-align-center v12-my-2">
|
<view class="v12-justify-start v12-align-center v12-my-2">
|
||||||
<view class="atr"></view>
|
<view class="atr">
|
||||||
<view class="v12-font-26 v12-ml-2 v12-dark-text one-t">{{ item.name }}</view>
|
<image class="atr" :src="item.logo"></image>
|
||||||
|
</view>
|
||||||
|
<view class="v12-font-26 v12-ml-2 v12-dark-text one-t">{{ item.hotelName }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { getCategory,getWellnessPlace } from '@/api/health'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabs: [
|
tabs: [],
|
||||||
{label: '泡温泉', value: 0},
|
items: [],
|
||||||
{label: '养生茶馆', value: 1},
|
|
||||||
{label: '康养生活', value: 2},
|
|
||||||
{label: '养生食府', value: 3},
|
|
||||||
],
|
|
||||||
items: [
|
|
||||||
{img: '',adress: '昆明', title: '千年矿泉富含硅酸等等24种微量元素', atr: '', name: '末西梓言民宿'},
|
|
||||||
{img: '',adress: '昆明', title: '千年矿泉富含硅酸等等24种微量元素', atr: '', name: '末西梓言民宿'},
|
|
||||||
{img: '',adress: '昆明', title: '千年矿泉富含硅酸等等24种微量元素', atr: '', name: '末西梓言民宿'},
|
|
||||||
{img: '',adress: '昆明', title: '千年矿泉富含硅酸等等24种微量元素', atr: '', name: '末西梓言民宿'},
|
|
||||||
{img: '',adress: '昆明', title: '千年矿泉富含硅酸等等24种微量元素', atr: '', name: '末西梓言民宿'},
|
|
||||||
{img: '',adress: '昆明', title: '千年矿泉富含硅酸等等24种微量元素', atr: '', name: '末西梓言民宿'},
|
|
||||||
],
|
|
||||||
traveItems: [
|
traveItems: [
|
||||||
{img: '', value: ''},
|
{img: '', value: ''},
|
||||||
{img: '', value: ''},
|
{img: '', value: ''},
|
||||||
@@ -66,18 +61,49 @@ export default {
|
|||||||
{img: '', value: ''},
|
{img: '', value: ''},
|
||||||
{img: '', value: ''},
|
{img: '', value: ''},
|
||||||
],
|
],
|
||||||
actived: 0
|
actived: 0,
|
||||||
|
cityId: '',
|
||||||
|
cityName: '',
|
||||||
|
categoryId: null,
|
||||||
|
keyword: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad(opts) {
|
||||||
|
this.cityId = opts.city
|
||||||
|
this.cityName = opts.cityName
|
||||||
|
getCategory().then(res => {
|
||||||
|
this.tabs = res.data
|
||||||
|
this.categoryId = res.data[0].id
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleTab(index) {
|
handleTab(index, tab) {
|
||||||
this.actived = index
|
this.actived = index
|
||||||
|
this.categoryId = tab.id
|
||||||
|
this.getList()
|
||||||
},
|
},
|
||||||
toFoods() {
|
toFoods() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pkg_product/views/healthFoods'
|
url: '/pkg_product/views/healthFoods'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getList() {
|
||||||
|
const params = {
|
||||||
|
goodCityId: this.cityId,
|
||||||
|
categoryId: this.categoryId,
|
||||||
|
keyword: this.keyword,
|
||||||
|
page: 1,
|
||||||
|
limit: 9999
|
||||||
|
}
|
||||||
|
getWellnessPlace(params).then(res => {
|
||||||
|
// console.log(res);
|
||||||
|
this.items = res.data.records
|
||||||
|
})
|
||||||
|
},
|
||||||
|
search() {
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -123,13 +149,12 @@ export default {
|
|||||||
.atr{
|
.atr{
|
||||||
width: 52rpx;
|
width: 52rpx;
|
||||||
height: 52rpx;
|
height: 52rpx;
|
||||||
background: #707070;
|
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
.img{
|
.img{
|
||||||
width: 320rpx;
|
width: 320rpx;
|
||||||
height: 320rpx;
|
height: 320rpx;
|
||||||
background: #707070;
|
// background: #707070;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user