Authored by 张文文

自定义价格fix review by lea.guo

@@ -178,7 +178,9 @@ export default { @@ -178,7 +178,9 @@ export default {
178 submit() { 178 submit() {
179 // 自定义价格塞进params里 179 // 自定义价格塞进params里
180 if (this.filterParams.price.length === 0) { 180 if (this.filterParams.price.length === 0) {
181 - this.filterParams.price = [this.lowPrice, this.highPrice]; 181 + if (this.lowPrice || this.highPrice) {
  182 + this.filterParams.price = [this.lowPrice, this.highPrice];
  183 + }
182 } 184 }
183 185
184 let params = { 186 let params = {
@@ -186,9 +186,7 @@ export default { @@ -186,9 +186,7 @@ export default {
186 this.searchParams = searchParams; 186 this.searchParams = searchParams;
187 } 187 }
188 188
189 - console.log('this.searchParams', this.searchParams);  
190 -  
191 - // return; 189 + // console.log('this.searchParams', this.searchParams);
192 190
193 let page = isReset ? 1 : (list.page + 1); 191 let page = isReset ? 1 : (list.page + 1);
194 192
@@ -253,8 +251,8 @@ export default { @@ -253,8 +251,8 @@ export default {
253 brand: filterParams.brand.join(','), // 品牌id 251 brand: filterParams.brand.join(','), // 品牌id
254 gender: filterParams.gender.join(','), // 性别 252 gender: filterParams.gender.join(','), // 性别
255 size: filterParams.size.join(','), // 尺码id 253 size: filterParams.size.join(','), // 尺码id
256 - preSale_flag: filterParams.preSale_flag.join(','), // 新旧程度id  
257 - price: filterParams.price.join(','), // 价格id 254 + preSale_flag: filterParams.preSale_flag.join(','), // 新旧程度
  255 + price: filterParams.price.join(','), // 价格
258 }; 256 };
259 257
260 for (let i in params) { 258 for (let i in params) {
1 -import Vue from 'vue';  
2 -  
3 export default function() { 1 export default function() {
4 return { 2 return {
5 namespaced: true, 3 namespaced: true,
@@ -22,10 +20,10 @@ export default function() { @@ -22,10 +20,10 @@ export default function() {
22 }, 20 },
23 21
24 // 查询二手/瑕疵筛选列表 22 // 查询二手/瑕疵筛选列表
25 - async fetchSecondFilterData({commit, state}) { 23 + async fetchSecondFilterData({commit}) {
26 let {data} = await this.$api.get('/api/ufo/secondhand/filterData'); 24 let {data} = await this.$api.get('/api/ufo/secondhand/filterData');
27 25
28 - commit('setFilterData', data.filter); 26 + commit('setFilterData', data.filter || []);
29 27
30 return data.filter || []; 28 return data.filter || [];
31 }, 29 },