Authored by ccbikai

Merge branch 'develop' into release/1.0

... ... @@ -7,6 +7,11 @@ const processProductList = require(`${global.utils}/beautify/product`);
/* 查询最新产品列表 */
exports.getNewData = (params) => {
if (params.hasOwnProperty('priceRange')) {
params.price = params.priceRange;
delete params.priceRange;
}
params = Object.assign({
method: 'app.search.newProduct',
}, params);
... ...
... ... @@ -19,6 +19,7 @@ const search = {
cache: true,
code: 200
}).then(result => {
result = result || {};
if (result.data) {
prettyFilter(result.data.filter);
result = camelCase(result);
... ...
... ... @@ -15,9 +15,9 @@
(function(d,c){var e=d.documentElement,a="orientationchange" in window?"orientationchange":"resize",b=function(){var f=e.clientWidth;if(!f){return}if(f>=750){e.style.fontSize="40px"}else{e.style.fontSize=40*(f/750)+"px"}};if(!d.addEventListener){return}b();c.addEventListener(a,b,false);d.addEventListener("DOMContentLoaded",b,false)})(document,window);
</script>
{{#if devEnv}}
<link rel="stylesheet" href="//localhost:5004/css/index.css">
<link rel="stylesheet" media="all" href="//localhost:5004/css/index.css">
{{#unless noLocalCSS}}
<link rel="stylesheet" href="//localhost:5004/{{module}}.{{page}}.css">
<link rel="stylesheet" media="all" href="//localhost:5004/{{module}}.{{page}}.css">
{{/unless}}
{{^}}
<link rel="stylesheet" href="//cdn.yoho.cn/yohoblk-wap/{{version}}/index.css">
... ...
... ... @@ -101,6 +101,7 @@
& + .item {
height: 142px;
line-height: 142px;
font-family: "PingFang SC", Helvetica, Roboto, "Heiti SC", "黑体", Arial;
}
}
}
... ...
... ... @@ -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;
}
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;
... ...