1、鏈接:/pages/goods/goods_list/index.vue
方便復制:
v-if="(promotionList.length || where.promotions_id) && !cateSearch"
方便復制:
parseInt(options.sid)
查找函數getSearchFilter()刪除如下圖所示:
查找函數:promotionTap(); 注:記得刪除原函數里面的第一條;函數內容如下圖所示:
方便復制:
if(this.where.promotions_id == item.id){
this.where.promotions_id = 0;
}else{
this.where.promotions_id = item.id;
}
2、鏈接:/pages/goods/components/filterDrwer/index.vue
方便復制:
promotions_id: 0
promotionId:{
handler(val){
this.promotions_id = val;
},
immediate:true
},
查找函數checkPromotion();
方便復制:
if(this.promotions_id == item.id){
this.promotions_id = 0
}else{
this.promotions_id = item.id;
}
查找函數:confirmFilter()和 resetFilter()
方便復制:
promotions_id: this.promotions_id,
this.promotions_id = 0;
方便復制:
:class="{active: promotions_id==item.id}"
3、修改完之后,記得打包上傳