diff --git a/pages/whole_sale/index.vue b/pages/whole_sale/index.vue index a61a819..799f1d6 100644 --- a/pages/whole_sale/index.vue +++ b/pages/whole_sale/index.vue @@ -541,7 +541,7 @@ this.initData(); }, methods: { - initData(re, stop){ + initData(re=false, stop=false){ if(!stop) this.getStoreCategory(); if (this.tabsCurr==2&&this.subCurr==0) this.storeMerchantList(re, stop); else this.getProductslist(re, stop); @@ -578,8 +578,7 @@ uni.$once('searchValue', (e) => { this.$nextTick(() => { this.where.keyword = e; - if(this.tabsCurr==2&&this.subCurr==0) this.storeMerchantList(true); - this.getProductslist(true); + this.initData(true); }) }) } @@ -638,10 +637,11 @@ this.getProductslist(true); }, getStoreCategory() { + this.store_category = []; if (this.tabsCurr == 1) getStoreCategory(259).then(res => { this.initStoreCate(res); }) - if (this.tabsCurr == 2 && this.subCurr==0) merClassifly().then(res => { + else if (this.tabsCurr == 2 && this.subCurr==0) merClassifly().then(res => { this.store_category = [{ category_name: '全部', merchant_category_id: '',