Feat:康养页面细节调整(已完成)

This commit is contained in:
modendeveloper
2024-10-09 23:58:37 +08:00
parent b397ba232f
commit 8c2e785ea0
5 changed files with 161 additions and 84 deletions
+30 -6
View File
@@ -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 {