search-list.page.js
1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* 搜索商品列表页
*/
import 'product/search/list.page.css';
import Page from 'yoho-page';
import noResultHbs from 'product/search/no-result-new.hbs';
import ProductListWithFilter from './list/product-list-with-filter';
import qs from 'yoho-qs';
import SearchListExtra from './search/search-list-extra';
import 'common/footer';
class Search extends Page {
constructor() {
super();
this.selector = {
goodsContainer: $('#goods-container'),
defaultGoods: $('.default-goods')
};
this.firstScreen = this.selector.defaultGoods.children().size() > 0;
if (!this.firstScreen) {
this.selector.goodsContainer.html(noResultHbs());
}
let initParams = {
page: 2
};
if (qs) {
$.extend(initParams, qs);
}
new ProductListWithFilter(initParams, null, {
scrollActived: this.firstScreen
});
new SearchListExtra();
}
}
export default new Search();