...
|
...
|
@@ -31,8 +31,11 @@ |
|
|
let locationQuery = qs(decodeURIComponent(location.search.replace(/^\?/, '')));
|
|
|
let hasSort = !!locationQuery.sort;
|
|
|
|
|
|
// filter 字段 对应 的 查询 字段
|
|
|
const aliasMap = {
|
|
|
groupSort: 'sort'
|
|
|
groupSort: 'sort',
|
|
|
priceRange: 'price',
|
|
|
discount: 'p_d'
|
|
|
};
|
|
|
|
|
|
module.exports = {
|
...
|
...
|
@@ -97,15 +100,12 @@ |
|
|
|
|
|
let filter = {};
|
|
|
$.each(this.selected, (type, item) => {
|
|
|
if (item.id) {
|
|
|
filter[type] = item.id;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
let query;
|
|
|
query = $.extend({}, locationQuery, filter);
|
|
|
query = $.param(query);
|
|
|
|
|
|
if (history.replaceState) {
|
|
|
history.replaceState({}, '', location.pathname + '?'+ query);
|
|
|
}
|
...
|
...
|
|