pull/3/head
lixuan 2 years ago
parent 3ebb5ec952
commit fee01ae875
  1. 16
      components/sl-filter/filter-view.vue
  2. 7
      pages/tabbar/station/stationList.vue

@ -3,21 +3,27 @@
<view>
<view style="padding: 0px 0px;">
<view class="filter-content" v-for="(item, index) in menuList" :key="index" v-if="menuIndex == index">
<view v-if="item.isSort">
<!-- <view v-if="item.isSort">
<view class="filter-content-list">
<view v-for="(detailItem,idx) in selectDetailList" :key="idx" :class="detailItem.isSelected?'filter-content-list-item-active':'filter-content-list-item-default'"
:style="{'color': detailItem.isSelected?themeColor:'#666666'}" @tap="sortTap(idx,selectDetailList,item.key)">
<text>{{detailItem.title}}</text>
</view>
</view>
</view>
<view v-else>
</view> -->
<view>
<view classs="filter-content-title" v-if="item.detailTitle && item.detailTitle.length">
<text>{{item.detailTitle}}</text>
</view>
<!-- <view class="filter-content-detail show_min_height"> -->
<scroll-view scroll-y="true" >
<view class="">
<view class="filter-content-detail show_min_height">
<text v-if="( productCodeLable? index==3 : false ) " v-for="( detailItem,idx) in selectDetailLists" :key="idx" class='filter-content-detail-item-default' :style="{'background-color':detailItem.isSelected?themeColor:'#FFFFFF','color':detailItem.isSelected?'#FFFFFF':'#666666'}"
@tap="itemTap(idx,selectDetailLists,item.isMutiple,item.key,detailItem)">
{{detailItem.title}}
</text>
</view>
<view class="filter-content-detail show_min_height">
<text v-if="( productCodeLable? index!==2 : true ) " v-for="( detailItem,idx) in selectDetailList" :key="idx" class='filter-content-detail-item-default' :style="{'background-color':detailItem.isSelected?themeColor:'#FFFFFF','color':detailItem.isSelected?'#FFFFFF':'#666666'}"
@tap="itemTap(idx,selectDetailList,item.isMutiple,item.key,detailItem)">
@ -81,6 +87,7 @@
result: {},
menuIndex: 0,
selectDetailList: [],
selectDetailLists: [],
independenceObj: {},
selectedKey: '',
cacheSelectedObj: {},
@ -347,6 +354,7 @@
console.log('展开')
this.menuIndex = index;
this.selectDetailList = this.menuList[index].detailList;
this.selectDetailLists = this.menuList[index].detailLists;
this.selectedKey = this.menuList[index].key;
//
if (this.independence && !this.menuList[index].isSort) {
@ -475,7 +483,6 @@
},
resetSelected(list, key) {
console.log('%c 重置方法第二步resetSelected函数参数↓','color:green;font-size:30px')
console.log(list, key)
if (typeof this.result[key] == 'object') {
this.result[key] = [];
this.selectedTitleObj[key] = list[0].title;
@ -490,6 +497,7 @@
list[i].isSelected = false;
}
}
console.log(this.result)
// #ifdef H5
this.$forceUpdate();
// #endif

@ -131,6 +131,10 @@
key: 'siteBrand',
isSort: true,
isMutiple: false,
detailLists:[{
title: "全部",
value: ""
}],
detailList: [{
title: "全部",
value: ""
@ -379,7 +383,8 @@
this.productCodeList = uni.getStorageSync('productCodeList')
// console.log(this.productCodeList,'')
res.data.channelCodes.map(item => {
this.menuList[1].detailList.push({
// this.menuList[1].detailList.push({
this.menuList[3].detailLists.push({
title: item.name,
value: item.id
})

Loading…
Cancel
Save