Feat:康养页面细节调整(已完成)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view class="pkg-product-list">
|
||||
<view class="first-half">
|
||||
<view class="search-box flex v12-justify-start ai-center">
|
||||
<image
|
||||
<view class="v12-px-3 v12-mb-4">
|
||||
<!-- <image
|
||||
:src="webUrl+'/20220903142935869059.png'"
|
||||
class="icon v12-mr-3"
|
||||
mode="scaleToFill"
|
||||
@@ -11,10 +11,16 @@
|
||||
<input
|
||||
v-model="keyword"
|
||||
type="text"
|
||||
placeholder="搜索城市"
|
||||
placeholder-style="color:#949494"
|
||||
@confirm="searchClick"
|
||||
>
|
||||
> -->
|
||||
<u-search
|
||||
:showAction="false"
|
||||
v-model="keyword"
|
||||
bgColor="#f2f2f2"
|
||||
placeholder="搜索城市"
|
||||
searchIconColor="#C52733"
|
||||
@search="searchClick"></u-search>
|
||||
</view>
|
||||
<swiper
|
||||
v-if="bannerList.length > 0"
|
||||
@@ -215,8 +221,25 @@ export default {
|
||||
this.searchReq()
|
||||
},
|
||||
searchClick() {
|
||||
this.page = 1
|
||||
this.searchReq()
|
||||
// this.page = 1
|
||||
// this.searchReq()
|
||||
const searchMap = this.asideList.map((e, i) => {
|
||||
return e.city.map(_e => {
|
||||
return {
|
||||
index: i,
|
||||
..._e
|
||||
}
|
||||
})
|
||||
}).flat()
|
||||
// console.log(searchMap);
|
||||
const filterMap = searchMap.filter(el => el.cityName.includes(this.keyword))
|
||||
if(filterMap.length === 0) {
|
||||
return
|
||||
} else {
|
||||
this.asideIndex = filterMap[0].index
|
||||
this.searchReq()
|
||||
}
|
||||
|
||||
},
|
||||
searchReq() {
|
||||
let param = {
|
||||
@@ -229,6 +252,7 @@ export default {
|
||||
// wellnessPlaceList(param).then(({data}) => {
|
||||
// this.handleData(data)
|
||||
// })
|
||||
this.label = this.asideList[this.asideIndex].label
|
||||
this.dataList = this.asideList[this.asideIndex].city
|
||||
}
|
||||
// else {
|
||||
|
||||
Reference in New Issue
Block a user