Showing
19 changed files
with
1392 additions
and
375 deletions
@@ -73,6 +73,11 @@ Done ? 'congratulations' : '看看是不是缺了什么,不能解决的时候 | @@ -73,6 +73,11 @@ Done ? 'congratulations' : '看看是不是缺了什么,不能解决的时候 | ||
73 | * GIT使用规范你需要熟读,可以看[git flow](http://git.dev.yoho.cn/web/learning-documentation/wikis/home)、[pro git](http://git-scm.com/book/en/v2) | 73 | * GIT使用规范你需要熟读,可以看[git flow](http://git.dev.yoho.cn/web/learning-documentation/wikis/home)、[pro git](http://git-scm.com/book/en/v2) |
74 | * 其他开发中使用到的东西(handlebars,sass,seajs,spm等)请参考git库web/learing documentation或者自行google | 74 | * 其他开发中使用到的东西(handlebars,sass,seajs,spm等)请参考git库web/learing documentation或者自行google |
75 | 75 | ||
76 | +## FE开发规则 | ||
77 | +* HTML请包裹`<div class="your-page yoho-page"></div>` | ||
78 | +* css请包裹 `.your-page{...}`,防止样式污染 | ||
79 | +* 数据结构需及时更新维护至docs/data-structure.md和docs/web-data-structure.md | ||
80 | + | ||
76 | ## 附:Nginx配置 | 81 | ## 附:Nginx配置 |
77 | 82 | ||
78 | ``` | 83 | ``` |
docs/web-data-structure.md
0 → 100644
1 | +# WEB数据结构定义 | ||
2 | + | ||
3 | +## 公共定义 | ||
4 | + | ||
5 | +### 商品 | ||
6 | + | ||
7 | + | ||
8 | +## 搜索页 | ||
9 | + | ||
10 | + { | ||
11 | + products: { | ||
12 | + //筛选相关 | ||
13 | + filters: { | ||
14 | + checkedConditions: { | ||
15 | + clearUrl: '', //清空筛选链接 | ||
16 | + conditions: [ | ||
17 | + //正常情况下文字显示 | ||
18 | + { | ||
19 | + href: '', | ||
20 | + name: '暗黑' | ||
21 | + }, | ||
22 | + //特殊情况下颜色显示 | ||
23 | + { | ||
24 | + href: '', | ||
25 | + 'color': '#f00' | ||
26 | + }, | ||
27 | + ... | ||
28 | + ] | ||
29 | + }, | ||
30 | + //-- 筛选项数据Start(需要显示就传,不显示不传) -- | ||
31 | + channel: [ | ||
32 | + { | ||
33 | + href: '', | ||
34 | + name: 'Boys' | ||
35 | + }, | ||
36 | + ... | ||
37 | + ], | ||
38 | + sort: [ | ||
39 | + { | ||
40 | + name: '上衣', | ||
41 | + sub: [ | ||
42 | + { | ||
43 | + href: '', | ||
44 | + name: 'T恤' | ||
45 | + }, | ||
46 | + ... | ||
47 | + ] | ||
48 | + }, | ||
49 | + ... | ||
50 | + ], | ||
51 | + brand: { | ||
52 | + default: [ | ||
53 | + { | ||
54 | + href: '', | ||
55 | + name: '' | ||
56 | + }, | ||
57 | + ... | ||
58 | + ], | ||
59 | + //索引:index为索引键值(字母转化为小写) | ||
60 | + brandIndex: [ | ||
61 | + { | ||
62 | + index: 'all', | ||
63 | + name: '全部' | ||
64 | + }, | ||
65 | + { | ||
66 | + index: '0-9', | ||
67 | + name: '0 ~ 9' | ||
68 | + }, | ||
69 | + { | ||
70 | + index: 'a', | ||
71 | + name: 'A' | ||
72 | + }, | ||
73 | + ... | ||
74 | + ], | ||
75 | + brandShow: [ | ||
76 | + { | ||
77 | + id: 1, | ||
78 | + href: '', | ||
79 | + index:'0-9', //与brandIndex中索引一致 | ||
80 | + name: '5cm', | ||
81 | + key: '5cm' //key为品牌关键字,用于搜索和索引,保持小写 | ||
82 | + }, | ||
83 | + { | ||
84 | + id: 2, | ||
85 | + href: '', | ||
86 | + index: 'k', | ||
87 | + name: 'KTZ', | ||
88 | + key: 'ktz' | ||
89 | + }, | ||
90 | + ... | ||
91 | + ], | ||
92 | + price: [ | ||
93 | + { | ||
94 | + href: '', | ||
95 | + name: '0-239' | ||
96 | + }, | ||
97 | + ... | ||
98 | + ], | ||
99 | + color: [ | ||
100 | + { | ||
101 | + href: '', | ||
102 | + name: '黑色', | ||
103 | + rgb: '#000' //此处若为彩色和银色,需要传图片路径字符串:url('path/to/img') | ||
104 | + }, | ||
105 | + ... | ||
106 | + ], | ||
107 | + size: [ | ||
108 | + { | ||
109 | + href: '', | ||
110 | + name: '' | ||
111 | + }, | ||
112 | + ... | ||
113 | + ], | ||
114 | + seniorChose: [ | ||
115 | + { | ||
116 | + attr: 'style', //查找的键值 | ||
117 | + name: '风格', | ||
118 | + showMulti: true, //是否显示多选按钮 | ||
119 | + sub: [ | ||
120 | + { | ||
121 | + id: '', | ||
122 | + href: '', | ||
123 | + name: '' | ||
124 | + }, | ||
125 | + ... | ||
126 | + ] | ||
127 | + }, | ||
128 | + ... | ||
129 | + ] | ||
130 | + } | ||
131 | + }, | ||
132 | + //操作Banner相关 | ||
133 | + opts: { | ||
134 | + sortType: [ | ||
135 | + { | ||
136 | + href: '', | ||
137 | + name: '默认' | ||
138 | + }, | ||
139 | + { | ||
140 | + active: true, //当前选中 | ||
141 | + href: '', | ||
142 | + name: '最新', | ||
143 | + hasSortOrient: true, //是否有正逆序 | ||
144 | + desc: true //逆序排序(默认不传为正序) | ||
145 | + }, | ||
146 | + { | ||
147 | + href: '', | ||
148 | + name: '价格', | ||
149 | + hasSortOrient: true | ||
150 | + }, | ||
151 | + { | ||
152 | + href: '', | ||
153 | + name: '折扣', | ||
154 | + hasSortOrient: true | ||
155 | + } | ||
156 | + ], | ||
157 | + checks: [ | ||
158 | + { | ||
159 | + name: '新品', | ||
160 | + checked: true, | ||
161 | + href: '' | ||
162 | + }, | ||
163 | + { | ||
164 | + name: '打折', | ||
165 | + href: '' | ||
166 | + }, | ||
167 | + { | ||
168 | + name: '限量', | ||
169 | + href: '' | ||
170 | + } | ||
171 | + ], | ||
172 | + fivePerLine: true, | ||
173 | + sixPerLineHref: '', | ||
174 | + //or | ||
175 | + sixPerLine: true, | ||
176 | + fivePerLineHref: '', | ||
177 | + | ||
178 | + countPerPage => 120, | ||
179 | + pageCounts => [ | ||
180 | + { | ||
181 | + href: '', | ||
182 | + count: 60 | ||
183 | + }, | ||
184 | + ... | ||
185 | + ], | ||
186 | + | ||
187 | + | ||
188 | + curPage: 1, | ||
189 | + pageCount: 30, | ||
190 | + preHref: '', //若当前为第一页,不传此参数 | ||
191 | + nexHref: '' //若当前为最后一页,不传此参数 | ||
192 | + }, | ||
193 | + //商品列表 | ||
194 | + } | ||
195 | + } |
gitlab_rsa
0 → 100644
1 | +-----BEGIN RSA PRIVATE KEY----- | ||
2 | +MIIEowIBAAKCAQEAyl0d0lSBX/lMWEK6m7hdz/ggsqTugK63P7/d9Aph2R9cmqFT | ||
3 | +8LsBslzsYK5We4IDPXsvQ6ME8nnelBo9jg+e5sBqG9+hZXKrujK4QBvhAYVA99Sf | ||
4 | +ykv6NP5WVbavuVnZRiw1JcjAojjC6a6fBS7lFLvCGVxKi4a2p1mtUr9EWfD2LEWw | ||
5 | +3ai0AvB2xFsLJGoJ7iCexF1LJ+W/oeNTfu7jI+Z1CHfCELyncAiXeXkRQmNuWxxx | ||
6 | +rptURRS+IRUJPlx6dOfnue3bHdFY3YoU66icLLLKJTi7aJy+CTudZv0uJgtSPAzW | ||
7 | +j8ELKWhHsSgIvyi/gF5rTcz9r2YbXxsnpQdSowIDAQABAoIBACq8H2AbmHa8HvNE | ||
8 | +pEPeW3Ff5QfU7MkgHHLKAgVXa/J+PQAqsZ9U3rbcCM8iAgFzI1wId6LA+np6YhbE | ||
9 | +s9scUWJJoB7iyyKxZLKdo2tmd83qZh3wOQ5vnRcz3uea/OEXqFq5Wz/vdT7M3dyb | ||
10 | +k9l0XcxTGlpgsx1kBY6x0Xh4C+cyK2sSZoyUpH345SK5nyIdp3QyDUx0all152Kp | ||
11 | +riJmSHTw09w/gppTwVTNiSWXy0OvnYV3TACjVJ4+Z2hOOu6WhJLlOJWxky0vC3FQ | ||
12 | +PZ9kKgS88MEqo4zpqCqhtpZYJDwiY1OxzWt743zYTmBMgfn0cz2uv/hhCFmI5z8h | ||
13 | +qtwJCAECgYEA9ESnM62fF5ZtaqfozK3NyZnJijtEO3pm6+/fbhqAyWmWQss3RS22 | ||
14 | +2EcwYd/i+NJJ5JbhVx2dunQqnblISnIxH0mTv5U/l28AhZ+vLQVABxQi6ImJhlcb | ||
15 | +wwUEFN4hcNEfflpDFkP/V5KqSZDFnS6KZmAnyNjMj/fSMQk7qK4RfEECgYEA1BU8 | ||
16 | +f5L5nBRdsxwsXVJEeNKJXV4nJCNHw44vYvL/gkmt2c2dcEZYdetOoPkpdu5FUSU2 | ||
17 | +7uoVxZaORsFelzLWp6WsI4CIz2Vgy4pKgAbuLfB6xFf/Bw5MzHjvmBI0VHwpGZ1T | ||
18 | +8OHt0VGRGJppeyGEWyh2mqFgTdrF6sdauU9g5eMCgYEAjaPpmGvK3rCZjckDkvwN | ||
19 | +YiNM3Fz1ec/GMnWLh5rSpvgU63JPAEw7xDmzcm2SfVnjAywCSrOfrGiD9aVkp9aD | ||
20 | +aXMOu37duv/gu5sWxvJOaExi2Zg3KLEGJhWYgkkz9uksa+YHFLglLjCbkcDi9fvw | ||
21 | +wOBs8WfVZn37YffKoksdVIECgYBswhcsNOrcJ3WFjEUT9kQ20YCv6MCZv53lotya | ||
22 | +GZL99Vq5/r9l/C0RC4Je+mdRHg9d9X+eNVzE3thHYJJpZyC9CDCmZBvEf3CL8HcU | ||
23 | +AHnUBSZv2dBmhebMVJhJm8xKJwHMqOmK9dFHLlUCEO1Wv3Fobe+kjG0ef7pPE7xq | ||
24 | +m1JNkQKBgH85h3He7H2CbhAlqq9NA06wlWGCgwx1suPQ2kf7gSqYF0xlbpgubYDw | ||
25 | +ylIntKnFQDCREnxQGG+j1QcdA9GtP7ydvSTGK/yyjzOSzOAY+MGojig8lUcdsNO7 | ||
26 | +4tR9gUHP2xYCNWOESrwhI+k7Iz2Cl3fZ8cQbUA90v+PzHdATU6gz | ||
27 | +-----END RSA PRIVATE KEY----- |
gitlab_rsa.pub
0 → 100644
1 | +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXR3SVIFf+UxYQrqbuF3P+CCypO6Arrc/v930CmHZH1yaoVPwuwGyXOxgrlZ7ggM9ey9DowTyed6UGj2OD57mwGob36Flcqu6MrhAG+EBhUD31J/KS/o0/lZVtq+5WdlGLDUlyMCiOMLprp8FLuUUu8IZXEqLhranWa1Sv0RZ8PYsRbDdqLQC8HbEWwskagnuIJ7EXUsn5b+h41N+7uMj5nUId8IQvKdwCJd5eRFCY25bHHGum1RFFL4hFQk+XHp05+e57dsd0VjdihTrqJwsssolOLtonL4JO51m/S4mC1I8DNaPwQspaEexKAi/KL+AXmtNzP2vZhtfGyelB1Kj qingting.wei@yoho.cn |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div class="home-page yoho-page"> | 2 | <div class="home-page yoho-page"> |
3 | - {{# boy}} | 3 | +{{# boy}} |
4 | <div class="slide-container"> | 4 | <div class="slide-container"> |
5 | {{#if bigSlide}} | 5 | {{#if bigSlide}} |
6 | <div class="big-slide"> | 6 | <div class="big-slide"> |
@@ -112,6 +112,16 @@ | @@ -112,6 +112,16 @@ | ||
112 | </div> | 112 | </div> |
113 | </div> | 113 | </div> |
114 | {{/ preferenceBrand}} | 114 | {{/ preferenceBrand}} |
115 | - {{/ boy}} | 115 | + |
116 | + {{! 品类推荐}} | ||
117 | + {{#each recommend}} | ||
118 | + {{> index/recommend}} | ||
119 | + {{/ recommend}} | ||
120 | + | ||
121 | + {{! 新品上架}} | ||
122 | + {{# newArrivls}} | ||
123 | + {{> index/commodity}} | ||
124 | + {{/ newArrivls}} | ||
125 | +{{/ boy}} | ||
116 | </div> | 126 | </div> |
117 | {{> layout/footer}} | 127 | {{> layout/footer}} |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div class="products-page yoho-page"> | 2 | <div class="products-page yoho-page"> |
3 | - <div class="filter-box"> | ||
4 | - {{# filters}} | ||
5 | - {{#if checked}} | ||
6 | - <div class="checked"> | ||
7 | - <span class="title">已选条件:</span> | ||
8 | - | ||
9 | - {{# checked}} | ||
10 | - <span class="item"> | ||
11 | - {{name}} | ||
12 | - <i class="close">x</i> | ||
13 | - </span> | ||
14 | - {{/ checked}} | ||
15 | - </div> | ||
16 | - {{/if}} | 3 | + {{# products}} |
4 | + <div class="filter-box"> | ||
5 | + {{# filters}} | ||
6 | + {{# checkedConditions}} | ||
7 | + <div class="checked-conditions section"> | ||
8 | + <span class="title">已选条件:</span> | ||
17 | 9 | ||
18 | - {{#if channel}} | ||
19 | - <div class="channel section"> | ||
20 | - <span class="title">频道:</span> | 10 | + <div class="attr-content clearfix"> |
11 | + {{#each conditions}} | ||
12 | + <a class="tag" href="{{href}}"> | ||
13 | + {{#if name}} | ||
14 | + {{name}} | ||
15 | + {{^}} | ||
16 | + <i class="color-block" style="background: {{color}}"></i> | ||
17 | + {{/if}} | ||
18 | + <i class="close iconfont"></i> | ||
19 | + </a> | ||
20 | + {{/each}} | ||
21 | 21 | ||
22 | - <div class="attr-content clearfix"> | ||
23 | - {{#each channel}} | ||
24 | - <a class="attr" href="{{href}}"> | ||
25 | - {{name}} | ||
26 | - </a> | ||
27 | - {{/each}} | 22 | + <a class="clear-checked" href="{{clearUrl}}">清空筛选条件</a> |
23 | + </div> | ||
28 | </div> | 24 | </div> |
29 | - </div> | ||
30 | - {{/if}} | ||
31 | - | ||
32 | - {{#if sort}} | ||
33 | - <div class="sort section"> | ||
34 | - <span class="title">分类:</span> | ||
35 | - | ||
36 | - <div class="attr-content clearfix"> | ||
37 | - {{#each sort}} | ||
38 | - <span class="attr" data-id="{{id}}"> | ||
39 | - {{name}} | ||
40 | - </span> | ||
41 | - {{/each}} | 25 | + {{/ checkedConditions}} |
26 | + | ||
27 | + {{#if channel}} | ||
28 | + <div class="channel section"> | ||
29 | + <span class="title">频道:</span> | ||
30 | + | ||
31 | + <div class="attr-content clearfix"> | ||
32 | + {{#each channel}} | ||
33 | + <a class="attr" href="{{href}}"> | ||
34 | + {{name}} | ||
35 | + </a> | ||
36 | + {{/each}} | ||
37 | + </div> | ||
42 | </div> | 38 | </div> |
43 | - </div> | ||
44 | - {{/if}} | 39 | + {{/if}} |
45 | 40 | ||
46 | - {{# brand}} | ||
47 | - <div class="brand section"> | ||
48 | - <span class="title">品牌:</span> | 41 | + {{#if sort}} |
42 | + <div class="sort section"> | ||
43 | + <span class="title">分类:</span> | ||
49 | 44 | ||
50 | - <div class="attr-content"> | ||
51 | - <ul class="default clearfix"> | ||
52 | - {{# default}} | ||
53 | - <li class="attr"> | ||
54 | - <a href="{{href}}" title="{{name}}">{{name}}</a> | ||
55 | - </li> | ||
56 | - {{/ default}} | ||
57 | - </ul> | 45 | + <div class="attr-content"> |
46 | + <ul class="sort-pre clearfix"> | ||
47 | + {{#each sort}} | ||
48 | + <li> | ||
49 | + <span class="attr"> | ||
50 | + {{name}} | ||
51 | + </span> | ||
52 | + </li> | ||
53 | + {{/each}} | ||
54 | + </ul> | ||
58 | 55 | ||
59 | - <div class="brand-opt"> | ||
60 | - <span id="brand-more" class="brand-more"> | ||
61 | - <em>更多</em> | ||
62 | - <i class="iconfont"></i> | ||
63 | - </span> | ||
64 | - | ||
65 | - <span id="brand-multi" class="multi-select">多选 +</span> | 56 | + <div class="sort-sub-wrap"> |
57 | + {{#each sort}} | ||
58 | + <ul class="sort-sub clearfix hide"> | ||
59 | + {{#each sub}} | ||
60 | + <li class="attr"> | ||
61 | + <a href="{{href}}">{{name}}</a> | ||
62 | + </li> | ||
63 | + {{/each}} | ||
64 | + </ul> | ||
65 | + {{/each}} | ||
66 | + </div> | ||
66 | </div> | 67 | </div> |
68 | + </div> | ||
69 | + {{/if}} | ||
67 | 70 | ||
68 | - <div class="brand-panel hide"> | ||
69 | - <div class="panel-head clearfix"> | ||
70 | - <p class="brands-index"> | ||
71 | - {{#each brandIndex}} | ||
72 | - <span data-index="{{index}}">{{name}}</span> | ||
73 | - {{/each}} | ||
74 | - </p> | ||
75 | - | ||
76 | - <div class="brand-search"> | ||
77 | - <input id="brand-search-input" type="text"> | ||
78 | - <span class="btn"> | ||
79 | - <i class="iconfont"></i> | ||
80 | - </span> | ||
81 | - </div> | ||
82 | - </div> | 71 | + {{# brand}} |
72 | + <div class="brand section"> | ||
73 | + <span class="title">品牌:</span> | ||
83 | 74 | ||
84 | - <ul class="panel-body check-container clearfix"> | ||
85 | - {{# brandsShow}} | ||
86 | - <li class="attr" data-index="{{index}}" data-key="{{key}}"> | ||
87 | - <a href="{{href}}"> | ||
88 | - <span class="iconfont checkbox" data-id="{{id}}"></span> | ||
89 | - <span title="{{name}}">{{name}}</span> | ||
90 | - </a> | 75 | + <div class="attr-content"> |
76 | + <ul class="default clearfix"> | ||
77 | + {{# default}} | ||
78 | + <li class="attr"> | ||
79 | + <a href="{{href}}" title="{{name}}">{{name}}</a> | ||
91 | </li> | 80 | </li> |
92 | - {{/ brandsShow}} | 81 | + {{/ default}} |
93 | </ul> | 82 | </ul> |
94 | 83 | ||
95 | - <div class="btns"> | ||
96 | - <button id="brand-multi-ok" class="multi-select-ok dis">确定</button> | ||
97 | - <button class="multi-select-cancel">取消</button> | 84 | + <div class="brand-opt"> |
85 | + <span id="brand-more" class="brand-more"> | ||
86 | + <em>更多</em> | ||
87 | + <i class="iconfont"></i> | ||
88 | + </span> | ||
89 | + | ||
90 | + <span id="brand-multi" class="multi-select">多选 +</span> | ||
91 | + </div> | ||
92 | + | ||
93 | + <div class="brand-panel hide"> | ||
94 | + <div class="panel-head clearfix"> | ||
95 | + <p class="brands-index"> | ||
96 | + {{#each brandIndex}} | ||
97 | + <span data-index="{{index}}">{{name}}</span> | ||
98 | + {{/each}} | ||
99 | + </p> | ||
100 | + | ||
101 | + <div class="brand-search"> | ||
102 | + <input id="brand-search-input" type="text"> | ||
103 | + <span class="btn"> | ||
104 | + <i class="iconfont"></i> | ||
105 | + </span> | ||
106 | + </div> | ||
107 | + </div> | ||
108 | + | ||
109 | + <ul class="panel-body check-container clearfix"> | ||
110 | + {{# brandsShow}} | ||
111 | + <li class="attr" data-index="{{index}}" data-key="{{key}}"> | ||
112 | + <a href="{{href}}"> | ||
113 | + <span class="iconfont checkbox" data-id="{{id}}"></span> | ||
114 | + <span title="{{name}}">{{name}}</span> | ||
115 | + </a> | ||
116 | + </li> | ||
117 | + {{/ brandsShow}} | ||
118 | + </ul> | ||
119 | + | ||
120 | + <div class="btns"> | ||
121 | + <button id="brand-multi-ok" class="multi-select-ok dis">确定</button> | ||
122 | + <button class="multi-select-cancel">取消</button> | ||
123 | + </div> | ||
98 | </div> | 124 | </div> |
99 | </div> | 125 | </div> |
100 | </div> | 126 | </div> |
101 | - </div> | ||
102 | - {{/ brand}} | 127 | + {{/ brand}} |
103 | 128 | ||
104 | - {{#if price}} | ||
105 | - <div class="price section"> | ||
106 | - <span class="title">价格:</span> | 129 | + {{#if price}} |
130 | + <div class="price section"> | ||
131 | + <span class="title">价格:</span> | ||
107 | 132 | ||
108 | - <div class="attr-content clearfix"> | ||
109 | - {{# price}} | ||
110 | - <a class="attr" href="{{href}}">¥{{name}}</a> | ||
111 | - {{/ price}} | 133 | + <div class="attr-content clearfix"> |
134 | + {{# price}} | ||
135 | + <a class="attr" href="{{href}}">¥{{name}}</a> | ||
136 | + {{/ price}} | ||
112 | 137 | ||
113 | - <div class="ud-price-range"> | ||
114 | - ¥ | ||
115 | - <input type="text" class="min limit"> | ||
116 | - <span class="price-sep">-</span> | ||
117 | - <input type="text" class="max limit"> | 138 | + <div class="ud-price-range"> |
139 | + ¥ | ||
140 | + <input type="text" class="min limit"> | ||
141 | + <span class="price-sep">-</span> | ||
142 | + <input type="text" class="max limit"> | ||
118 | 143 | ||
119 | - <button class="price-sure hide">确定</button> | 144 | + <button class="price-sure hide">确定</button> |
145 | + </div> | ||
120 | </div> | 146 | </div> |
121 | </div> | 147 | </div> |
122 | - </div> | ||
123 | - {{/if}} | ||
124 | - | ||
125 | - {{#if color}} | ||
126 | - <div class="color section"> | ||
127 | - <span class="title">颜色:</span> | ||
128 | - | ||
129 | - <div class="attr-content clearfix"> | ||
130 | - {{# color}} | ||
131 | - <a class="attr" href="{{href}}"> | ||
132 | - <i class="color-block" style="background: {{rgb}}"></i> | ||
133 | - {{name}} | ||
134 | - </a> | ||
135 | - {{/ color}} | 148 | + {{/if}} |
149 | + | ||
150 | + {{#if color}} | ||
151 | + <div class="color section"> | ||
152 | + <span class="title">颜色:</span> | ||
153 | + | ||
154 | + <div class="attr-content clearfix"> | ||
155 | + {{# color}} | ||
156 | + <a class="attr" href="{{href}}"> | ||
157 | + <i class="color-block" style="background: {{rgb}}"></i> | ||
158 | + {{name}} | ||
159 | + </a> | ||
160 | + {{/ color}} | ||
161 | + </div> | ||
136 | </div> | 162 | </div> |
137 | - </div> | ||
138 | - {{/if}} | 163 | + {{/if}} |
139 | 164 | ||
140 | - {{#if size}} | ||
141 | - <div class="size section"> | ||
142 | - <span class="title">尺码:</span> | 165 | + {{#if size}} |
166 | + <div class="size section"> | ||
167 | + <span class="title">尺码:</span> | ||
143 | 168 | ||
144 | - <div class="attr-content clearfix"> | ||
145 | - {{# size}} | ||
146 | - <a class="attr" href="{{href}}">{{name}}</a> | ||
147 | - {{/ size}} | 169 | + <div class="attr-content clearfix"> |
170 | + {{# size}} | ||
171 | + <a class="attr" href="{{href}}">{{name}}</a> | ||
172 | + {{/ size}} | ||
173 | + </div> | ||
148 | </div> | 174 | </div> |
149 | - </div> | ||
150 | - {{/if}} | 175 | + {{/if}} |
151 | 176 | ||
152 | - {{#if seniorChose}} | ||
153 | - <div class="senior section"> | ||
154 | - <span class="title">高级选项:</span> | 177 | + {{#if seniorChose}} |
178 | + <div class="senior section"> | ||
179 | + <span class="title">高级选项:</span> | ||
155 | 180 | ||
156 | - <div class="attr-content"> | ||
157 | - <ul class="clearfix senior-attr-wrap"> | ||
158 | - {{#each seniorChose}} | ||
159 | - <li class="attr"> | ||
160 | - {{name}} | ||
161 | - <span class="iconfont"></span> | 181 | + <div class="attr-content"> |
182 | + <ul class="clearfix senior-attr-wrap"> | ||
183 | + {{#each seniorChose}} | ||
184 | + <li class="attr"> | ||
185 | + {{name}} | ||
186 | + <span class="iconfont"></span> | ||
162 | 187 | ||
163 | - <div class="sub hide" data-attr="{{attr}}"> | 188 | + <div class="senior-up-icon"></div> |
189 | + </li> | ||
190 | + {{/each}} | ||
191 | + </ul> | ||
192 | + | ||
193 | + <div class="senior-sub-wrap"> | ||
194 | + {{#each seniorChose}} | ||
195 | + <div class="senior-sub hide" data-attr="{{attr}}"> | ||
164 | {{#if showMulti}} | 196 | {{#if showMulti}} |
165 | <span class="multi-select">多选 +</span> | 197 | <span class="multi-select">多选 +</span> |
166 | {{/if}} | 198 | {{/if}} |
@@ -179,23 +211,128 @@ | @@ -179,23 +211,128 @@ | ||
179 | <button class="multi-select-cancel">取消</button> | 211 | <button class="multi-select-cancel">取消</button> |
180 | </div> | 212 | </div> |
181 | </div> | 213 | </div> |
214 | + {{/each}} | ||
215 | + </div> | ||
216 | + </div> | ||
217 | + </div> | ||
218 | + {{/if}} | ||
219 | + {{/ filters}} | ||
220 | + </div> | ||
221 | + | ||
222 | + <div class="opt-banner"> | ||
223 | + {{# opts}} | ||
224 | + {{# sortType}} | ||
225 | + <a class="sort-type{{#if active}} active{{/if}}" href="{{href}}"> | ||
226 | + {{name}} | ||
227 | + {{#if hasSortOrient}} | ||
228 | + {{#if active}} | ||
229 | + {{#if desc}} | ||
230 | + <span class="active-icon iconfont"></span> | ||
231 | + {{^}} | ||
232 | + <span class="active-icon iconfont"></span> | ||
233 | + {{/if}} | ||
234 | + {{^}} | ||
235 | + <span class="iconfont"></span> | ||
236 | + {{/if}} | ||
237 | + {{^}} | ||
238 | + <span class="iconfont"></span> | ||
239 | + {{/if}} | ||
240 | + </a> | ||
241 | + {{/ sortType}} | ||
242 | + | ||
243 | + {{# checks}} | ||
244 | + <a class="checks{{#if checked}} checked{{/if}}" href="{{href}}"> | ||
245 | + {{#if checked}} | ||
246 | + <span class="iconfont"></span> | ||
247 | + {{^}} | ||
248 | + <span class="iconfont"></span> | ||
249 | + {{/if}} | ||
250 | + {{name}} | ||
251 | + </a> | ||
252 | + {{/ checks}} | ||
253 | + | ||
254 | + <div class="pager-wrap"> | ||
255 | + {{#if fivePerLine}} | ||
256 | + <div class="line-count active"> | ||
257 | + <span></span> | ||
258 | + <span></span> | ||
259 | + <span></span> | ||
260 | + <span></span> | ||
261 | + <span></span> | ||
262 | + </div> | ||
263 | + | ||
264 | + <a class="line-count" href="{{sixPerLineHref}}"> | ||
265 | + <span></span> | ||
266 | + <span></span> | ||
267 | + <span></span> | ||
268 | + <span></span> | ||
269 | + <span></span> | ||
270 | + <span></span> | ||
271 | + </a> | ||
272 | + {{^}} | ||
273 | + <a class="line-count" href="{{fivePerLineHref}}"> | ||
274 | + <span></span> | ||
275 | + <span></span> | ||
276 | + <span></span> | ||
277 | + <span></span> | ||
278 | + <span></span> | ||
279 | + </a> | ||
280 | + | ||
281 | + <div class="line-count active"> | ||
282 | + <span></span> | ||
283 | + <span></span> | ||
284 | + <span></span> | ||
285 | + <span></span> | ||
286 | + <span></span> | ||
287 | + <span></span> | ||
288 | + </div> | ||
289 | + {{/if}} | ||
290 | + | ||
291 | + <div class="page-count"> | ||
292 | + <span id="count-per-page"> | ||
293 | + {{countPerPage}} | ||
294 | + <i class="iconfont"></i> | ||
295 | + </span> | ||
296 | + 每页 | ||
297 | + <ul> | ||
298 | + {{# pageCounts}} | ||
299 | + <li> | ||
300 | + <a href="{{href}}">{{count}}</a> | ||
182 | </li> | 301 | </li> |
183 | - {{/each}} | 302 | + {{/ pageCounts}} |
184 | </ul> | 303 | </ul> |
185 | </div> | 304 | </div> |
305 | + | ||
306 | + <p class="pager"> | ||
307 | + {{#if preHref}} | ||
308 | + <a href="{{preHref}}"> | ||
309 | + <span class="iconfont"></span> | ||
310 | + </a> | ||
311 | + {{^}} | ||
312 | + <span class="dis-icon iconfont"></span> | ||
313 | + {{/if}} | ||
314 | + | ||
315 | + <span> | ||
316 | + <i>{{curPage}}</i>/{{pageCount}} | ||
317 | + </span> | ||
318 | + | ||
319 | + {{#if nextHref}} | ||
320 | + <a href="{{nextHref}}"> | ||
321 | + <span class="iconfont"></span> | ||
322 | + </a> | ||
323 | + {{^}} | ||
324 | + <span class="dis-icon iconfont"></span> | ||
325 | + {{/if}} | ||
326 | + </p> | ||
186 | </div> | 327 | </div> |
187 | - {{/if}} | ||
188 | - {{/ filters}} | ||
189 | - </div> | ||
190 | - | ||
191 | - <div class="opt-banner"> | ||
192 | - | ||
193 | - </div> | ||
194 | - | ||
195 | - <div class="goods-container"> | ||
196 | - {{#each goods}} | ||
197 | - {{> product/good}} | ||
198 | - {{/each}} | ||
199 | - </div> | 328 | + {{/opts}} |
329 | + </div> | ||
330 | + | ||
331 | + <div class="goods-container"> | ||
332 | + {{#each goods}} | ||
333 | + {{> product/good}} | ||
334 | + {{/each}} | ||
335 | + </div> | ||
336 | + {{/ products}} | ||
200 | </div> | 337 | </div> |
201 | {{> layout/footer}} | 338 | {{> layout/footer}} |
1 | +<div class="commodity"> | ||
2 | + <ul class="clearfix"> | ||
3 | + {{#each commodity}} | ||
4 | + <li> | ||
5 | + {{# state}} | ||
6 | + <i class="commodity-tag{{.}}"></i> | ||
7 | + {{/ state}} | ||
8 | + <a href="{{url}}"><div class="commodity-img"><img class="lazy" data-original="{{img}}"/></div> | ||
9 | + <p class="commodity-name">{{name}}</p> | ||
10 | + <p class="commodity-price"><span>¥{{price}}</span></p> | ||
11 | + </a> | ||
12 | + </li> | ||
13 | + {{/each}} | ||
14 | + </ul> | ||
15 | + <div class="loading"> | ||
16 | + <p>Loading...</p> | ||
17 | + </div> | ||
18 | +</div> |
1 | +{{# tplrecommend}} | ||
2 | +<div class="tpl-recommend clearfix"> | ||
3 | + <div class="tpl-body clearfix"> | ||
4 | + <div class="tpl-nav"> | ||
5 | + <div class="tpl-keywords"> | ||
6 | + {{#each keyword}} | ||
7 | + <a class="keywords{{@index}}" title="{{name}}" href="{{url}}"><img class="lazy" data-original="{{img}}"/></a> | ||
8 | + {{/ keyword}} | ||
9 | + </div> | ||
10 | + <div class="tpl-category clearfix"> | ||
11 | + {{#each category}} | ||
12 | + <a href="{{url}}">{{name}}</a> | ||
13 | + {{/ category}} | ||
14 | + </div> | ||
15 | + </div> | ||
16 | + <div class="tpl-brands clearfix"> | ||
17 | + <ul> | ||
18 | + {{#each brands}} | ||
19 | + <li><a title="{{name}}" href="{{url}}"><img class="lazy" data-original="{{img}}"/></a></li> | ||
20 | + {{/each}} | ||
21 | + </ul> | ||
22 | + </div> | ||
23 | + <div class="tpl-types clearfix"> | ||
24 | + <ul> | ||
25 | + {{#each types}} | ||
26 | + <li><a title="{{name}}" href="{{url}}"><img class="lazy" data-original="{{img}}"/></a></li> | ||
27 | + {{/each}} | ||
28 | + </ul> | ||
29 | + </div> | ||
30 | + </div> | ||
31 | + <div class="tpl-products clearfix"> | ||
32 | + <ul> | ||
33 | + {{#each products}} | ||
34 | + <li><a href="{{url}}" title="{{name}}"><img class="lazy" data-original="{{img}}"/></a></li> | ||
35 | + {{/each}} | ||
36 | + </ul> | ||
37 | + </div> | ||
38 | +</div> | ||
39 | +{{/ tplrecommend}} | ||
40 | + | ||
41 | + |
web-static/.spmignore
0 → 100644
No preview for this file type
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > | 2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > |
3 | <svg xmlns="http://www.w3.org/2000/svg"> | 3 | <svg xmlns="http://www.w3.org/2000/svg"> |
4 | <metadata> | 4 | <metadata> |
5 | -Created by FontForge 20120731 at Thu Nov 26 10:18:10 2015 | 5 | +Created by FontForge 20120731 at Tue Dec 1 11:00:27 2015 |
6 | By Ads | 6 | By Ads |
7 | </metadata> | 7 | </metadata> |
8 | <defs> | 8 | <defs> |
@@ -16,10 +16,10 @@ Created by FontForge 20120731 at Thu Nov 26 10:18:10 2015 | @@ -16,10 +16,10 @@ Created by FontForge 20120731 at Thu Nov 26 10:18:10 2015 | ||
16 | ascent="896" | 16 | ascent="896" |
17 | descent="-128" | 17 | descent="-128" |
18 | x-height="792" | 18 | x-height="792" |
19 | - bbox="0 -214 1024 812" | 19 | + bbox="0 -214 1024 864" |
20 | underline-thickness="50" | 20 | underline-thickness="50" |
21 | underline-position="-100" | 21 | underline-position="-100" |
22 | - unicode-range="U+0078-E613" | 22 | + unicode-range="U+0078-E615" |
23 | /> | 23 | /> |
24 | <missing-glyph horiz-adv-x="374" | 24 | <missing-glyph horiz-adv-x="374" |
25 | d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> | 25 | d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> |
@@ -77,5 +77,9 @@ d="M939 -212h-854q-23 0 -42.5 11.5t-31 31t-11.5 42.5v854q0 35 25 60t60 25h854q23 | @@ -77,5 +77,9 @@ d="M939 -212h-854q-23 0 -42.5 11.5t-31 31t-11.5 42.5v854q0 35 25 60t60 25h854q23 | ||
77 | M457 99q-5 -6 -13 -9t-17 -3q-21 0 -30 12l-171 171q-13 10 -13 30q0 18 12.5 30.5t30.5 12.5q10 0 17.5 -3.5t12.5 -9.5l141 -141l311 312q13 12 30 12q18 0 30.5 -12.5t12.5 -29.5q0 -21 -13 -30z" /> | 77 | M457 99q-5 -6 -13 -9t-17 -3q-21 0 -30 12l-171 171q-13 10 -13 30q0 18 12.5 30.5t30.5 12.5q10 0 17.5 -3.5t12.5 -9.5l141 -141l311 312q13 12 30 12q18 0 30.5 -12.5t12.5 -29.5q0 -21 -13 -30z" /> |
78 | <glyph glyph-name="uniE613" unicode="" | 78 | <glyph glyph-name="uniE613" unicode="" |
79 | d="M877 812h-730q-61 0 -104 -43t-43 -104v-730q0 -61 43 -104t104 -43h730q61 0 104 43t43 104v730q0 61 -43 104t-104 43zM939 -65q0 -26 -18 -44t-44 -18h-730q-26 0 -44 18t-18 44v730q0 17 8.5 31t22.5 22.5t31 8.5h730q26 0 44 -18t18 -44v-730z" /> | 79 | d="M877 812h-730q-61 0 -104 -43t-43 -104v-730q0 -61 43 -104t104 -43h730q61 0 104 43t43 104v730q0 61 -43 104t-104 43zM939 -65q0 -26 -18 -44t-44 -18h-730q-26 0 -44 18t-18 44v730q0 17 8.5 31t22.5 22.5t31 8.5h730q26 0 44 -18t18 -44v-730z" /> |
80 | + <glyph glyph-name="uniE614" unicode="" | ||
81 | +d="M160 996zM865 247q0 -18 -13 -31l-308 -308q-13 -13 -31 -13t-31 13l-309 308q-13 13 -13 31t13.5 31t30.5 13h617q18 0 31 -13t13 -31zM865 511q0 -18 -13 -31t-31 -13h-617q-18 0 -31 13t-13 31t13 31l309 309q13 13 31 13t31 -13l308 -309q13 -13 13 -31z" /> | ||
82 | + <glyph glyph-name="uniE615" unicode="" | ||
83 | +d="M704 569l-41 39l-343 -320l343 -320l41 39l-301 281z" /> | ||
80 | </font> | 84 | </font> |
81 | </defs></svg> | 85 | </defs></svg> |
No preview for this file type
No preview for this file type
web-static/img/product/senior-up.png
0 → 100644

1.18 KB
@@ -15,6 +15,7 @@ moreUnicode = { | @@ -15,6 +15,7 @@ moreUnicode = { | ||
15 | down: '' | 15 | down: '' |
16 | }; | 16 | }; |
17 | 17 | ||
18 | +//品牌相关变量 | ||
18 | var $brandDefault = $('.brand .default'), | 19 | var $brandDefault = $('.brand .default'), |
19 | $brandPanel = $('.brand .brand-panel'), | 20 | $brandPanel = $('.brand .brand-panel'), |
20 | $brandAttrs = $('.brand .attr'), | 21 | $brandAttrs = $('.brand .attr'), |
@@ -23,7 +24,19 @@ var $brandDefault = $('.brand .default'), | @@ -23,7 +24,19 @@ var $brandDefault = $('.brand .default'), | ||
23 | 24 | ||
24 | var $brandMoreTxt, $brandMoreIcon; | 25 | var $brandMoreTxt, $brandMoreIcon; |
25 | 26 | ||
26 | -// var uriLoc = require('./uri'); | 27 | +//价格相关变量 |
28 | +var $udPrice = $('.ud-price-range'), | ||
29 | + interReg = /^\d+$/, | ||
30 | + $limit, $min, $max, $btn; | ||
31 | + | ||
32 | +//分类相关变量 | ||
33 | +var $sortSub = $('.sort-sub-wrap'); | ||
34 | + | ||
35 | +//高级选项相关变量 | ||
36 | +var $seniorSubWrap = $('.senior-sub-wrap'), | ||
37 | + $seniorAttrWrap = $('.senior-attr-wrap'); | ||
38 | + | ||
39 | +var seniorHoverTime, hoveredIndex; | ||
27 | 40 | ||
28 | //清除checkbox选中状态 | 41 | //清除checkbox选中状态 |
29 | function clearChecked($checkbox) { | 42 | function clearChecked($checkbox) { |
@@ -57,9 +70,11 @@ function uriLoc(attr, val) { | @@ -57,9 +70,11 @@ function uriLoc(attr, val) { | ||
57 | window.location.href = newHref; | 70 | window.location.href = newHref; |
58 | } | 71 | } |
59 | 72 | ||
60 | -if ($brandMore.length > 0) { | ||
61 | - $brandMoreTxt = $brandMore.children('em'); | ||
62 | - $brandMoreIcon = $brandMore.children('.iconfont'); | 73 | +//隐藏高级选项面板 |
74 | +function hideSeniorPanel(index) { | ||
75 | + $seniorSubWrap.children('.senior-sub:eq(' + hoveredIndex + ')').addClass('hide'); | ||
76 | + $seniorAttrWrap.children('.attr:eq(' + hoveredIndex + ')').removeClass('hover'); | ||
77 | + hoveredIndex = -1; | ||
63 | } | 78 | } |
64 | 79 | ||
65 | //屏蔽筛选项双击文字选中 | 80 | //屏蔽筛选项双击文字选中 |
@@ -67,30 +82,21 @@ $('.filter-box').on('selectstart', '.attr, .brands-index span', function() { | @@ -67,30 +82,21 @@ $('.filter-box').on('selectstart', '.attr, .brands-index span', function() { | ||
67 | return false; | 82 | return false; |
68 | }); | 83 | }); |
69 | 84 | ||
70 | -//checkbox | ||
71 | -$('.check-container').on('click', '.attr', function() { | ||
72 | - var $this = $(this), | ||
73 | - $check = $this.find('.checkbox'), | ||
74 | - $btnOk = $this.parent('.check-container').next('.btns').find('.multi-select-ok'); | 85 | +//【分类】 |
86 | +$('.sort-pre').on('click', 'li', function() { | ||
87 | + var index = $(this).index(); | ||
75 | 88 | ||
76 | - $check.toggleClass('checked'); | ||
77 | - | ||
78 | - if ($check.hasClass('checked')) { | ||
79 | - $check.html(checkUnicode.checked); | ||
80 | - } else { | ||
81 | - $check.html(checkUnicode.unchecked); | ||
82 | - } | ||
83 | - | ||
84 | - //更新按钮状态 | ||
85 | - if ($check.hasClass('checked') || | ||
86 | - $this.siblings('.attr').find('.checked').length > 0) { | ||
87 | - $btnOk.removeClass('dis'); | ||
88 | - } else { | ||
89 | - $btnOk.addClass('dis'); | ||
90 | - } | 89 | + $sortSub.children(':not(.hide)').addClass('hide'); |
90 | + $sortSub.children(':eq(' + index + ')').removeClass('hide'); | ||
91 | }); | 91 | }); |
92 | 92 | ||
93 | -//品牌多选 | 93 | +//【品牌】 |
94 | +if ($brandMore.length > 0) { | ||
95 | + $brandMoreTxt = $brandMore.children('em'); | ||
96 | + $brandMoreIcon = $brandMore.children('.iconfont'); | ||
97 | +} | ||
98 | + | ||
99 | +//【品牌】多选 | ||
94 | $brandMulti.click(function() { | 100 | $brandMulti.click(function() { |
95 | if ($brandPanel.css('display') === 'none') { | 101 | if ($brandPanel.css('display') === 'none') { |
96 | 102 | ||
@@ -102,6 +108,7 @@ $brandMulti.click(function() { | @@ -102,6 +108,7 @@ $brandMulti.click(function() { | ||
102 | $(this).addClass('hide'); | 108 | $(this).addClass('hide'); |
103 | }); | 109 | }); |
104 | 110 | ||
111 | +//【品牌】更多 | ||
105 | $brandMore.click(function() { | 112 | $brandMore.click(function() { |
106 | var $this = $(this); | 113 | var $this = $(this); |
107 | 114 | ||
@@ -120,7 +127,7 @@ $brandMore.click(function() { | @@ -120,7 +127,7 @@ $brandMore.click(function() { | ||
120 | $(this).toggleClass('more'); | 127 | $(this).toggleClass('more'); |
121 | }); | 128 | }); |
122 | 129 | ||
123 | -//品牌索引 | 130 | +//【品牌】索引 |
124 | $('.brands-index').on('click', 'span', function() { | 131 | $('.brands-index').on('click', 'span', function() { |
125 | var $this = $(this), | 132 | var $this = $(this), |
126 | index = $this.data('index'); | 133 | index = $this.data('index'); |
@@ -134,7 +141,7 @@ $('.brands-index').on('click', 'span', function() { | @@ -134,7 +141,7 @@ $('.brands-index').on('click', 'span', function() { | ||
134 | } | 141 | } |
135 | }); | 142 | }); |
136 | 143 | ||
137 | -//品牌搜索 | 144 | +//【品牌】搜索 |
138 | $('#brand-search-input').keyup(function() { | 145 | $('#brand-search-input').keyup(function() { |
139 | var val = $(this).val().toLowerCase(); | 146 | var val = $(this).val().toLowerCase(); |
140 | 147 | ||
@@ -145,6 +152,7 @@ $('#brand-search-input').keyup(function() { | @@ -145,6 +152,7 @@ $('#brand-search-input').keyup(function() { | ||
145 | } | 152 | } |
146 | }); | 153 | }); |
147 | 154 | ||
155 | +//【品牌】多选确定 | ||
148 | $('#brand-multi-ok').click(function() { | 156 | $('#brand-multi-ok').click(function() { |
149 | var val = ''; | 157 | var val = ''; |
150 | 158 | ||
@@ -161,7 +169,7 @@ $('#brand-multi-ok').click(function() { | @@ -161,7 +169,7 @@ $('#brand-multi-ok').click(function() { | ||
161 | uriLoc('brand', val); | 169 | uriLoc('brand', val); |
162 | }); | 170 | }); |
163 | 171 | ||
164 | -//多选取消(品牌/高级选项) | 172 | +//【品牌/高级选项】多选取消 |
165 | $('.multi-select-cancel').click(function() { | 173 | $('.multi-select-cancel').click(function() { |
166 | var $panel = $(this).closest('.multi'); | 174 | var $panel = $(this).closest('.multi'); |
167 | 175 | ||
@@ -175,21 +183,44 @@ $('.multi-select-cancel').click(function() { | @@ -175,21 +183,44 @@ $('.multi-select-cancel').click(function() { | ||
175 | clearChecked($panel.find('.checkbox.checked')); //清除选中状态 | 183 | clearChecked($panel.find('.checkbox.checked')); //清除选中状态 |
176 | }); | 184 | }); |
177 | 185 | ||
178 | -//用户定义价格处理 | ||
179 | -(function() { | ||
180 | - var $udPrice = $('.ud-price-range'), | ||
181 | - interReg = /^\d+$/, | ||
182 | - $limit, $min, $max, $btn; | 186 | +//【品牌/高级选项】checkbox |
187 | +$('.check-container').on('click', '.attr', function() { | ||
188 | + var $this = $(this), | ||
189 | + $check = $this.find('.checkbox'), | ||
190 | + $btnOk = $this.parent('.check-container').next('.btns').find('.multi-select-ok'); | ||
183 | 191 | ||
184 | - if ($udPrice.length === 0) { | ||
185 | - return; | 192 | + $check.toggleClass('checked'); |
193 | + | ||
194 | + if ($check.hasClass('checked')) { | ||
195 | + $check.html(checkUnicode.checked); | ||
196 | + } else { | ||
197 | + $check.html(checkUnicode.unchecked); | ||
186 | } | 198 | } |
187 | 199 | ||
200 | + //更新按钮状态 | ||
201 | + if ($check.hasClass('checked') || | ||
202 | + $this.siblings('.attr').find('.checked').length > 0) { | ||
203 | + $btnOk.removeClass('dis'); | ||
204 | + } else { | ||
205 | + $btnOk.addClass('dis'); | ||
206 | + } | ||
207 | +}); | ||
208 | + | ||
209 | +//【品牌/高级选项】当多选时阻止链接默认跳转 | ||
210 | +$('.brand, .senior').on('click', '.attr > a', function(e) { | ||
211 | + if ($(this).closest('.multi').length > 0) { | ||
212 | + e.preventDefault(); | ||
213 | + } | ||
214 | +}); | ||
215 | + | ||
216 | +//【价格】用户定义价格处理 | ||
217 | +if ($udPrice.length > 0) { | ||
188 | $limit = $udPrice.find('.limit'); | 218 | $limit = $udPrice.find('.limit'); |
189 | $min = $limit.filter('.min'); | 219 | $min = $limit.filter('.min'); |
190 | $max = $limit.filter('.max'); | 220 | $max = $limit.filter('.max'); |
191 | $btn = $udPrice.find('.price-sure'); | 221 | $btn = $udPrice.find('.price-sure'); |
192 | 222 | ||
223 | + //【价格】输入 | ||
193 | $limit.keyup(function() { | 224 | $limit.keyup(function() { |
194 | var min = $.trim($min.val()), | 225 | var min = $.trim($min.val()), |
195 | max = $.trim($max.val()), | 226 | max = $.trim($max.val()), |
@@ -205,7 +236,7 @@ $('.multi-select-cancel').click(function() { | @@ -205,7 +236,7 @@ $('.multi-select-cancel').click(function() { | ||
205 | } | 236 | } |
206 | }); | 237 | }); |
207 | 238 | ||
208 | - //价格多项查询 | 239 | + //【价格】多项查询 |
209 | $btn.click(function() { | 240 | $btn.click(function() { |
210 | var min = $.trim($min.val()), | 241 | var min = $.trim($min.val()), |
211 | max = $.trim($max.val()), | 242 | max = $.trim($max.val()), |
@@ -220,21 +251,30 @@ $('.multi-select-cancel').click(function() { | @@ -220,21 +251,30 @@ $('.multi-select-cancel').click(function() { | ||
220 | 251 | ||
221 | uriLoc('price', min + ',' + max); | 252 | uriLoc('price', min + ',' + max); |
222 | }); | 253 | }); |
223 | -}()); | 254 | +} |
255 | + | ||
256 | +//【高级选项】鼠标移入显示子项 | ||
257 | +$seniorAttrWrap.on('mouseenter', '.attr', function() { | ||
258 | + var index = $(this).addClass('hover').index(); | ||
224 | 259 | ||
225 | -//高级选项 | ||
226 | -$('.senior-attr-wrap').on('mouseenter', '.attr', function() { | ||
227 | - $(this).children('.sub').removeClass('hide'); | 260 | + $seniorSubWrap.children('.senior-sub:eq(' + index + ')').removeClass('hide'); |
228 | }).on('mouseleave', '.attr', function() { | 261 | }).on('mouseleave', '.attr', function() { |
229 | - $(this).children('.sub').addClass('hide'); | 262 | + var $this = $(this), |
263 | + index = $this.index(); | ||
264 | + | ||
265 | + hoveredIndex = index; | ||
266 | + | ||
267 | + seniorHoverTime = setTimeout(function() { | ||
268 | + hideSeniorPanel(); | ||
269 | + }, 100); | ||
230 | }); | 270 | }); |
231 | 271 | ||
232 | -//高级选项多选 | ||
233 | -$('.sub').on('click', '.multi-select', function() { | ||
234 | - $(this).closest('.sub').addClass('multi'); | 272 | +//【高级选项】多选 |
273 | +$('.senior-sub').on('click', '.multi-select', function() { | ||
274 | + $(this).closest('.senior-sub').addClass('multi'); | ||
235 | }).on('click', '.multi-select-ok', function() { | 275 | }).on('click', '.multi-select-ok', function() { |
236 | var $btn = $(this), | 276 | var $btn = $(this), |
237 | - $sub = $btn.closest('.sub'), | 277 | + $sub = $btn.closest('.senior-sub'), |
238 | val = ''; | 278 | val = ''; |
239 | 279 | ||
240 | if ($btn.hasClass('dis')) { | 280 | if ($btn.hasClass('dis')) { |
@@ -248,11 +288,32 @@ $('.sub').on('click', '.multi-select', function() { | @@ -248,11 +288,32 @@ $('.sub').on('click', '.multi-select', function() { | ||
248 | }); | 288 | }); |
249 | 289 | ||
250 | uriLoc($sub.data('attr'), val); | 290 | uriLoc($sub.data('attr'), val); |
291 | +}).on('mouseenter', function() { | ||
292 | + clearTimeout(seniorHoverTime); | ||
293 | +}).on('mouseleave', function() { | ||
294 | + hideSeniorPanel(); | ||
251 | }); | 295 | }); |
252 | 296 | ||
253 | -//当多选时阻止品牌和高级选项的默认跳转 | ||
254 | -$('.brand, .senior').on('click', '.attr > a', function(e) { | ||
255 | - if ($(this).closest('.multi').length > 0) { | ||
256 | - e.preventDefault(); | ||
257 | - } | ||
258 | -}); | ||
297 | +//操作栏 | ||
298 | +(function() { | ||
299 | + var $countPerPage = $('#count-per-page'), | ||
300 | + $countChose = $countPerPage.next('ul'); | ||
301 | + | ||
302 | + var SLIDETIME = 200; | ||
303 | + | ||
304 | + $(document).click(function(e) { | ||
305 | + if ($(e.target).closest('.page-count').length > 0) { | ||
306 | + return; | ||
307 | + } | ||
308 | + | ||
309 | + $countChose && $countChose.slideUp(SLIDETIME); | ||
310 | + }); | ||
311 | + | ||
312 | + $countPerPage.click(function() { | ||
313 | + if ($countChose.css('display') === 'none') { | ||
314 | + $countChose.slideDown(SLIDETIME); | ||
315 | + } else { | ||
316 | + $countChose.slideUp(SLIDETIME); | ||
317 | + } | ||
318 | + }); | ||
319 | +}()); |
1 | + | ||
1 | .home-page { | 2 | .home-page { |
2 | width: 1150px; | 3 | width: 1150px; |
3 | margin: 0 auto; | 4 | margin: 0 auto; |
@@ -195,6 +196,7 @@ | @@ -195,6 +196,7 @@ | ||
195 | } | 196 | } |
196 | &:hover { | 197 | &:hover { |
197 | @include opacity(0.9); | 198 | @include opacity(0.9); |
199 | + | ||
198 | } | 200 | } |
199 | } | 201 | } |
200 | } | 202 | } |
@@ -246,6 +248,140 @@ | @@ -246,6 +248,140 @@ | ||
246 | } | 248 | } |
247 | } | 249 | } |
248 | 250 | ||
251 | + .tpl-recommend{ | ||
252 | + a{ | ||
253 | + display: block; | ||
254 | + background-color: #f8f8f8; | ||
255 | + img{display: block;width: 100%;} | ||
256 | + } | ||
257 | + .tpl-nav{ | ||
258 | + float: left; | ||
259 | + width: 185px; | ||
260 | + height: 512px; | ||
261 | + overflow: hidden; | ||
262 | + .tpl-keywords{ | ||
263 | + .keywords0{ | ||
264 | + img{ | ||
265 | + height: 152px; | ||
266 | + } | ||
267 | + margin-bottom: 10px; | ||
268 | + } | ||
269 | + .keywords1{ | ||
270 | + img{ | ||
271 | + height: 86px; | ||
272 | + } | ||
273 | + margin-bottom: 8px; | ||
274 | + } | ||
275 | + } | ||
276 | + .tpl-category{ | ||
277 | + padding: 10px 0; | ||
278 | + background-color: #f8f8f8; | ||
279 | + a{ | ||
280 | + float: left; | ||
281 | + width: 50%; | ||
282 | + height: 38px; | ||
283 | + line-height: 38px; | ||
284 | + text-align: center; | ||
285 | + color: #000; | ||
286 | + font-size: 14px; | ||
287 | + overflow: hidden; | ||
288 | + } | ||
289 | + } | ||
290 | + } | ||
291 | + .tpl-brands{ | ||
292 | + float: left; | ||
293 | + margin-left: 8px; | ||
294 | + width: 378px; | ||
295 | + height: 512px; | ||
296 | + overflow: hidden; | ||
297 | + li{ | ||
298 | + margin-bottom: 8px; | ||
299 | + img{ | ||
300 | + height: 248px; | ||
301 | + width: 100%; | ||
302 | + } | ||
303 | + } | ||
304 | + | ||
305 | + } | ||
306 | + .tpl-types{ | ||
307 | + float: left; | ||
308 | + width: 579px; | ||
309 | + height: 512px; | ||
310 | + overflow: hidden; | ||
311 | + li{ | ||
312 | + float: left; | ||
313 | + margin-left: 8px; | ||
314 | + margin-bottom: 8px; | ||
315 | + img{ | ||
316 | + width: 185px; | ||
317 | + height:248px; | ||
318 | + } | ||
319 | + } | ||
320 | + } | ||
321 | + .tpl-products{ | ||
322 | + ul{margin-left:-10px; | ||
323 | + li{ | ||
324 | + float: left; | ||
325 | + margin-left:10px; | ||
326 | + img{ | ||
327 | + width: 222px; | ||
328 | + height: 298px; | ||
329 | + } | ||
330 | + } | ||
331 | + } | ||
332 | + } | ||
333 | + } | ||
334 | + | ||
335 | + .commodity{ | ||
336 | + margin-left: -10px; | ||
337 | + position: relative; | ||
338 | + li{ | ||
339 | + float: left; | ||
340 | + margin-left: 10px; | ||
341 | + margin-bottom:28px; | ||
342 | + padding-top:20px; | ||
343 | + position: relative; | ||
344 | + i{ | ||
345 | + position: absolute; | ||
346 | + top: 0px; | ||
347 | + display: block; | ||
348 | + width: 64px; | ||
349 | + height: 20px; | ||
350 | + } | ||
351 | + a{ | ||
352 | + display: block; | ||
353 | + height: 360px; | ||
354 | + width: 222px; | ||
355 | + .commodity-img{ | ||
356 | + img{ | ||
357 | + display: block; | ||
358 | + height: 298px; | ||
359 | + width: 222px; | ||
360 | + } | ||
361 | + } | ||
362 | + p.commodity-name{ | ||
363 | + font-size: 12px; | ||
364 | + color: #000; | ||
365 | + line-height: 40px; | ||
366 | + text-align: center; | ||
367 | + } | ||
368 | + p.commodity-price{ | ||
369 | + font-size: 12px; | ||
370 | + text-align: center; | ||
371 | + } | ||
372 | + } | ||
373 | + } | ||
374 | + .loading{ | ||
375 | + position: absolute; | ||
376 | + bottom: 0; | ||
377 | + width: 100%; | ||
378 | + p{ | ||
379 | + text-align: center; | ||
380 | + font-size: 20px; | ||
381 | + } | ||
382 | + } | ||
383 | + } | ||
384 | + | ||
249 | .floor-header { | 385 | .floor-header { |
250 | position: relative; | 386 | position: relative; |
251 | margin: 50px 0 30px; | 387 | margin: 50px 0 30px; |
@@ -10,6 +10,7 @@ | @@ -10,6 +10,7 @@ | ||
10 | 10 | ||
11 | &:first-child { | 11 | &:first-child { |
12 | border-top: none; | 12 | border-top: none; |
13 | + background: #eaeceb; | ||
13 | } | 14 | } |
14 | } | 15 | } |
15 | 16 | ||
@@ -48,12 +49,37 @@ | @@ -48,12 +49,37 @@ | ||
48 | -moz-user-select: none; | 49 | -moz-user-select: none; |
49 | } | 50 | } |
50 | 51 | ||
51 | - .channel { | ||
52 | - line-height: 35px; | ||
53 | - background: #eaeceb; | 52 | + .checked-conditions { |
53 | + line-height: 30px; | ||
54 | + | ||
55 | + .tag { | ||
56 | + display: block; | ||
57 | + float: left; | ||
58 | + padding: 0 10px; | ||
59 | + margin-right: 30px; | ||
60 | + background: #000; | ||
61 | + color: #fff; | ||
62 | + cursor: pointer; | ||
63 | + } | ||
64 | + | ||
65 | + .color-block { | ||
66 | + height: 14px; | ||
67 | + width: 14px; | ||
68 | + border: 1px solid #fff; | ||
69 | + margin-bottom: -3px; | ||
70 | + } | ||
71 | + | ||
72 | + .clear-checked { | ||
73 | + color: #999; | ||
74 | + float: right; | ||
75 | + } | ||
76 | + } | ||
77 | + | ||
78 | + .sort-sub-wrap { | ||
79 | + width: 100%; | ||
54 | 80 | ||
55 | - .title, .attr { | ||
56 | - line-height: 35px; | 81 | + .sort-sub { |
82 | + padding: 15px 0; | ||
57 | } | 83 | } |
58 | } | 84 | } |
59 | 85 | ||
@@ -131,6 +157,7 @@ | @@ -131,6 +157,7 @@ | ||
131 | margin-top: 5px; | 157 | margin-top: 5px; |
132 | background: #f4f7f6; | 158 | background: #f4f7f6; |
133 | min-height: 30px; | 159 | min-height: 30px; |
160 | + border: 1px solid #000; | ||
134 | } | 161 | } |
135 | } | 162 | } |
136 | 163 | ||
@@ -192,35 +219,64 @@ | @@ -192,35 +219,64 @@ | ||
192 | margin-right: 5px; | 219 | margin-right: 5px; |
193 | } | 220 | } |
194 | 221 | ||
222 | + .senior { | ||
223 | + padding-bottom: 6px; | ||
224 | + | ||
225 | + .attr-content { | ||
226 | + position: relative; | ||
227 | + } | ||
228 | + } | ||
229 | + | ||
195 | .senior-attr-wrap { | 230 | .senior-attr-wrap { |
196 | position: relative; | 231 | position: relative; |
232 | + } | ||
197 | 233 | ||
198 | - .sub { | ||
199 | - box-sizing: border-box; | ||
200 | - position: absolute; | ||
201 | - padding: 15px; | ||
202 | - left: 0; | ||
203 | - right: -16px; | ||
204 | - background: #fff; | ||
205 | - border: 1px solid #ccc; | 234 | + .senior-attr-wrap > .attr:hover, |
235 | + .senior-attr-wrap > .attr.hover { | ||
236 | + > .iconfont { | ||
237 | + visibility: hidden; | ||
238 | + } | ||
206 | 239 | ||
207 | - ul { | ||
208 | - max-width: 950px; | ||
209 | - } | 240 | + .senior-up-icon { |
241 | + visibility: visible; | ||
242 | + } | ||
243 | + } | ||
210 | 244 | ||
211 | - &.multi .multi-select { | ||
212 | - display: none; | ||
213 | - } | 245 | + .senior-sub { |
246 | + box-sizing: border-box; | ||
247 | + position: absolute; | ||
248 | + padding: 15px 0; | ||
249 | + left: 0; | ||
250 | + right: 0; | ||
251 | + top: 39px; | ||
252 | + background: #fff; | ||
253 | + border: 1px solid #eaeceb; | ||
214 | 254 | ||
215 | - .multi-select { | ||
216 | - position: absolute; | ||
217 | - top: 20px; | ||
218 | - right: 15px; | ||
219 | - } | 255 | + ul { |
256 | + max-width: 950px; | ||
257 | + } | ||
258 | + | ||
259 | + &.multi .multi-select { | ||
260 | + display: none; | ||
261 | + } | ||
262 | + | ||
263 | + .multi-select { | ||
264 | + position: absolute; | ||
265 | + top: 20px; | ||
266 | + right: 15px; | ||
220 | } | 267 | } |
221 | } | 268 | } |
222 | 269 | ||
270 | + .senior-up-icon { | ||
271 | + width: 100%; | ||
272 | + height: 9px; | ||
273 | + z-index: 1; | ||
274 | + margin-left: -11px; | ||
275 | + visibility: hidden; | ||
223 | 276 | ||
277 | + background: image-url('product/senior-up.png') no-repeat; | ||
278 | + background-position-x: 50%; | ||
279 | + } | ||
224 | 280 | ||
225 | .checkbox { | 281 | .checkbox { |
226 | display: none; | 282 | display: none; |
@@ -229,4 +285,114 @@ | @@ -229,4 +285,114 @@ | ||
229 | .multi .checkbox { | 285 | .multi .checkbox { |
230 | display: inline; | 286 | display: inline; |
231 | } | 287 | } |
288 | + | ||
289 | + .opt-banner { | ||
290 | + height: 48px; | ||
291 | + background: #f5f7f6; | ||
292 | + line-height: 48px; | ||
293 | + margin: 10px 0; | ||
294 | + | ||
295 | + .sort-type, | ||
296 | + .checks { | ||
297 | + color: #ccc; | ||
298 | + font-size: 14px; | ||
299 | + padding: 0 10px; | ||
300 | + | ||
301 | + .iconfont { | ||
302 | + font-size: 14px; | ||
303 | + } | ||
304 | + | ||
305 | + &.active, | ||
306 | + &.checked { | ||
307 | + color: #000; | ||
308 | + } | ||
309 | + } | ||
310 | + | ||
311 | + .pager-wrap { | ||
312 | + float: right; | ||
313 | + padding: 15px 0; | ||
314 | + } | ||
315 | + | ||
316 | + .line-count { | ||
317 | + float: left; | ||
318 | + padding: 3px 1px 3px 3px; | ||
319 | + border: 1px solid #ccc; | ||
320 | + margin-right: 10px; | ||
321 | + | ||
322 | + span { | ||
323 | + float: left; | ||
324 | + width: 5px; | ||
325 | + height: 10px; | ||
326 | + background: #ccc; | ||
327 | + margin-right: 2px; | ||
328 | + } | ||
329 | + | ||
330 | + &.active { | ||
331 | + border-color: #222; | ||
332 | + span { | ||
333 | + background: #222; | ||
334 | + } | ||
335 | + } | ||
336 | + } | ||
337 | + | ||
338 | + .page-count { | ||
339 | + position: relative; | ||
340 | + height: 18px; | ||
341 | + float: left; | ||
342 | + font-size: 12px; | ||
343 | + line-height: 18px; | ||
344 | + | ||
345 | + > span { | ||
346 | + float: left; | ||
347 | + display: block; | ||
348 | + width: 42px; | ||
349 | + height: 10px; | ||
350 | + line-height: 10px; | ||
351 | + padding: 3px; | ||
352 | + border: 1px solid #ccc; | ||
353 | + color: #222; | ||
354 | + cursor: pointer; | ||
355 | + margin-right: 10px; | ||
356 | + } | ||
357 | + | ||
358 | + .iconfont { | ||
359 | + font-size: 14px; | ||
360 | + color: #ccc; | ||
361 | + float: right; | ||
362 | + } | ||
363 | + | ||
364 | + > ul { | ||
365 | + position: absolute; | ||
366 | + display: none; | ||
367 | + width: 42px; | ||
368 | + padding: 0 3px; | ||
369 | + border-left: 1px solid #ccc; | ||
370 | + border-right: 1px solid #ccc; | ||
371 | + } | ||
372 | + | ||
373 | + li { | ||
374 | + border-bottom: 1px solid #ccc; | ||
375 | + } | ||
376 | + | ||
377 | + a { | ||
378 | + display: block; | ||
379 | + width: 100%; | ||
380 | + } | ||
381 | + } | ||
382 | + | ||
383 | + .pager { | ||
384 | + float: left; | ||
385 | + font-size: 14px; | ||
386 | + line-height: 15px; | ||
387 | + margin: 0 20px; | ||
388 | + | ||
389 | + .dis-icon { | ||
390 | + color: #e6e6e6; | ||
391 | + } | ||
392 | + | ||
393 | + i { | ||
394 | + color: #f00; | ||
395 | + } | ||
396 | + } | ||
397 | + } | ||
232 | } | 398 | } |
@@ -9,6 +9,55 @@ class BoysController extends AbstractAction | @@ -9,6 +9,55 @@ class BoysController extends AbstractAction | ||
9 | public function indexAction() | 9 | public function indexAction() |
10 | { | 10 | { |
11 | $this->setTitle('男生首页'); | 11 | $this->setTitle('男生首页'); |
12 | + $tpldata = array( | ||
13 | + 'name'=>'潮人配饰 ORNAMENT', | ||
14 | + 'navs' => array( | ||
15 | + 'list'=>array( | ||
16 | + array( | ||
17 | + 'url' =>'', | ||
18 | + 'name' =>'MORE>' | ||
19 | + ) | ||
20 | + ) | ||
21 | + ), | ||
22 | + 'tplrecommend'=>array( | ||
23 | + 'keyword'=>array(array('name'=>'工装短裤','img'=>'','url'=>''),array('name'=>'英伦风','img'=>'','url'=>'')), | ||
24 | + 'category'=>array(array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>''),array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>''),array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>''),array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>''),array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>''),array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>'')), | ||
25 | + 'brands'=>array(array('name'=>'工装短裤','img'=>'','url'=>''),array('name'=>'英伦风','img'=>'','url'=>'')), | ||
26 | + 'types'=>array(array('name'=>'工装短裤','img'=>'','url'=>''),array('name'=>'英伦风','img'=>'','url'=>''),array('name'=>'工装短裤','img'=>'','url'=>''),array('name'=>'英伦风','img'=>'','url'=>''),array('name'=>'工装短裤','img'=>'','url'=>''),array('name'=>'英伦风','img'=>'','url'=>'')), | ||
27 | + 'products'=>array( | ||
28 | + array( | ||
29 | + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
30 | + 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg', | ||
31 | + 'name'=> '优显led触控台灯', | ||
32 | + 'price'=> 168 | ||
33 | + ), | ||
34 | + array( | ||
35 | + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
36 | + 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg', | ||
37 | + 'name'=> '优显led触控台灯', | ||
38 | + 'price'=> 168 | ||
39 | + ), | ||
40 | + array( | ||
41 | + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
42 | + 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg', | ||
43 | + 'name'=> '优显led触控台灯', | ||
44 | + 'price'=> 168 | ||
45 | + ), | ||
46 | + array( | ||
47 | + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
48 | + 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg', | ||
49 | + 'name'=> '优显led触控台灯', | ||
50 | + 'price'=> 168 | ||
51 | + ), | ||
52 | + array( | ||
53 | + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
54 | + 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg', | ||
55 | + 'name'=> '优显led触控台灯', | ||
56 | + 'price'=> 168 | ||
57 | + ) | ||
58 | + ) | ||
59 | + ) | ||
60 | + ); | ||
12 | $data = array( | 61 | $data = array( |
13 | 'boysHomePage' => true, | 62 | 'boysHomePage' => true, |
14 | 'boy' => array( | 63 | 'boy' => array( |
@@ -177,10 +226,72 @@ class BoysController extends AbstractAction | @@ -177,10 +226,72 @@ class BoysController extends AbstractAction | ||
177 | 'href' => 'http://www.yohobuy.com' | 226 | 'href' => 'http://www.yohobuy.com' |
178 | ), | 227 | ), |
179 | ) | 228 | ) |
180 | - ) | ||
181 | - ) | ||
182 | - | ||
183 | - ); | 229 | + ), |
230 | + 'recommend'=>array($tpldata,$tpldata,$tpldata), | ||
231 | + 'newArrivls' => array( | ||
232 | + 'name' => '最新上架 NEW ARRIVALS', | ||
233 | + 'navs' => array( | ||
234 | + 'list'=>array( | ||
235 | + array( | ||
236 | + 'url' =>'', | ||
237 | + 'name' =>'MORE>' | ||
238 | + ) | ||
239 | + ), | ||
240 | + 'commodity'=>array( | ||
241 | + array( | ||
242 | + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
243 | + 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg', | ||
244 | + 'name'=> '优显led触控台灯', | ||
245 | + 'price'=> 168, | ||
246 | + 'state'=> 1 //状态 | ||
247 | + ), | ||
248 | + array( | ||
249 | + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
250 | + 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg', | ||
251 | + 'name'=> '优显led触控台灯', | ||
252 | + 'price'=> 168, | ||
253 | + 'state'=> 1 //状态 | ||
254 | + ), | ||
255 | + array( | ||
256 | + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
257 | + 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg', | ||
258 | + 'name'=> '优显led触控台灯', | ||
259 | + 'price'=> 168, | ||
260 | + 'state'=> 1 //状态 | ||
261 | + ), | ||
262 | + array( | ||
263 | + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
264 | + 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg', | ||
265 | + 'name'=> '优显led触控台灯', | ||
266 | + 'price'=> 168, | ||
267 | + 'state'=> 1 //状态 | ||
268 | + ), | ||
269 | + array( | ||
270 | + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
271 | + 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg', | ||
272 | + 'name'=> '优显led触控台灯', | ||
273 | + 'price'=> 168, | ||
274 | + 'state'=> 1 //状态 | ||
275 | + ), | ||
276 | + array( | ||
277 | + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
278 | + 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg', | ||
279 | + 'name'=> '优显led触控台灯', | ||
280 | + 'price'=> 168, | ||
281 | + 'state'=> 1 //状态 | ||
282 | + ), | ||
283 | + array( | ||
284 | + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
285 | + 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg', | ||
286 | + 'name'=> '优显led触控台灯', | ||
287 | + 'price'=> 168, | ||
288 | + 'state'=> 1 //状态 | ||
289 | + ) | ||
290 | + ) | ||
291 | + ) | ||
292 | + ) | ||
293 | + ) | ||
294 | + ); | ||
184 | $this->_view->display('index', $data); | 295 | $this->_view->display('index', $data); |
185 | } | 296 | } |
186 | } | 297 | } |
@@ -12,200 +12,295 @@ class IndexController extends AbstractAction | @@ -12,200 +12,295 @@ class IndexController extends AbstractAction | ||
12 | { | 12 | { |
13 | $data = array( | 13 | $data = array( |
14 | 'searchListPage' => true, | 14 | 'searchListPage' => true, |
15 | - 'filters' => array( | ||
16 | - 'channel' => array( | ||
17 | - array( | ||
18 | - 'href' => '/?gender=1,3', | ||
19 | - 'name' => 'BOYS' | ||
20 | - ), | ||
21 | - array( | ||
22 | - 'href' => '/?gender=2,3', | ||
23 | - 'name' => 'GIRLS' | ||
24 | - ), | ||
25 | - array( | ||
26 | - 'href' => '', | ||
27 | - 'name' => 'KIDS' | ||
28 | - ), | ||
29 | - array( | ||
30 | - 'href' => '', | ||
31 | - 'name' => 'LIFESTYLE' | ||
32 | - ) | ||
33 | - ), | ||
34 | - 'sort' => array( | ||
35 | - array( | ||
36 | - 'id' => '1', | ||
37 | - 'name' => '上衣' | ||
38 | - ), | ||
39 | - array( | ||
40 | - 'id' => '2', | ||
41 | - 'name' => '裤子' | ||
42 | - ), | ||
43 | - array( | ||
44 | - 'id' => '3', | ||
45 | - 'name' => '连衣裙' | 15 | + |
16 | + 'products' => array( | ||
17 | + 'filters' => array( | ||
18 | + 'checkedConditions' => array( | ||
19 | + 'conditions' => array( | ||
20 | + array( | ||
21 | + 'href' => '', | ||
22 | + 'name' => '暗黑' | ||
23 | + ), | ||
24 | + array( | ||
25 | + 'href' => '', | ||
26 | + 'color' => '#f00' | ||
27 | + ), | ||
28 | + array( | ||
29 | + 'href' => '', | ||
30 | + 'name' => 'CLOT' | ||
31 | + ) | ||
32 | + ), | ||
33 | + 'clearUrl' => '' | ||
46 | ), | 34 | ), |
47 | - array( | ||
48 | - 'id' => '4', | ||
49 | - 'name' => '鞋' | ||
50 | - ) | ||
51 | - ), | ||
52 | - 'brand' => array( | ||
53 | - 'default' => array( | 35 | + 'channel' => array( |
54 | array( | 36 | array( |
55 | - 'href' => '', | ||
56 | - 'name' => 'CLOT' | 37 | + 'href' => '/?gender=1,3', |
38 | + 'name' => 'BOYS' | ||
57 | ), | 39 | ), |
58 | array( | 40 | array( |
59 | - 'href' => '', | ||
60 | - 'name' => 'ABLE JEANS' | 41 | + 'href' => '/?gender=2,3', |
42 | + 'name' => 'GIRLS' | ||
61 | ), | 43 | ), |
62 | array( | 44 | array( |
63 | 'href' => '', | 45 | 'href' => '', |
64 | - 'name' => 'Eight Guys' | 46 | + 'name' => 'KIDS' |
65 | ), | 47 | ), |
66 | array( | 48 | array( |
67 | 'href' => '', | 49 | 'href' => '', |
68 | - 'name' => 'FAIRWHALE JEANS' | 50 | + 'name' => 'LIFESTYLE' |
51 | + ) | ||
52 | + ), | ||
53 | + 'sort' => array( | ||
54 | + array( | ||
55 | + 'id' => '1', | ||
56 | + 'name' => '上衣', | ||
57 | + 'sub' => array( | ||
58 | + array( | ||
59 | + 'href' => '', | ||
60 | + 'name' => 'T恤' | ||
61 | + ), | ||
62 | + array( | ||
63 | + 'href' => '', | ||
64 | + 'name' => '棉袄' | ||
65 | + ), | ||
66 | + array( | ||
67 | + 'href' => '', | ||
68 | + 'name' => '外套' | ||
69 | + ) | ||
70 | + ) | ||
69 | ), | 71 | ), |
70 | array( | 72 | array( |
71 | - 'href' => '', | ||
72 | - 'name' => '鬼洗' | 73 | + 'id' => '2', |
74 | + 'name' => '裤子' | ||
73 | ), | 75 | ), |
74 | array( | 76 | array( |
75 | - 'href' => '', | ||
76 | - 'name' => '金银帝国Imperial Taels' | 77 | + 'id' => '3', |
78 | + 'name' => '连衣裙' | ||
77 | ), | 79 | ), |
78 | array( | 80 | array( |
79 | - 'href' => '', | ||
80 | - 'name' => 'F.L.Y.D' | 81 | + 'id' => '4', |
82 | + 'name' => '鞋' | ||
83 | + ) | ||
84 | + ), | ||
85 | + 'brand' => array( | ||
86 | + 'default' => array( | ||
87 | + array( | ||
88 | + 'href' => '', | ||
89 | + 'name' => 'CLOT' | ||
90 | + ), | ||
91 | + array( | ||
92 | + 'href' => '', | ||
93 | + 'name' => 'ABLE JEANS' | ||
94 | + ), | ||
95 | + array( | ||
96 | + 'href' => '', | ||
97 | + 'name' => 'Eight Guys' | ||
98 | + ), | ||
99 | + array( | ||
100 | + 'href' => '', | ||
101 | + 'name' => 'FAIRWHALE JEANS' | ||
102 | + ), | ||
103 | + array( | ||
104 | + 'href' => '', | ||
105 | + 'name' => '鬼洗' | ||
106 | + ), | ||
107 | + array( | ||
108 | + 'href' => '', | ||
109 | + 'name' => '金银帝国Imperial Taels' | ||
110 | + ), | ||
111 | + array( | ||
112 | + 'href' => '', | ||
113 | + 'name' => 'F.L.Y.D' | ||
114 | + ), | ||
115 | + array( | ||
116 | + 'href' => '', | ||
117 | + 'name' => 'Tapenade特芙娜' | ||
118 | + ), | ||
119 | + array( | ||
120 | + 'href' => '', | ||
121 | + 'name' => 'Adidas Originals' | ||
122 | + ) | ||
123 | + ), | ||
124 | + 'brandIndex' => array( | ||
125 | + array( | ||
126 | + 'index' => 'all', | ||
127 | + 'name' => '全部' | ||
128 | + ), | ||
129 | + array( | ||
130 | + 'index' => '0-9', | ||
131 | + 'name' => '0 ~ 9' | ||
132 | + ), | ||
133 | + array( | ||
134 | + 'index' => 'a', | ||
135 | + 'name' => 'A' | ||
136 | + ) | ||
81 | ), | 137 | ), |
138 | + 'brandsShow' => array( | ||
139 | + array( | ||
140 | + 'id' => '1', | ||
141 | + 'href' => '', | ||
142 | + 'index' => '0-9', | ||
143 | + 'name' => '5cm', | ||
144 | + 'key' => '5cm' | ||
145 | + ), | ||
146 | + array( | ||
147 | + 'id' => '2', | ||
148 | + 'href' => '', | ||
149 | + 'index' => 'k', | ||
150 | + 'name' => 'KTZ', | ||
151 | + 'key' => 'ktz' | ||
152 | + ), | ||
153 | + array( | ||
154 | + 'id' => '3', | ||
155 | + 'href' => '', | ||
156 | + 'index' => 't', | ||
157 | + 'name' => 'Tapenade特芙娜', | ||
158 | + 'key' => 'tapenade特芙娜' | ||
159 | + ), | ||
160 | + array( | ||
161 | + 'id' => '4', | ||
162 | + 'href' => '', | ||
163 | + 'index' => 'j', | ||
164 | + 'name' => '金银帝国Imperial Taels', | ||
165 | + 'key' => '金银帝国imperial taels' | ||
166 | + ), | ||
167 | + array( | ||
168 | + 'id' => '5', | ||
169 | + 'href' => '', | ||
170 | + 'index' => 'a', | ||
171 | + 'name' => 'ABLE JEANS', | ||
172 | + 'key' => 'able jeans' | ||
173 | + ) | ||
174 | + ) | ||
175 | + ), | ||
176 | + 'price' => array( | ||
82 | array( | 177 | array( |
83 | 'href' => '', | 178 | 'href' => '', |
84 | - 'name' => 'Tapenade特芙娜' | 179 | + 'name' => '0-239' |
85 | ), | 180 | ), |
86 | array( | 181 | array( |
87 | 'href' => '', | 182 | 'href' => '', |
88 | - 'name' => 'Adidas Originals' | 183 | + 'name' => '240-329' |
89 | ) | 184 | ) |
90 | ), | 185 | ), |
91 | - 'brandIndex' => array( | 186 | + 'color' => array( |
92 | array( | 187 | array( |
93 | - 'index' => 'all', | ||
94 | - 'name' => '全部' | 188 | + 'href' => '', |
189 | + 'name' => '黑色', | ||
190 | + 'rgb' => '#000' | ||
95 | ), | 191 | ), |
96 | array( | 192 | array( |
97 | - 'index' => '0-9', | ||
98 | - 'name' => '0 ~ 9' | 193 | + 'href' => '', |
194 | + 'name' => '红色', | ||
195 | + 'rgb' => '#f00' | ||
196 | + ) | ||
197 | + ), | ||
198 | + 'size' => array( | ||
199 | + array( | ||
200 | + 'href' => '', | ||
201 | + 'name' => 'S' | ||
99 | ), | 202 | ), |
100 | array( | 203 | array( |
101 | - 'index' => 'a', | ||
102 | - 'name' => 'A' | 204 | + 'href' => '', |
205 | + 'name' => 'L' | ||
103 | ) | 206 | ) |
104 | ), | 207 | ), |
105 | - 'brandsShow' => array( | 208 | + 'seniorChose' => array( |
106 | array( | 209 | array( |
107 | - 'id' => '1', | ||
108 | - 'href' => '', | ||
109 | - 'index' => '0-9', | ||
110 | - 'name' => '5cm', | ||
111 | - 'key' => '5cm' | 210 | + 'attr' => 'style', |
211 | + 'name' => '风格', | ||
212 | + 'showMulti' => true, | ||
213 | + 'sub' => array( | ||
214 | + array( | ||
215 | + 'id' => '1', | ||
216 | + 'href' => '', | ||
217 | + 'name' => '街头' | ||
218 | + ), | ||
219 | + array( | ||
220 | + 'id' => '2', | ||
221 | + 'href' => '', | ||
222 | + 'name' => '简约' | ||
223 | + ) | ||
224 | + ) | ||
112 | ), | 225 | ), |
113 | array( | 226 | array( |
114 | - 'id' => '2', | 227 | + 'attr' => 'weather', |
228 | + 'name' => '适用季节', | ||
229 | + 'sub' => array( | ||
230 | + array( | ||
231 | + 'id' => '1', | ||
232 | + 'href' => '', | ||
233 | + 'name' => '春天' | ||
234 | + ), | ||
235 | + array( | ||
236 | + 'id' => '2', | ||
237 | + 'href' => '', | ||
238 | + 'name' => '夏天' | ||
239 | + ) | ||
240 | + ) | ||
241 | + ) | ||
242 | + ) | ||
243 | + ), | ||
244 | + 'opts' => array( | ||
245 | + 'sortType' => array( | ||
246 | + array( | ||
115 | 'href' => '', | 247 | 'href' => '', |
116 | - 'index' => 'k', | ||
117 | - 'name' => 'KTZ', | ||
118 | - 'key' => 'ktz' | 248 | + 'name' => '默认' |
119 | ), | 249 | ), |
120 | array( | 250 | array( |
121 | - 'id' => '3', | 251 | + 'active' => true, |
122 | 'href' => '', | 252 | 'href' => '', |
123 | - 'index' => 't', | ||
124 | - 'name' => 'Tapenade特芙娜', | ||
125 | - 'key' => 'tapenade特芙娜' | 253 | + 'name' => '最新', |
254 | + 'hasSortOrient' => true, | ||
255 | + 'desc' => true | ||
126 | ), | 256 | ), |
127 | array( | 257 | array( |
128 | - 'id' => '4', | ||
129 | 'href' => '', | 258 | 'href' => '', |
130 | - 'index' => 'j', | ||
131 | - 'name' => '金银帝国Imperial Taels', | ||
132 | - 'key' => '金银帝国imperial taels' | 259 | + 'name' => '价格', |
260 | + 'hasSortOrient' => true | ||
133 | ), | 261 | ), |
134 | array( | 262 | array( |
135 | - 'id' => '5', | ||
136 | 'href' => '', | 263 | 'href' => '', |
137 | - 'index' => 'a', | ||
138 | - 'name' => 'ABLE JEANS', | ||
139 | - 'key' => 'able jeans' | 264 | + 'name' => '折扣', |
265 | + 'hasSortOrient' => true | ||
140 | ) | 266 | ) |
141 | - ) | ||
142 | - ), | ||
143 | - 'price' => array( | ||
144 | - array( | ||
145 | - 'href' => '', | ||
146 | - 'name' => '0-239' | ||
147 | - ), | ||
148 | - array( | ||
149 | - 'href' => '', | ||
150 | - 'name' => '240-329' | ||
151 | - ) | ||
152 | - ), | ||
153 | - 'color' => array( | ||
154 | - array( | ||
155 | - 'href' => '', | ||
156 | - 'name' => '黑色', | ||
157 | - 'rgb' => '#000' | ||
158 | ), | 267 | ), |
159 | - array( | ||
160 | - 'href' => '', | ||
161 | - 'name' => '红色', | ||
162 | - 'rgb' => '#f00' | ||
163 | - ) | ||
164 | - ), | ||
165 | - 'size' => array( | ||
166 | - array( | ||
167 | - 'href' => '', | ||
168 | - 'name' => 'S' | ||
169 | - ), | ||
170 | - array( | ||
171 | - 'href' => '', | ||
172 | - 'name' => 'L' | ||
173 | - ) | ||
174 | - ), | ||
175 | - 'seniorChose' => array( | ||
176 | - array( | ||
177 | - 'attr' => 'style', | ||
178 | - 'name' => '风格', | ||
179 | - 'showMulti' => true, | ||
180 | - 'sub' => array( | ||
181 | - array( | ||
182 | - 'id' => '1', | ||
183 | - 'href' => '', | ||
184 | - 'name' => '街头' | ||
185 | - ), | ||
186 | - array( | ||
187 | - 'id' => '2', | ||
188 | - 'href' => '', | ||
189 | - 'name' => '简约' | ||
190 | - ) | 268 | + 'checks' => array( |
269 | + array( | ||
270 | + 'name' => '新品', | ||
271 | + 'checked' => true, | ||
272 | + 'href' => '' | ||
273 | + ), | ||
274 | + array( | ||
275 | + 'name' => '打折', | ||
276 | + 'href' => '' | ||
277 | + ), | ||
278 | + array( | ||
279 | + 'name' => '限量', | ||
280 | + 'checked' => true, | ||
281 | + 'href' => '' | ||
191 | ) | 282 | ) |
192 | ), | 283 | ), |
193 | - array( | ||
194 | - 'attr' => 'weather', | ||
195 | - 'name' => '适用季节', | ||
196 | - 'sub' => array( | ||
197 | - array( | ||
198 | - 'id' => '1', | ||
199 | - 'href' => '', | ||
200 | - 'name' => '春天' | ||
201 | - ), | ||
202 | - array( | ||
203 | - 'id' => '2', | ||
204 | - 'href' => '', | ||
205 | - 'name' => '夏天' | ||
206 | - ) | 284 | + 'fivePerLine' => true, |
285 | + 'sixPerLineHref' => '', | ||
286 | + 'countPerPage' => '120', | ||
287 | + 'pageCounts' => array( | ||
288 | + array( | ||
289 | + 'href' => '', | ||
290 | + 'count' => 60 | ||
291 | + ), | ||
292 | + array( | ||
293 | + 'href' => '', | ||
294 | + 'count' => 100 | ||
295 | + ), | ||
296 | + array( | ||
297 | + 'href' => '', | ||
298 | + 'count' => 120 | ||
207 | ) | 299 | ) |
208 | - ) | 300 | + ), |
301 | + 'curPage' => 1, | ||
302 | + 'pageCount' => 30, | ||
303 | + 'nextHref' => 'hello' | ||
209 | ) | 304 | ) |
210 | ) | 305 | ) |
211 | ); | 306 | ); |
-
Please register or login to post a comment