Authored by 陈轩

fix

... ... @@ -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);
}
... ...
... ... @@ -79,7 +79,7 @@
return $.get(this.url, Object.assign({
order: this.order,
page: nextPage
}, this.filter, locationQuery))
}, locationQuery, this.filter))
.done(res => {
if (res.data) {
self.page = res.data.page;
... ...
... ... @@ -72,7 +72,7 @@
this.inSearching = true;
return $.get(this.url, Object.assign({
page: nextPage
}, this.filter, locationQuery))
}, locationQuery, this.filter))
.done(res => {
if (res.code === 200) {
self.page = res.data.page;
... ...
... ... @@ -123,7 +123,7 @@
this.inSearching = true;
$.get(this.url, Object.assign({
page: nextPage
}, this.filter, locationQuery)).done(result => {
}, locationQuery, this.filter)).done(result => {
if (result.code === 200) {
self.page = result.data.page;
self.totalPage = result.data.pageTotal;
... ...