|
@@ -287,52 +287,6 @@
|
|
|
:style="{ paddingTop: CustomBar + 'px', paddingBottom: isIphoneX ? '180rpx' : '146rpx' }"
|
|
|
>
|
|
|
<scroll-view class="tui-drawer-scroll" scroll-y :style="{ height: drawerH + 'px' }">
|
|
|
- <view class="drawer-title">
|
|
|
- <view class="drawer-title-h1">{{ classData.name }}</view>
|
|
|
- </view>
|
|
|
- <view class="drawer-main">
|
|
|
- <view class="drawer-main-cell clearfix">
|
|
|
- <template v-if="classData.smallTypeList">
|
|
|
- <view
|
|
|
- class="drawer-item-cell"
|
|
|
- v-for="(item, index) in classData.smallTypeList"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <view class="drawer-item-title">{{ item.name }}</view>
|
|
|
- <view class="drawer-item-main" v-if="item.tinyTypeList">
|
|
|
- <text
|
|
|
- class="drawer-item-text"
|
|
|
- :class="tiny.isChecked ? 'checked' : ''"
|
|
|
- v-for="(tiny, tinyIndex) in item.tinyTypeList"
|
|
|
- :key="tinyIndex"
|
|
|
- @click="SearchCondition(3, item, tiny)"
|
|
|
- >{{ tiny.name }}</text
|
|
|
- >
|
|
|
- </view>
|
|
|
- <view class="drawer-item-main" v-else>
|
|
|
- <text
|
|
|
- class="drawer-item-text"
|
|
|
- :class="item.isChecked ? 'checked' : ''"
|
|
|
- @click="SearchCondition(2, item)"
|
|
|
- >全部商品</text
|
|
|
- >
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <view class="drawer-item-cell">
|
|
|
- <view class="drawer-item-main none">
|
|
|
- <text
|
|
|
- class="drawer-item-text"
|
|
|
- :class="classData.isChecked ? 'checked' : ''"
|
|
|
- @click="SearchCondition(1, classData)"
|
|
|
- >全部商品</text
|
|
|
- >
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
<view class="drawer-title">
|
|
|
<view class="drawer-title-h1">品牌</view>
|
|
|
<view class="drawer-title-p"
|
|
@@ -440,6 +394,7 @@ export default {
|
|
|
checkedBrandLength: 0,
|
|
|
windowHeight: '',
|
|
|
scrollHeight: '',
|
|
|
+ pathQueryId:0,
|
|
|
listQuery: {
|
|
|
id: 0,
|
|
|
identity: 0,
|
|
@@ -493,7 +448,7 @@ export default {
|
|
|
methods: {
|
|
|
async initGetStotage(option) {
|
|
|
const userInfo = await this.$api.getStorage()
|
|
|
- this.listQuery.id = this.brandParam.id = option.id
|
|
|
+ this.listQuery.id = this.pathQueryId = this.brandParam.id = option.id
|
|
|
this.listQuery.identity = this.identity
|
|
|
this.listQuery.idType = this.classifyType = this.brandParam.idType = Number(option.classType)
|
|
|
uni.setNavigationBarTitle({ title: option.title })
|
|
@@ -535,12 +490,12 @@ export default {
|
|
|
el.isChecked = false
|
|
|
return el
|
|
|
})
|
|
|
- if(this.defaultBrandLists.length>8){
|
|
|
+ if(this.defaultBrandLists.length>11){
|
|
|
this.isShowAllBrands = false
|
|
|
}else{
|
|
|
this.isShowAllBrands = true
|
|
|
}
|
|
|
- this.brandLists = this.defaultBrandLists.slice(0, 8)
|
|
|
+ this.brandLists = this.defaultBrandLists.slice(0, 11)
|
|
|
console.log('品牌=============>', this.brandLists)
|
|
|
})
|
|
|
.catch(error => {
|
|
@@ -713,58 +668,13 @@ export default {
|
|
|
handSearchList() {
|
|
|
//确定筛选
|
|
|
if (this.searchCheckedId == null) {
|
|
|
- this.listQuery.id = this.classData.bigTypeId
|
|
|
+ this.listQuery.id = this.pathQueryId
|
|
|
} else {
|
|
|
this.listQuery.id = this.searchCheckedId
|
|
|
}
|
|
|
this.rightDrawer = false
|
|
|
this.GetProductListInfo()
|
|
|
},
|
|
|
- SearchCondition(type, item, tiny) {
|
|
|
- //选择筛选分类
|
|
|
- this.listQuery.idType = type
|
|
|
- const {
|
|
|
- classData,
|
|
|
- classData: { smalltypeList }
|
|
|
- } = this
|
|
|
- classData.isChecked = false
|
|
|
- if (smalltypeList && smalltypeList.length > 0) {
|
|
|
- smalltypeList.forEach((item, index) => {
|
|
|
- item.isChecked = false
|
|
|
- const { tinytypeList } = item
|
|
|
- if (tinytypeList && tinytypeList.length > 0) {
|
|
|
- tinytypeList.forEach((tinyItem, tinyIndex) => {
|
|
|
- tinyItem.isChecked = false
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- switch (type) {
|
|
|
- case 1:
|
|
|
- console.log('1级分类全部商品', item)
|
|
|
- item.isChecked = !item.isChecked
|
|
|
- this.searchCheckedId = item.bigTypeId
|
|
|
- break
|
|
|
- case 2:
|
|
|
- console.log('2级分类全部商品', item)
|
|
|
- item.isChecked = !item.isChecked
|
|
|
- if (item.isChecked) {
|
|
|
- this.searchCheckedId = item.smallTypeId
|
|
|
- } else {
|
|
|
- this.searchCheckedId = ''
|
|
|
- }
|
|
|
- break
|
|
|
- case 3:
|
|
|
- console.log('3级分类', tiny)
|
|
|
- tiny.isChecked = !tiny.isChecked
|
|
|
- if (tiny.isChecked) {
|
|
|
- this.searchCheckedId = tiny.tinyTypeId
|
|
|
- } else {
|
|
|
- this.searchCheckedId = ''
|
|
|
- }
|
|
|
- break
|
|
|
- }
|
|
|
- },
|
|
|
navToDetailPage(id) {
|
|
|
this.isModallayer = true
|
|
|
this.$api.navigateTo(`/pages/goods/product?id=${id}`)
|