Authored by 张文文

自定义价格fix review by lea.guo

... ... @@ -178,7 +178,9 @@ export default {
submit() {
// 自定义价格塞进params里
if (this.filterParams.price.length === 0) {
this.filterParams.price = [this.lowPrice, this.highPrice];
if (this.lowPrice || this.highPrice) {
this.filterParams.price = [this.lowPrice, this.highPrice];
}
}
let params = {
... ...
... ... @@ -186,9 +186,7 @@ export default {
this.searchParams = searchParams;
}
console.log('this.searchParams', this.searchParams);
// return;
// console.log('this.searchParams', this.searchParams);
let page = isReset ? 1 : (list.page + 1);
... ... @@ -253,8 +251,8 @@ export default {
brand: filterParams.brand.join(','), // 品牌id
gender: filterParams.gender.join(','), // 性别
size: filterParams.size.join(','), // 尺码id
preSale_flag: filterParams.preSale_flag.join(','), // 新旧程度id
price: filterParams.price.join(','), // 价格id
preSale_flag: filterParams.preSale_flag.join(','), // 新旧程度
price: filterParams.price.join(','), // 价格
};
for (let i in params) {
... ...
import Vue from 'vue';
export default function() {
return {
namespaced: true,
... ... @@ -22,10 +20,10 @@ export default function() {
},
// 查询二手/瑕疵筛选列表
async fetchSecondFilterData({commit, state}) {
async fetchSecondFilterData({commit}) {
let {data} = await this.$api.get('/api/ufo/secondhand/filterData');
commit('setFilterData', data.filter);
commit('setFilterData', data.filter || []);
return data.filter || [];
},
... ...