Showing
18 changed files
with
196 additions
and
865 deletions
@@ -118,7 +118,7 @@ class SearchData | @@ -118,7 +118,7 @@ class SearchData | ||
118 | // return 'http://101.200.31.165/yohosearch/brand/list.json'; | 118 | // return 'http://101.200.31.165/yohosearch/brand/list.json'; |
119 | // return 'http://182.92.99.119:8080/yohosearch/brand/list.json'; | 119 | // return 'http://182.92.99.119:8080/yohosearch/brand/list.json'; |
120 | } | 120 | } |
121 | - return 'http://101.200.31.165/yohosearch/search.json'; | 121 | + return 'http://192.168.102.216:8087/yohosearch/search.json';//支持shop_id |
122 | //return 'http://101.200.31.165/yohosearch/search.json'; | 122 | //return 'http://101.200.31.165/yohosearch/search.json'; |
123 | // return 'http://182.92.99.119:8080/yohosearch/search.json'; | 123 | // return 'http://182.92.99.119:8080/yohosearch/search.json'; |
124 | } | 124 | } |
@@ -37,7 +37,6 @@ class ShopProcess | @@ -37,7 +37,6 @@ class ShopProcess | ||
37 | */ | 37 | */ |
38 | private static function decorator($data) | 38 | private static function decorator($data) |
39 | { | 39 | { |
40 | -// print_r($data); exit; | ||
41 | if (!isset($data['code']) || $data['code'] != 200 || !isset($data['data']['list']) || empty($data['data']['list'])) { | 40 | if (!isset($data['code']) || $data['code'] != 200 || !isset($data['data']['list']) || empty($data['data']['list'])) { |
42 | return; | 41 | return; |
43 | } | 42 | } |
@@ -60,6 +59,8 @@ class ShopProcess | @@ -60,6 +59,8 @@ class ShopProcess | ||
60 | self::$shopData['storeName'] = $data['data']['shop_name']; | 59 | self::$shopData['storeName'] = $data['data']['shop_name']; |
61 | //用户是否收藏店铺 | 60 | //用户是否收藏店铺 |
62 | self::$shopData['favorite'] = $data['data']['is_favorite'] == 'Y' ? true : false; | 61 | self::$shopData['favorite'] = $data['data']['is_favorite'] == 'Y' ? true : false; |
62 | + //店铺简介页地址 | ||
63 | + self::$shopData['shopIntroHref'] = Helpers::url('', '', $data['data']['shop_domain']); | ||
63 | } | 64 | } |
64 | 65 | ||
65 | /** | 66 | /** |
@@ -102,8 +103,9 @@ class ShopProcess | @@ -102,8 +103,9 @@ class ShopProcess | ||
102 | */ | 103 | */ |
103 | private static function brandBrowse($data) | 104 | private static function brandBrowse($data) |
104 | { | 105 | { |
106 | +// print_r($data); | ||
105 | foreach ($data as $val) { | 107 | foreach ($data as $val) { |
106 | - self::$shopData['brandList']['list'] = array( | 108 | + self::$shopData['brandList']['list'][] = array( |
107 | 'url' => Helpers::url('', '', $val['brandDomain']), | 109 | 'url' => Helpers::url('', '', $val['brandDomain']), |
108 | 'img' => Images::getImageUrl($val['brandIco'], 640, 400), | 110 | 'img' => Images::getImageUrl($val['brandIco'], 640, 400), |
109 | 'brandName' => $val['brandName'] | 111 | 'brandName' => $val['brandName'] |
@@ -113,6 +115,7 @@ class ShopProcess | @@ -113,6 +115,7 @@ class ShopProcess | ||
113 | //TODO | 115 | //TODO |
114 | self::$shopData['brandList']['url'] = Helpers::url('brandList'); | 116 | self::$shopData['brandList']['url'] = Helpers::url('brandList'); |
115 | } | 117 | } |
118 | +// print_r(self::$shopData['brandList']); exit; | ||
116 | } | 119 | } |
117 | 120 | ||
118 | /** | 121 | /** |
@@ -406,7 +406,6 @@ $.jqtab = function(nav, posNav, main) { | @@ -406,7 +406,6 @@ $.jqtab = function(nav, posNav, main) { | ||
406 | $(nav + ' li, ' + posNav + ' li').on('touchstart', function() { | 406 | $(nav + ' li, ' + posNav + ' li').on('touchstart', function() { |
407 | var index = $(this).index(), | 407 | var index = $(this).index(), |
408 | activeTab = $(this).attr('tab'); | 408 | activeTab = $(this).attr('tab'); |
409 | - console.log(activeTab) | ||
410 | 409 | ||
411 | tabChange($(nav + ' li'), index); | 410 | tabChange($(nav + ' li'), index); |
412 | tabChange($(posNav + ' li'), index); | 411 | tabChange($(posNav + ' li'), index); |
@@ -501,10 +500,6 @@ $(function(){ | @@ -501,10 +500,6 @@ $(function(){ | ||
501 | }); | 500 | }); |
502 | }, 1000) | 501 | }, 1000) |
503 | 502 | ||
504 | - | ||
505 | - | ||
506 | - // console.log(lazyLoad) | ||
507 | - // console.log($('#scroller').height()) | ||
508 | 503 | ||
509 | document.addEventListener('touchmove', function(e) { | 504 | document.addEventListener('touchmove', function(e) { |
510 | e.preventDefault(); | 505 | e.preventDefault(); |
@@ -527,3 +522,14 @@ window.onload = function() { | @@ -527,3 +522,14 @@ window.onload = function() { | ||
527 | scH = $('#scroller').outerHeight(); | 522 | scH = $('#scroller').outerHeight(); |
528 | }; | 523 | }; |
529 | 524 | ||
525 | +//底部点击 | ||
526 | +function fotterClick(group) { | ||
527 | + $(group + ' li').on('touchstart', function() { | ||
528 | + $('.sub-group').addClass('hide'); | ||
529 | + if ($(this).find('.sub-group').length > 0){ | ||
530 | + $(this).find('.sub-group').removeClass('hide'); | ||
531 | + } | ||
532 | + }); | ||
533 | +}; | ||
534 | + | ||
535 | +fotterClick('.shop-foot-wrapper'); |
@@ -4,12 +4,11 @@ | @@ -4,12 +4,11 @@ | ||
4 | 4 | ||
5 | .allproduct { | 5 | .allproduct { |
6 | position: relative; | 6 | position: relative; |
7 | - padding: 15px 0; | 7 | + height: 89px; |
8 | + line-height: 89px; | ||
8 | background: #fff; | 9 | background: #fff; |
9 | - border-top: 15px; | ||
10 | - border-bottom: 15px; | ||
11 | - padding-left: 32px; | ||
12 | border-top: 1px solid #e6e6e6; | 10 | border-top: 1px solid #e6e6e6; |
11 | + margin-left: 30px; | ||
13 | } | 12 | } |
14 | 13 | ||
15 | .margin-under-allproduct{ | 14 | .margin-under-allproduct{ |
@@ -23,9 +22,9 @@ | @@ -23,9 +22,9 @@ | ||
23 | } | 22 | } |
24 | .arrow-icon { | 23 | .arrow-icon { |
25 | position: absolute; | 24 | position: absolute; |
26 | - font-size: 16px; | ||
27 | - top: 15px; | ||
28 | - right: 20px; | 25 | + font-size: 30px; |
26 | + top: 0px; | ||
27 | + right: 33px; | ||
29 | color: #e1e1e1; | 28 | color: #e1e1e1; |
30 | } | 29 | } |
31 | 30 |
@@ -142,14 +142,12 @@ | @@ -142,14 +142,12 @@ | ||
142 | 142 | ||
143 | .multi-browse { | 143 | .multi-browse { |
144 | margin-top: 50px; | 144 | margin-top: 50px; |
145 | - | ||
146 | - @extend .swiper-container | ||
147 | } | 145 | } |
148 | 146 | ||
149 | .brand-img { | 147 | .brand-img { |
150 | margin-left: 30px; | 148 | margin-left: 30px; |
151 | width: 30%; | 149 | width: 30%; |
152 | - height: 55%; | 150 | + height: 150px; |
153 | overflow: hidden; | 151 | overflow: hidden; |
154 | padding-bottom: 20px; | 152 | padding-bottom: 20px; |
155 | float: left; | 153 | float: left; |
@@ -159,6 +157,10 @@ | @@ -159,6 +157,10 @@ | ||
159 | color: #b1b1b1; | 157 | color: #b1b1b1; |
160 | padding-top: 10px; | 158 | padding-top: 10px; |
161 | } | 159 | } |
160 | + | ||
161 | + img { | ||
162 | + height: 70%; | ||
163 | + } | ||
162 | } | 164 | } |
163 | 165 | ||
164 | .spring { | 166 | .spring { |
@@ -268,10 +270,6 @@ | @@ -268,10 +270,6 @@ | ||
268 | color: #b1b1b1; | 270 | color: #b1b1b1; |
269 | } | 271 | } |
270 | 272 | ||
271 | - .cur { | ||
272 | - color: #000; | ||
273 | - } | ||
274 | - | ||
275 | .goods-container { | 273 | .goods-container { |
276 | position: relative; | 274 | position: relative; |
277 | min-height: 440px; | 275 | min-height: 440px; |
@@ -304,25 +302,13 @@ | @@ -304,25 +302,13 @@ | ||
304 | } | 302 | } |
305 | } | 303 | } |
306 | 304 | ||
307 | - .list-nav { | ||
308 | - .active > a { | 305 | + |
306 | + .active { | ||
307 | + .cur { | ||
309 | color: #000; | 308 | color: #000; |
310 | - | ||
311 | - .spanTest{ | ||
312 | - width: auto; | ||
313 | - height: 100%; | ||
314 | - display: inline-block; | ||
315 | - box-sizing:border-box; | ||
316 | - } | ||
317 | - .iconfont { | ||
318 | - color: #999; | ||
319 | - | ||
320 | - &.cur { | ||
321 | - color: #000; | ||
322 | - } | ||
323 | - } | ||
324 | - } | 309 | + } |
325 | } | 310 | } |
311 | + | ||
326 | 312 | ||
327 | .list-nav .icon .up { | 313 | .list-nav .icon .up { |
328 | top: -6px; | 314 | top: -6px; |
@@ -344,6 +330,7 @@ | @@ -344,6 +330,7 @@ | ||
344 | 330 | ||
345 | .search-area { | 331 | .search-area { |
346 | @extend .search-page; | 332 | @extend .search-page; |
333 | + margin-top: 85px; | ||
347 | } | 334 | } |
348 | 335 | ||
349 | .hide { | 336 | .hide { |
@@ -400,10 +387,11 @@ | @@ -400,10 +387,11 @@ | ||
400 | .sub-group { | 387 | .sub-group { |
401 | position: absolute; | 388 | position: absolute; |
402 | background: #fff; | 389 | background: #fff; |
403 | - border-right: 1px solid #eaeaea; | ||
404 | - border-radius: 5px; | 390 | + border: 1px solid #eaeaea; |
391 | + border-radius: 12px; | ||
405 | bottom: 104px; | 392 | bottom: 104px; |
406 | - width: 30%; | 393 | + width: 40%; |
394 | + margin-left: 5%; | ||
407 | 395 | ||
408 | dl { | 396 | dl { |
409 | width: 80%; | 397 | width: 80%; |
@@ -414,6 +402,9 @@ | @@ -414,6 +402,9 @@ | ||
414 | line-height: 80px; | 402 | line-height: 80px; |
415 | text-align: center; | 403 | text-align: center; |
416 | border-top: 1px solid #eaeaea; | 404 | border-top: 1px solid #eaeaea; |
405 | + white-space: nowrap; | ||
406 | + overflow: hidden; | ||
407 | + text-overflow: ellipsis; | ||
417 | } | 408 | } |
418 | 409 | ||
419 | dd:first-child { | 410 | dd:first-child { |
@@ -424,8 +415,13 @@ | @@ -424,8 +415,13 @@ | ||
424 | .sharp { | 415 | .sharp { |
425 | position: absolute; | 416 | position: absolute; |
426 | width: 100%; | 417 | width: 100%; |
427 | - height: 8px; | ||
428 | - background: url('product/sharp.png') no-repeat center center; | 418 | + height: 14px; |
419 | + background: resolve('product/sharp.png') no-repeat center center; | ||
420 | + } | ||
421 | + | ||
422 | + .foot-list-3 .sub-group { | ||
423 | + width: 29%; | ||
424 | + margin-left: 2%; | ||
429 | } | 425 | } |
430 | } | 426 | } |
431 | 427 |
static/sass/product/_shop-index.scss
deleted
100644 → 0
1 | -.shop-index { | ||
2 | - position: absolute; | ||
3 | - top: 0; | ||
4 | - bottom: 0; | ||
5 | - left: 0; | ||
6 | - right: 0; | ||
7 | - overflow: hidden; | ||
8 | - | ||
9 | - .branner-top { | ||
10 | - width: 100%; | ||
11 | - height: 200rem / $pxConvertRem; | ||
12 | - position: relative; | ||
13 | - overflow: hidden; | ||
14 | - } | ||
15 | - | ||
16 | - .logo { | ||
17 | - position: absolute; | ||
18 | - overflow: hidden; | ||
19 | - left: 30rem / $pxConvertRem; | ||
20 | - bottom: 30rem / $pxConvertRem; | ||
21 | - width: 100rem / $pxConvertRem; | ||
22 | - height: 100rem / $pxConvertRem; | ||
23 | - } | ||
24 | - | ||
25 | - .store-name { | ||
26 | - color: #fff; | ||
27 | - font-size: 28rem / $pxConvertRem; | ||
28 | - position: absolute; | ||
29 | - overflow: hidden; | ||
30 | - left: 148rem / $pxConvertRem; | ||
31 | - bottom: 20rem / $pxConvertRem; | ||
32 | - } | ||
33 | - | ||
34 | - .collect { | ||
35 | - width: 128rem / $pxConvertRem; | ||
36 | - height: 50rem / $pxConvertRem; | ||
37 | - position: absolute; | ||
38 | - bottom: 30rem / $pxConvertRem; | ||
39 | - right: 30rem / $pxConvertRem; | ||
40 | - border-radius: 10rem / $pxConvertRem; | ||
41 | - text-align: center; | ||
42 | - background: image-url('product/collect.png') no-repeat; | ||
43 | - background-size: contain; | ||
44 | - } | ||
45 | - | ||
46 | - .nav { | ||
47 | - width: 100%; | ||
48 | - height: 88rem / $pxConvertRem; | ||
49 | - margin: 0; | ||
50 | - padding: 0; | ||
51 | - border: 0; | ||
52 | - font: inherit; | ||
53 | - vertical-align: baseline; | ||
54 | - list-style: none; | ||
55 | - font-size: 0.7rem; | ||
56 | - background: #fff; | ||
57 | - overflow: hidden; | ||
58 | - border-sizing: border-box; | ||
59 | - border-bottom: 2rem / $pxConvertRem solid #e1e1e1; | ||
60 | - | ||
61 | - li{ | ||
62 | - color: #b1b1b1; | ||
63 | - display: block; | ||
64 | - height: 28rem /$pxConvertRem; | ||
65 | - float: left; | ||
66 | - line-height: 28rem /$pxConvertRem; | ||
67 | - width: 24%; | ||
68 | - text-align: center; | ||
69 | - border-left: 1rem / $pxConvertRem solid #e1e1e1; | ||
70 | - margin-top: 30rem / $pxConvertRem; | ||
71 | - border-sizing: border-box; | ||
72 | - color: #b1b1b1; | ||
73 | - | ||
74 | - &:first-child { | ||
75 | - border-left: none; | ||
76 | - } | ||
77 | - | ||
78 | - a { | ||
79 | - color: #b1b1b1; | ||
80 | - } | ||
81 | - } | ||
82 | - | ||
83 | - .color { | ||
84 | - color: #000; | ||
85 | - } | ||
86 | - } | ||
87 | - | ||
88 | - .main { | ||
89 | - background: #f0f0f0; | ||
90 | - padding-bottom: 1rem; | ||
91 | - overflow: hidden; | ||
92 | - } | ||
93 | - | ||
94 | - .banner-area { | ||
95 | - @extend .banner-top; | ||
96 | - | ||
97 | - .banner-swiper ul { | ||
98 | - height: 6.5rem; | ||
99 | - } | ||
100 | - | ||
101 | - .swiper-pagination { | ||
102 | - bottom: 1.5rem; | ||
103 | - } | ||
104 | - | ||
105 | - } | ||
106 | - | ||
107 | - .hide { | ||
108 | - display: hidden; | ||
109 | - } | ||
110 | - | ||
111 | - .coupon { | ||
112 | - width: 100%; | ||
113 | - padding: 30rem / $pxConvertRem 0; | ||
114 | - overflow: hidden; | ||
115 | - | ||
116 | - img { | ||
117 | - width: 245rem / $pxConvertRem; | ||
118 | - height: 120rem / $pxConvertRem; | ||
119 | - vertical-align: top; | ||
120 | - margin-left: 30rem / $pxConvertRem; | ||
121 | - float: left; | ||
122 | - } | ||
123 | - } | ||
124 | - | ||
125 | - .multi-brands { | ||
126 | - width: 100%; | ||
127 | - height: 270rem / $pxConvertRem; | ||
128 | - background: #fff; | ||
129 | - border: 1px solid #e1e1e1; | ||
130 | - border-top: none; | ||
131 | - font-size: 20px; | ||
132 | - text-align: center; | ||
133 | - padding-top: 25rem / $pxConvertRem; | ||
134 | - margin-bottom: 30rem / $pxConvertRem; | ||
135 | - overflow: hidden; | ||
136 | - | ||
137 | - h2 { | ||
138 | - font-size: 28rem / $pxConvertRem; | ||
139 | - } | ||
140 | - } | ||
141 | - | ||
142 | - .multi-browse { | ||
143 | - margin-top: 50rem / $pxConvertRem; | ||
144 | - | ||
145 | - @extend .swiper-container | ||
146 | - } | ||
147 | - | ||
148 | - .brand-img { | ||
149 | - margin-left: 30rem / $pxConvertRem; | ||
150 | - width: 30%; | ||
151 | - height: 55%; | ||
152 | - overflow: hidden; | ||
153 | - padding-bottom: 20rem / $pxConvertRem; | ||
154 | - float: left; | ||
155 | - | ||
156 | - p { | ||
157 | - font-size: 25rem / $pxConvertRem; | ||
158 | - color: #b1b1b1; | ||
159 | - padding-top: 10rem / $pxConvertRem; | ||
160 | - } | ||
161 | - } | ||
162 | - | ||
163 | - .spring { | ||
164 | - margin: 0; | ||
165 | - overflow: hidden; | ||
166 | - | ||
167 | - li { | ||
168 | - width: 50%; | ||
169 | - float: left; | ||
170 | - text-align: center; | ||
171 | - list-style: none; | ||
172 | - display: list-item; | ||
173 | - | ||
174 | - img { | ||
175 | - width: 90%; | ||
176 | - border-radius: 10rem / $pxConvertRem; | ||
177 | - vertical-align: top; | ||
178 | - } | ||
179 | - } | ||
180 | - } | ||
181 | - | ||
182 | - .popularity-title { | ||
183 | - background: #fff; | ||
184 | - border-bottom: 1px solid #e8e8e8; | ||
185 | - text-align: center; | ||
186 | - line-height: 98rem / $pxConvertRem; | ||
187 | - font-size: 0.8rem; | ||
188 | - margin-top: 1rem; | ||
189 | - position: relative; | ||
190 | - } | ||
191 | - | ||
192 | - .more { | ||
193 | - position: absolute; | ||
194 | - right: .75rem; | ||
195 | - top: 0; | ||
196 | - bottom: 0; | ||
197 | - color: #b0b0b0; | ||
198 | - font-size: 1.25rem; | ||
199 | - font-family: "iconfont" !important; | ||
200 | - font-style: normal; | ||
201 | - text-decoration: none; | ||
202 | - } | ||
203 | - | ||
204 | - .product-list { | ||
205 | - margin: 0; | ||
206 | - padding: 0 0 30rem / $pxConvertRem 30rem / $pxConvertRem; | ||
207 | - overflow: hidden; | ||
208 | - background: #fff; | ||
209 | - border-bottom: 30rem / $pxConvertRem solid #f0f0f0; | ||
210 | - | ||
211 | - li { | ||
212 | - width: 275rem / $pxConvertRem; | ||
213 | - height: 368rem / $pxConvertRem; | ||
214 | - margin-top: 50rem / $pxConvertRem; | ||
215 | - margin-right: 30rem / $pxConvertRem; | ||
216 | - float: left; | ||
217 | - text-align: center; | ||
218 | - list-style: none; | ||
219 | - | ||
220 | - img { | ||
221 | - width: 100%; | ||
222 | - vertical-align: top; | ||
223 | - } | ||
224 | - } | ||
225 | - } | ||
226 | - | ||
227 | - .list-price { | ||
228 | - height: 60rem / $pxConvertRem; | ||
229 | - background: #ABACAC; | ||
230 | - color: #FFFFFF; | ||
231 | - font-size: 22rem / $pxConvertRem; | ||
232 | - margin-top: -60rem / $pxConvertRem; | ||
233 | - position: relative; | ||
234 | - opacity: 0.7; | ||
235 | - padding-left: 15rem / $pxConvertRem; | ||
236 | - | ||
237 | - p { | ||
238 | - margin: 0; | ||
239 | - line-height: 32rem / $pxConvertRem; | ||
240 | - text-align: left; | ||
241 | - } | ||
242 | - } | ||
243 | - | ||
244 | - .red { | ||
245 | - color: red; | ||
246 | - } | ||
247 | - | ||
248 | - .icon { | ||
249 | - position: relative; | ||
250 | - | ||
251 | - i { | ||
252 | - position: absolute; | ||
253 | - } | ||
254 | - | ||
255 | - .up { | ||
256 | - top: -5rem / $pxConvertRem; | ||
257 | - left: 8rem / $pxConvertRem; | ||
258 | - } | ||
259 | - | ||
260 | - .down { | ||
261 | - top: 8rem / $pxConvertRem; | ||
262 | - left: 8rem / $pxConvertRem; | ||
263 | - } | ||
264 | - } | ||
265 | - | ||
266 | - .iconfont { | ||
267 | - color: #b1b1b1; | ||
268 | - } | ||
269 | - | ||
270 | - .active .cur { | ||
271 | - color: #000; | ||
272 | - } | ||
273 | - | ||
274 | - .goods-container { | ||
275 | - position: relative; | ||
276 | - min-height: 440rem / $pxConvertRem; | ||
277 | - padding-left: 0.375rem; | ||
278 | - padding-top: 20rem / $pxConvertRem; | ||
279 | - border-bottom: 1px solid #e0e0e0; | ||
280 | - } | ||
281 | - | ||
282 | - .discount-area { | ||
283 | - @extend .discount-page; | ||
284 | - | ||
285 | - .list-nav li { | ||
286 | - display: block; | ||
287 | - height: 28rem / $pxConvertRem; | ||
288 | - float: left; | ||
289 | - line-height: 28rem / $pxConvertRem; | ||
290 | - width: 24%; | ||
291 | - text-align: center; | ||
292 | - border-left: 1px solid #e1e1e1; | ||
293 | - margin-top: 30rem / $pxConvertRem; | ||
294 | - margin-bottom: 30rem / $pxConvertRem; | ||
295 | - border-sizing: border-box; | ||
296 | - | ||
297 | - span { | ||
298 | - font-size: 0.7rem; | ||
299 | - } | ||
300 | - | ||
301 | - &:first-child { | ||
302 | - border-left: none; | ||
303 | - } | ||
304 | - } | ||
305 | - | ||
306 | - .list-nav .icon .up { | ||
307 | - top: -6rem / $pxConvertRem; | ||
308 | - } | ||
309 | - | ||
310 | - .list-nav .icon .down { | ||
311 | - top: 8rem / $pxConvertRem; | ||
312 | - } | ||
313 | - | ||
314 | - .goods-container { | ||
315 | - padding-top: 30rem / $pxConvertRem; | ||
316 | - padding-bottom: 100rem / $pxConvertRem; | ||
317 | - } | ||
318 | - | ||
319 | - .active a{ | ||
320 | - color: #b1b1b1; | ||
321 | - } | ||
322 | - } | ||
323 | - | ||
324 | - .search-area { | ||
325 | - @extend .search-page; | ||
326 | - } | ||
327 | - | ||
328 | - .hide { | ||
329 | - display: none; | ||
330 | - } | ||
331 | - | ||
332 | - .nav-title { | ||
333 | - position: absolute; | ||
334 | - margin-left: 200rem / $pxConvertRem; | ||
335 | - height: 100%; | ||
336 | - font-size: 36rem / $pxConvertRem; | ||
337 | - color: #fff; | ||
338 | - font-weight: bold; | ||
339 | - top: 0; | ||
340 | - right: 0; | ||
341 | - left: 0; | ||
342 | - overflow: hidden; | ||
343 | - white-space: nowrap; | ||
344 | - text-overflow: ellipsis; | ||
345 | - text-align: center; | ||
346 | - | ||
347 | - } | ||
348 | - | ||
349 | - .shop-foot-wrapper { | ||
350 | - position: absolute; | ||
351 | - bottom: 0; | ||
352 | - display: table; | ||
353 | - width: 100%; | ||
354 | - height: 2.2rem; | ||
355 | - line-height: 2.2rem; | ||
356 | - font-size: 0.7rem; | ||
357 | - background: #fff; | ||
358 | - border-top: 1px solid #eaeaea; | ||
359 | - | ||
360 | - | ||
361 | - ul { | ||
362 | - display: table-row; | ||
363 | - } | ||
364 | - | ||
365 | - li { | ||
366 | - display: table-cell; | ||
367 | - text-align: center; | ||
368 | - | ||
369 | - .wall { | ||
370 | - width: 0; | ||
371 | - height: 0.8rem; | ||
372 | - margin-top: 0.7rem; | ||
373 | - float: right; | ||
374 | - border-right: 1px solid #eaeaea; | ||
375 | - display: inline-block; | ||
376 | - } | ||
377 | - } | ||
378 | - | ||
379 | - .sub-group { | ||
380 | - position: absolute; | ||
381 | - background: #fff; | ||
382 | - border-right: 1px solid #eaeaea; | ||
383 | - border-radius: 5px; | ||
384 | - bottom: 2.6rem; | ||
385 | - width: 30%; | ||
386 | - | ||
387 | - dl { | ||
388 | - width: 80%; | ||
389 | - margin: 0 auto; | ||
390 | - } | ||
391 | - | ||
392 | - dd { | ||
393 | - line-height: 2rem; | ||
394 | - text-align: center; | ||
395 | - border-top: 1px solid #eaeaea; | ||
396 | - } | ||
397 | - | ||
398 | - dd:first-child { | ||
399 | - border-top: 0; | ||
400 | - } | ||
401 | - } | ||
402 | - | ||
403 | - .sharp { | ||
404 | - position: absolute; | ||
405 | - width: 100%; | ||
406 | - height: 8px; | ||
407 | - background: image-url("/img/product/sharp.png") no-repeat center center; | ||
408 | - } | ||
409 | - } | ||
410 | - | ||
411 | - .bytouch{ | ||
412 | - background:#eee; | ||
413 | - } | ||
414 | - | ||
415 | -} |
1 | -.shop-introduce{ | 1 | +.shop-introduce-page{ |
2 | .banner { | 2 | .banner { |
3 | margin: 30px auto; | 3 | margin: 30px auto; |
4 | width: auto; | 4 | width: auto; |
@@ -9,18 +9,18 @@ | @@ -9,18 +9,18 @@ | ||
9 | 9 | ||
10 | .descripition { | 10 | .descripition { |
11 | margin: 40px 20px 0px 20px; | 11 | margin: 40px 20px 0px 20px; |
12 | - font-size: 16px; | ||
13 | - line-height: 22px; | ||
14 | - padding: 20px 0; | 12 | + font-size: 22px; |
13 | + line-height: 36px; | ||
14 | + padding: 40px 20px 40px 20px; | ||
15 | border-top: 1px solid #e6e6e6; | 15 | border-top: 1px solid #e6e6e6; |
16 | border-bottom: 1px solid #e6e6e6; | 16 | border-bottom: 1px solid #e6e6e6; |
17 | text-indent: 2em; | 17 | text-indent: 2em; |
18 | } | 18 | } |
19 | 19 | ||
20 | .sign-icon { | 20 | .sign-icon { |
21 | - font-size: 20px; | ||
22 | - height: 40px; | ||
23 | - line-height: 40px; | 21 | + font-size: 32px; |
22 | + height: 80px; | ||
23 | + line-height: 80px; | ||
24 | text-align: center; | 24 | text-align: center; |
25 | font-weight: 100; | 25 | font-weight: 100; |
26 | } | 26 | } |
@@ -30,14 +30,14 @@ | @@ -30,14 +30,14 @@ | ||
30 | } | 30 | } |
31 | } | 31 | } |
32 | 32 | ||
33 | -.brand{ | 33 | +.brand-shop-page{ |
34 | .brand-list{ | 34 | .brand-list{ |
35 | margin-left: 20px; | 35 | margin-left: 20px; |
36 | - font-size: 18px; | 36 | + font-size: 36px; |
37 | border-bottom: 1px solid #e6e6e6; | 37 | border-bottom: 1px solid #e6e6e6; |
38 | text-align: left; | 38 | text-align: left; |
39 | - height: 44px; | ||
40 | - line-height: 44px; | 39 | + height: 70px; |
40 | + line-height: 70px; | ||
41 | vertical-align:middle; | 41 | vertical-align:middle; |
42 | display: block; | 42 | display: block; |
43 | width: 100%; | 43 | width: 100%; |
@@ -2,40 +2,41 @@ | @@ -2,40 +2,41 @@ | ||
2 | 2 | ||
3 | <div class="product-category yoho-page"> | 3 | <div class="product-category yoho-page"> |
4 | 4 | ||
5 | - <div id="allproduct" class="allproduct"> | 5 | + <div class="allproduct"> |
6 | <a href={{allproduct}}> | 6 | <a href={{allproduct}}> |
7 | - <p class="allproductParagaraph">全部商品</p> | 7 | + 全部商品 |
8 | <i class="arrow-icon iconfont"></i> | 8 | <i class="arrow-icon iconfont"></i> |
9 | </a> | 9 | </a> |
10 | </div> | 10 | </div> |
11 | + | ||
11 | <div class="margin-under-allproduct"> | 12 | <div class="margin-under-allproduct"> |
12 | </div> | 13 | </div> |
14 | + | ||
13 | <div class="category-container clearfix"> | 15 | <div class="category-container clearfix"> |
14 | <div class="content"> | 16 | <div class="content"> |
15 | {{# content}} | 17 | {{# content}} |
16 | - <ul class="primary-level"> | ||
17 | - {{# class}} | ||
18 | - <li class="p-level-item">{{name}} | ||
19 | - <div class="primary-level-trilangle hide"></div> | ||
20 | - <!-- <img class="primary-level-trilangle trilanglefont" src="../static/img/product/arrow.jpg"> --> | ||
21 | - </li>{{/ class}} | ||
22 | - </ul> | ||
23 | - <div class="sub-level-container hide"> | ||
24 | - {{# category}} | ||
25 | - <ul class="sub-level"> | ||
26 | - {{# subcategory}} | ||
27 | - <li> | ||
28 | - <a href={{url}}> | ||
29 | - {{category_name}} | ||
30 | - </a> | ||
31 | - </li> | ||
32 | - {{/ subcategory}} | 18 | + <ul class="primary-level"> |
19 | + {{# class}} | ||
20 | + <li class="p-level-item">{{name}} | ||
21 | + <div class="primary-level-trilangle hide"></div> | ||
22 | + </li> | ||
23 | + {{/ class}} | ||
33 | </ul> | 24 | </ul> |
34 | - {{/ category}} | ||
35 | - </div> | ||
36 | - {{/ content}} | 25 | + <div class="sub-level-container hide"> |
26 | + {{# category}} | ||
27 | + <ul class="sub-level"> | ||
28 | + {{# subcategory}} | ||
29 | + <li> | ||
30 | + <a href={{url}}> | ||
31 | + {{category_name}} | ||
32 | + </a> | ||
33 | + </li> | ||
34 | + {{/ subcategory}} | ||
35 | + </ul> | ||
36 | + {{/ category}} | ||
37 | + </div> | ||
38 | + {{/ content}} | ||
39 | + </div> | ||
37 | </div> | 40 | </div> |
38 | </div> | 41 | </div> |
39 | - | ||
40 | -</div> | ||
41 | {{> layout/footer}} | 42 | {{> layout/footer}} |
@@ -30,29 +30,29 @@ | @@ -30,29 +30,29 @@ | ||
30 | <li tab="new-arrival">上新</li> | 30 | <li tab="new-arrival">上新</li> |
31 | <li tab="popularity">人气</li> | 31 | <li tab="popularity">人气</li> |
32 | <li> | 32 | <li> |
33 | - <a href="#" target="_blank">全部商品</a> | 33 | + <a href="{{allGoods}}" target="_blank">全部商品</a> |
34 | </li> | 34 | </li> |
35 | </ul> | 35 | </ul> |
36 | 36 | ||
37 | <div id="home-page" class="main"> | 37 | <div id="home-page" class="main"> |
38 | <div id="nav-main" > | 38 | <div id="nav-main" > |
39 | - {{#if brandList}} | 39 | + {{#if brandList}} |
40 | <div class="multi-brands"> | 40 | <div class="multi-brands"> |
41 | <p>品牌一览</p> | 41 | <p>品牌一览</p> |
42 | <div class="multi-browse"> | 42 | <div class="multi-browse"> |
43 | <ul class="swiper-wrapper"> | 43 | <ul class="swiper-wrapper"> |
44 | - {{#each list}} | ||
45 | - <li class="swiper-slide brand-img"> | ||
46 | - <a href="{{url}}"> | ||
47 | - <img src="{{img}}"> | ||
48 | - </a> | ||
49 | - <p>{{brandName}}</p> | ||
50 | - </li> | ||
51 | - {{/each}} | 44 | + {{#each brandList.list}} |
45 | + <li class="swiper-slide brand-img"> | ||
46 | + <a href="{{url}}"> | ||
47 | + <img src="{{img}}"> | ||
48 | + </a> | ||
49 | + <p>{{brandName}}</p> | ||
50 | + </li> | ||
51 | + {{/each}} | ||
52 | </ul> | 52 | </ul> |
53 | </div> | 53 | </div> |
54 | </div> | 54 | </div> |
55 | - {{/unless}} | 55 | + {{/if}} |
56 | 56 | ||
57 | <div class="banner-area"> | 57 | <div class="banner-area"> |
58 | {{# bannerTop}} | 58 | {{# bannerTop}} |
1 | -{{> layout/header}} | ||
2 | - | ||
3 | -<div class="product-category yoho-page"> | ||
4 | - | ||
5 | - <div id="allproduct" class="allproduct"> | ||
6 | - <a href={{allproduct}}> | ||
7 | - <p class="allproductParagaraph">全部商品</p> | ||
8 | - <i class="arrow-icon iconfont"></i> | ||
9 | - </a> | ||
10 | - </div> | ||
11 | - <div class="margin-under-allproduct"> | ||
12 | - </div> | ||
13 | - <div class="category-container clearfix"> | ||
14 | - <div class="content"> | ||
15 | - {{# content}} | ||
16 | - <ul class="primary-level"> | ||
17 | - {{# class}} | ||
18 | - <li class="p-level-item">{{name}} | ||
19 | - <div class="primary-level-trilangle trilanglefont hide"></div> | ||
20 | - </li>{{/ class}} | ||
21 | - </ul> | ||
22 | - <div class="sub-level-container hide"> | ||
23 | - {{# category}} | ||
24 | - <ul class="sub-level"> | ||
25 | - {{# subcategory}} | ||
26 | - <li> | ||
27 | - <a href={{url}}> | ||
28 | - {{category_name}} | ||
29 | - </a> | ||
30 | - </li> | ||
31 | - {{/ subcategory}} | ||
32 | - </ul> | ||
33 | - {{/ category}} | ||
34 | - </div> | ||
35 | - {{/ content}} | ||
36 | - </div> | ||
37 | -</div> | ||
38 | - | ||
39 | -</div> | ||
40 | -{{> layout/footer}} |
1 | -{{> layout/header}} | ||
2 | -<div class ='shop_introduation'> | ||
3 | - <a class="banner"> | ||
4 | - <img src="{{content.shop_logo}}"> | ||
5 | - </a> | ||
6 | - | ||
7 | - <div class="descripition"> | ||
8 | - {{content.shop_intro}} | ||
9 | - </div> | ||
10 | - | ||
11 | - <p class="fo"> | ||
12 | - <span class="iconfont"></span> | ||
13 | - 100%品牌授权正品 | ||
14 | - </p> | ||
15 | -</div> | ||
16 | -{{> layout/footer}} |
1 | <div class="shop-foot-wrapper"> | 1 | <div class="shop-foot-wrapper"> |
2 | - <ul> | 2 | + <ul{{#if brandList}} class="foot-list-3"{{/if}}> |
3 | <li> | 3 | <li> |
4 | - 商品分类 | 4 | + {{#if shopCategory.url}} |
5 | + <a href="{{shopCategory.url}}">商品分类</a> | ||
6 | + {{^}} | ||
7 | + 商品分类 | ||
8 | + <div class="sub-group hide"> | ||
9 | + <dl> | ||
10 | + {{# shopCategory.list}} | ||
11 | + <dd><a href="{{url}}">{{name}}</a></dd> | ||
12 | + {{/ shopCategory.list}} | ||
13 | + </dl> | ||
14 | + <div class="sharp"></div> | ||
15 | + </div> | ||
16 | + {{/if}} | ||
5 | <div class="wall"></div> | 17 | <div class="wall"></div> |
6 | - <div class="sub-group hide"> | ||
7 | - <dl> | ||
8 | - <dd><a href="/">套装</a></dd> | ||
9 | - <dd><a href="/">套装</a></dd> | ||
10 | - <dd><a href="/">套装</a></dd> | ||
11 | - <dd><a href="/">套装</a></dd> | ||
12 | - <dd><a href="/">套装</a></dd> | ||
13 | - <dd><a href="/">套装</a></dd> | ||
14 | - </dl> | ||
15 | - <div class="sharp"></div> | ||
16 | - </div> | ||
17 | </li> | 18 | </li> |
19 | + {{#if brandList}} | ||
18 | <li> | 20 | <li> |
19 | - 品牌一览 | 21 | + {{#if brandList.url}} |
22 | + <a href="{{shopCategory.url}}">品牌一览</a> | ||
23 | + {{^}} | ||
24 | + 品牌一览 | ||
25 | + <div class="sub-group hide"> | ||
26 | + <dl> | ||
27 | + {{# brandList.list}} | ||
28 | + <dd><a href="{{url}}">{{brandName}}</a></dd> | ||
29 | + {{/ brandList.list}} | ||
30 | + </dl> | ||
31 | + <div class="sharp"></div> | ||
32 | + </div> | ||
33 | + {{/if}} | ||
20 | <div class="wall"></div> | 34 | <div class="wall"></div> |
21 | - <div class="sub-group hide"> | ||
22 | - <dl> | ||
23 | - <dd><a href="/">套装</a></dd> | ||
24 | - <dd><a href="/">套装</a></dd> | ||
25 | - <dd><a href="/">套装</a></dd> | ||
26 | - <dd><a href="/">套装</a></dd> | ||
27 | - </dl> | ||
28 | - <div class="sharp"></div> | ||
29 | - </div> | ||
30 | </li> | 35 | </li> |
36 | + {{/if}} | ||
31 | <li> | 37 | <li> |
32 | - <a href="/">店铺简介</a> | 38 | + <a href="{{shopIntroHref}}">店铺简介</a> |
33 | </li> | 39 | </li> |
34 | </ul> | 40 | </ul> |
35 | </div> | 41 | </div> |
@@ -15,7 +15,7 @@ use Plugin\Images; | @@ -15,7 +15,7 @@ use Plugin\Images; | ||
15 | 15 | ||
16 | /** | 16 | /** |
17 | * 商品列表相关的模板数据模型 | 17 | * 商品列表相关的模板数据模型 |
18 | - * | 18 | + * |
19 | * @name ListModel | 19 | * @name ListModel |
20 | * @package models/Product | 20 | * @package models/Product |
21 | * @copyright yoho.inc | 21 | * @copyright yoho.inc |
@@ -27,7 +27,7 @@ class ListModel | @@ -27,7 +27,7 @@ class ListModel | ||
27 | 27 | ||
28 | /** | 28 | /** |
29 | * 获取品类商品列表数据 | 29 | * 获取品类商品列表数据 |
30 | - * | 30 | + * |
31 | * @param array $condition 条件 | 31 | * @param array $condition 条件 |
32 | * @return array | false | 32 | * @return array | false |
33 | * | 33 | * |
@@ -60,8 +60,7 @@ class ListModel | @@ -60,8 +60,7 @@ class ListModel | ||
60 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. | 60 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. |
61 | if (empty($result)) { | 61 | if (empty($result)) { |
62 | $result = Cache::get($key, 'slave'); | 62 | $result = Cache::get($key, 'slave'); |
63 | - } | ||
64 | - // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 | 63 | + } // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 |
65 | else { | 64 | else { |
66 | Cache::set($key, $result, 1800); // 缓存30分钟 | 65 | Cache::set($key, $result, 1800); // 缓存30分钟 |
67 | } | 66 | } |
@@ -72,7 +71,7 @@ class ListModel | @@ -72,7 +71,7 @@ class ListModel | ||
72 | 71 | ||
73 | /** | 72 | /** |
74 | * 获取品牌信息 | 73 | * 获取品牌信息 |
75 | - * | 74 | + * |
76 | * @param int $id 唯一的ID | 75 | * @param int $id 唯一的ID |
77 | * @param int $uid 用户ID | 76 | * @param int $uid 用户ID |
78 | * @param string $title 网站标题 | 77 | * @param string $title 网站标题 |
@@ -103,7 +102,7 @@ class ListModel | @@ -103,7 +102,7 @@ class ListModel | ||
103 | 102 | ||
104 | /** | 103 | /** |
105 | * 获取品牌商品列表数据 | 104 | * 获取品牌商品列表数据 |
106 | - * | 105 | + * |
107 | * @param array $condition 条件参数 | 106 | * @param array $condition 条件参数 |
108 | * @param string $title 网站标题 | 107 | * @param string $title 网站标题 |
109 | * @return array | 108 | * @return array |
@@ -143,8 +142,7 @@ class ListModel | @@ -143,8 +142,7 @@ class ListModel | ||
143 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. | 142 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. |
144 | if (empty($result)) { | 143 | if (empty($result)) { |
145 | $result = Cache::get($key, 'slave'); | 144 | $result = Cache::get($key, 'slave'); |
146 | - } | ||
147 | - // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 | 145 | + } // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 |
148 | else { | 146 | else { |
149 | Cache::set($key, $result, 1800); // 缓存30分钟 | 147 | Cache::set($key, $result, 1800); // 缓存30分钟 |
150 | } | 148 | } |
@@ -155,7 +153,7 @@ class ListModel | @@ -155,7 +153,7 @@ class ListModel | ||
155 | 153 | ||
156 | /** | 154 | /** |
157 | * 根据品牌ID获取品牌LOGO | 155 | * 根据品牌ID获取品牌LOGO |
158 | - * | 156 | + * |
159 | * @param int $id 品牌ID | 157 | * @param int $id 品牌ID |
160 | * @param string $title 品牌标题 | 158 | * @param string $title 品牌标题 |
161 | * @return array | false | 159 | * @return array | false |
@@ -189,8 +187,7 @@ class ListModel | @@ -189,8 +187,7 @@ class ListModel | ||
189 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. | 187 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. |
190 | if (empty($result)) { | 188 | if (empty($result)) { |
191 | $result = Cache::get($key, 'slave'); | 189 | $result = Cache::get($key, 'slave'); |
192 | - } | ||
193 | - // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 | 190 | + } // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 |
194 | else { | 191 | else { |
195 | Cache::set($key, $result); // 缓存1小时 | 192 | Cache::set($key, $result); // 缓存1小时 |
196 | } | 193 | } |
@@ -201,7 +198,7 @@ class ListModel | @@ -201,7 +198,7 @@ class ListModel | ||
201 | 198 | ||
202 | /** | 199 | /** |
203 | * 根据品牌ID获取品牌LOGO | 200 | * 根据品牌ID获取品牌LOGO |
204 | - * | 201 | + * |
205 | * @param int $id 品牌ID | 202 | * @param int $id 品牌ID |
206 | * @param string $title 品牌标题 | 203 | * @param string $title 品牌标题 |
207 | * @return array | false | 204 | * @return array | false |
@@ -236,8 +233,7 @@ class ListModel | @@ -236,8 +233,7 @@ class ListModel | ||
236 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. | 233 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. |
237 | if (empty($result)) { | 234 | if (empty($result)) { |
238 | $result = Cache::get($key, 'slave'); | 235 | $result = Cache::get($key, 'slave'); |
239 | - } | ||
240 | - // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 | 236 | + } // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 |
241 | else { | 237 | else { |
242 | Cache::set($key, $result); // 缓存1小时 | 238 | Cache::set($key, $result); // 缓存1小时 |
243 | } | 239 | } |
@@ -248,7 +244,7 @@ class ListModel | @@ -248,7 +244,7 @@ class ListModel | ||
248 | 244 | ||
249 | /** | 245 | /** |
250 | * 获取所有的品牌名称列表 | 246 | * 获取所有的品牌名称列表 |
251 | - * | 247 | + * |
252 | * @return array( | 248 | * @return array( |
253 | * 品牌ID => 品牌域名(domain) | 249 | * 品牌ID => 品牌域名(domain) |
254 | * ) | 250 | * ) |
@@ -287,8 +283,7 @@ class ListModel | @@ -287,8 +283,7 @@ class ListModel | ||
287 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. | 283 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. |
288 | if (empty($result)) { | 284 | if (empty($result)) { |
289 | $result = Cache::get($key, 'slave'); | 285 | $result = Cache::get($key, 'slave'); |
290 | - } | ||
291 | - // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 | 286 | + } // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 |
292 | else { | 287 | else { |
293 | Cache::set($key, $result); | 288 | Cache::set($key, $result); |
294 | } | 289 | } |
@@ -299,7 +294,7 @@ class ListModel | @@ -299,7 +294,7 @@ class ListModel | ||
299 | 294 | ||
300 | /** | 295 | /** |
301 | * 获取所有的品牌名称列表 | 296 | * 获取所有的品牌名称列表 |
302 | - * | 297 | + * |
303 | * @return array( | 298 | * @return array( |
304 | * 品牌域名(domain) => 品牌名称(name) | 299 | * 品牌域名(domain) => 品牌名称(name) |
305 | * ) | 300 | * ) |
@@ -338,8 +333,7 @@ class ListModel | @@ -338,8 +333,7 @@ class ListModel | ||
338 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. | 333 | // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据. |
339 | if (empty($result)) { | 334 | if (empty($result)) { |
340 | $result = Cache::get($key, 'slave'); | 335 | $result = Cache::get($key, 'slave'); |
341 | - } | ||
342 | - // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 | 336 | + } // 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存 |
343 | else { | 337 | else { |
344 | Cache::set($key, $result); | 338 | Cache::set($key, $result); |
345 | } | 339 | } |
@@ -354,7 +348,7 @@ class ListModel | @@ -354,7 +348,7 @@ class ListModel | ||
354 | * @return array 返回的处理好的数据 | 348 | * @return array 返回的处理好的数据 |
355 | * @author chengyao.guo | 349 | * @author chengyao.guo |
356 | */ | 350 | */ |
357 | - public static function categoryData($data , $shop_id) | 351 | + public static function categoryData($data, $shop_id) |
358 | { | 352 | { |
359 | $result = array(); | 353 | $result = array(); |
360 | $result['class'] = array(); | 354 | $result['class'] = array(); |
@@ -372,9 +366,18 @@ class ListModel | @@ -372,9 +366,18 @@ class ListModel | ||
372 | } | 366 | } |
373 | array_push($result['category'], array('subcategory' => $item['sub'])); | 367 | array_push($result['category'], array('subcategory' => $item['sub'])); |
374 | } | 368 | } |
369 | + $result['allproduct'] = Helpers::url('/search/list', array( | ||
370 | + 'shop' => $shop_id, | ||
371 | + )); | ||
375 | return $result; | 372 | return $result; |
376 | } | 373 | } |
377 | 374 | ||
375 | + public static function introData(&$data) | ||
376 | + { | ||
377 | + $data['shop_logo'] = Images::getImageUrl($data['shop_logo'], 640, 480); | ||
378 | + return $data; | ||
379 | + } | ||
380 | + | ||
378 | /** | 381 | /** |
379 | * 店铺所有品牌信息处理 | 382 | * 店铺所有品牌信息处理 |
380 | * @author chengyao.guo | 383 | * @author chengyao.guo |
@@ -382,7 +385,7 @@ class ListModel | @@ -382,7 +385,7 @@ class ListModel | ||
382 | * @param $shop_id | 385 | * @param $shop_id |
383 | * @return mixed | 386 | * @return mixed |
384 | */ | 387 | */ |
385 | - public static function brandData($data,$shop_id) | 388 | + public static function brandData($data, $shop_id) |
386 | { | 389 | { |
387 | // 处理图片链接 | 390 | // 处理图片链接 |
388 | foreach ($data as &$item) { | 391 | foreach ($data as &$item) { |
@@ -395,6 +398,7 @@ class ListModel | @@ -395,6 +398,7 @@ class ListModel | ||
395 | } | 398 | } |
396 | return $data; | 399 | return $data; |
397 | } | 400 | } |
401 | + | ||
398 | /** | 402 | /** |
399 | * 新店铺首页 | 403 | * 新店铺首页 |
400 | * @param int $shopId 店铺id | 404 | * @param int $shopId 店铺id |
@@ -430,7 +434,7 @@ class ListModel | @@ -430,7 +434,7 @@ class ListModel | ||
430 | public static function brandShop($brandId) | 434 | public static function brandShop($brandId) |
431 | { | 435 | { |
432 | $brandShop = ListData::getShopByBrandId($brandId); | 436 | $brandShop = ListData::getShopByBrandId($brandId); |
433 | - print_r($brandShop); exit; | 437 | +// print_r($brandShop); exit; |
434 | } | 438 | } |
435 | 439 | ||
436 | } | 440 | } |
@@ -432,7 +432,7 @@ class IndexController extends AbstractAction | @@ -432,7 +432,7 @@ class IndexController extends AbstractAction | ||
432 | $result = array(); | 432 | $result = array(); |
433 | $resource = ShopData::getShopIntro($requestData['shop_id']); | 433 | $resource = ShopData::getShopIntro($requestData['shop_id']); |
434 | if ($resource['code'] === 200) { | 434 | if ($resource['code'] === 200) { |
435 | - $result = $resource['data']; | 435 | + $result = ListModel::introData($resource['data']); |
436 | } | 436 | } |
437 | if(Mobile::isMobile()){ | 437 | if(Mobile::isMobile()){ |
438 | $this->setTitle('店铺简介'); | 438 | $this->setTitle('店铺简介'); |
@@ -453,13 +453,12 @@ class IndexController extends AbstractAction | @@ -453,13 +453,12 @@ class IndexController extends AbstractAction | ||
453 | { | 453 | { |
454 | $title = ''; | 454 | $title = ''; |
455 | $domain = 'vans'; | 455 | $domain = 'vans'; |
456 | - $domain = 'SIP'; | ||
457 | //TODO | 456 | //TODO |
458 | $brandLogo = ListModel::getBrandLogoByDomain($domain, $title); | 457 | $brandLogo = ListModel::getBrandLogoByDomain($domain, $title); |
459 | $brandId = $brandLogo['id']; | 458 | $brandId = $brandLogo['id']; |
460 | $shop = ListModel::brandShop($brandId); | 459 | $shop = ListModel::brandShop($brandId); |
461 | $shopId = 0; | 460 | $shopId = 0; |
462 | - $shopId = 682; | 461 | + $shopId = 672; |
463 | $uid = $this->getUid(true); | 462 | $uid = $this->getUid(true); |
464 | $data = ListModel::shopData($shopId, $uid); | 463 | $data = ListModel::shopData($shopId, $uid); |
465 | $this->setTitle($title); | 464 | $this->setTitle($title); |
@@ -497,45 +496,48 @@ class IndexController extends AbstractAction | @@ -497,45 +496,48 @@ class IndexController extends AbstractAction | ||
497 | 'branerImg' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026e96d1b403d28407650c7228bb4ca405.jpg?imageView2/2/w/640/h/200', | 496 | 'branerImg' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026e96d1b403d28407650c7228bb4ca405.jpg?imageView2/2/w/640/h/200', |
498 | 'logoImg' => '', | 497 | 'logoImg' => '', |
499 | 'storeName' => 'Vans专营店', | 498 | 'storeName' => 'Vans专营店', |
499 | + 'allGoods' => '', | ||
500 | 'goodList' => 'http://www.baidu.com', | 500 | 'goodList' => 'http://www.baidu.com', |
501 | - 'brands' => false, | ||
502 | - 'multiList' => array( | ||
503 | - array( | ||
504 | - 'url' => '', | ||
505 | - 'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403', | ||
506 | - 'brandName' => '123re34456556900' | ||
507 | - ), | ||
508 | - array( | ||
509 | - 'url' => '', | ||
510 | - 'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403', | ||
511 | - 'brandName' => '123re34456556900' | ||
512 | - ), | ||
513 | - array( | ||
514 | - 'url' => '', | ||
515 | - 'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403', | ||
516 | - 'brandName' => '123re344565' | ||
517 | - ), | ||
518 | - array( | ||
519 | - 'url' => '', | ||
520 | - 'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403', | ||
521 | - 'brandName' => '123re34456556900' | ||
522 | - ), | ||
523 | - array( | ||
524 | - 'url' => '', | ||
525 | - 'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403', | ||
526 | - 'brandName' => '123re34456556900' | ||
527 | - ), | ||
528 | - array( | ||
529 | - 'url' => '', | ||
530 | - 'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403', | ||
531 | - 'brandName' => '123re344565' | 501 | + 'brandList' => array( |
502 | + 'list' => array( | ||
503 | + array( | ||
504 | + 'url' => '', | ||
505 | + 'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403', | ||
506 | + 'brandName' => '123re34456556900' | ||
507 | + ), | ||
508 | + array( | ||
509 | + 'url' => '', | ||
510 | + 'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403', | ||
511 | + 'brandName' => '123re34456556900' | ||
512 | + ), | ||
513 | + array( | ||
514 | + 'url' => '', | ||
515 | + 'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403', | ||
516 | + 'brandName' => '123re344565' | ||
517 | + ), | ||
518 | + array( | ||
519 | + 'url' => '', | ||
520 | + 'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403', | ||
521 | + 'brandName' => '123re34456556900' | ||
522 | + ), | ||
523 | + array( | ||
524 | + 'url' => '', | ||
525 | + 'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403', | ||
526 | + 'brandName' => '123re34456556900' | ||
527 | + ), | ||
528 | + array( | ||
529 | + 'url' => '', | ||
530 | + 'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403', | ||
531 | + 'brandName' => '123re344565' | ||
532 | + ), | ||
533 | + array( | ||
534 | + 'url' => '', | ||
535 | + 'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403', | ||
536 | + 'brandName' => '123re344565' | ||
537 | + ) | ||
532 | ), | 538 | ), |
533 | - array( | ||
534 | - 'url' => '', | ||
535 | - 'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403', | ||
536 | - 'brandName' => '123re344565' | ||
537 | - ) | ||
538 | - ), | 539 | + 'url' => '' |
540 | + ), | ||
539 | 'bannerTop' => array( | 541 | 'bannerTop' => array( |
540 | 'list' => array( | 542 | 'list' => array( |
541 | array( | 543 | array( |
1 | -<?php | ||
2 | - | ||
3 | -/** | ||
4 | - * Created by PhpStorm. | ||
5 | - * User: Targaryen | ||
6 | - * Date: 2016/4/21 | ||
7 | - * Time: 11:11 | ||
8 | - */ | ||
9 | - | ||
10 | -use Action\AbstractAction; | ||
11 | -use LibModels\Wap\Shop\ShopData; | ||
12 | -use Plugin\Helpers; | ||
13 | - | ||
14 | -class IndexController extends AbstractAction | ||
15 | -{ | ||
16 | - /** | ||
17 | - * 店铺品牌首页 | ||
18 | - * | ||
19 | - * @return mixed | ||
20 | - */ | ||
21 | - public function brandAction() | ||
22 | - { | ||
23 | - $result = array(); | ||
24 | - // 假数据 | ||
25 | - $result = $this->getCategoryContent(); | ||
26 | - $result2 = IntroData::getShopIntro(356); | ||
27 | - | ||
28 | - return $this->_view->display('category', array( | ||
29 | - 'content' => $result, | ||
30 | - )); | ||
31 | - } | ||
32 | - | ||
33 | - /** | ||
34 | - * 店铺品牌品类页,需要判断单品店还是多品店 | ||
35 | - * | ||
36 | - * @return mixed | ||
37 | - */ | ||
38 | - public function categoryAction() | ||
39 | - { | ||
40 | - $requestData = filter_input_array(INPUT_GET, array( | ||
41 | - 'shop_id' => FILTER_DEFAULT, | ||
42 | - )); | ||
43 | - if (empty($requestData['shop_id'])) { | ||
44 | - $this->go(SITE_MAIN); | ||
45 | - } | ||
46 | - $result = array(); | ||
47 | - $resource = array(); | ||
48 | - $resource['category'] = ShopData::getShopCategory($requestData['shop_id'], Helpers::getChannelByCookie(), Helpers::getGenderByCookie()); | ||
49 | - $resource['brands'] = ShopData::getShopBrands($requestData['shop_id']); | ||
50 | - if ($resource['category']['code'] === 200) { | ||
51 | - $class = array(); | ||
52 | - $category = array(); | ||
53 | - foreach ($resource['category']['data'] as &$item) { | ||
54 | - array_push($class, array('name' => $item['category_name'])); | ||
55 | - foreach ($item['sub'] as &$item2) { | ||
56 | - $item2['url'] = Helpers::url(''); // tar mark 还不知道链接是啥样的 | ||
57 | - } | ||
58 | - array_push($category, array('subcategory' => $item['sub'])); | ||
59 | - } | ||
60 | - $result['class'] = $class; | ||
61 | - $result['category'] = $category; | ||
62 | - } | ||
63 | - | ||
64 | - if ($resource['brands']['code'] === 200) { | ||
65 | - $result['brands'] = $resource['brands']['data']; | ||
66 | - } | ||
67 | - // 处理图片链接 | ||
68 | - foreach ($result['brands'] as &$item) { | ||
69 | - $item['brand_ico'] = \Plugin\Images::getImageUrl($item['brand_ico'], 0, 0); | ||
70 | - } | ||
71 | -// $result = $this->getCategoryContent(); | ||
72 | - ShopData::debugOut($result,false); | ||
73 | - return $this->_view->display('category', array( | ||
74 | - 'productCategoryPage' => true, | ||
75 | - 'content' => $result, | ||
76 | - )); | ||
77 | - } | ||
78 | - | ||
79 | - /** | ||
80 | - * 店铺简介页面 | ||
81 | - * | ||
82 | - * @return mixed | ||
83 | - */ | ||
84 | - public function introAction() | ||
85 | - { | ||
86 | - $requestData = filter_input_array(INPUT_GET, array( | ||
87 | - 'shop_id' => FILTER_DEFAULT, | ||
88 | - )); | ||
89 | - if (empty($requestData['shop_id'])) { | ||
90 | - $this->go(SITE_MAIN); | ||
91 | - } | ||
92 | - $result = array(); | ||
93 | - $resource = ShopData::getShopIntro($requestData['shop_id']); | ||
94 | - if ($resource['code'] === 200) { | ||
95 | - $result = $resource['data']; | ||
96 | - } | ||
97 | - return $this->_view->display('intro', array( | ||
98 | - 'content' => $result, | ||
99 | - )); | ||
100 | - | ||
101 | - } | ||
102 | - | ||
103 | - | ||
104 | - /** | ||
105 | - * 店铺分类品类页数据模拟 | ||
106 | - * | ||
107 | - * @return array | ||
108 | - */ | ||
109 | - public function getCategoryContent() | ||
110 | - { | ||
111 | - return array(// 数据模拟 | ||
112 | - 'class' => array( | ||
113 | - array( | ||
114 | - 'name' => '上衣', | ||
115 | - ), | ||
116 | - array( | ||
117 | - 'name' => '裤装', | ||
118 | - ), | ||
119 | - array( | ||
120 | - 'name' => '鞋靴', | ||
121 | - ), | ||
122 | - array( | ||
123 | - 'name' => '包类', | ||
124 | - ) | ||
125 | - ), | ||
126 | - 'category' => array( | ||
127 | - array( | ||
128 | - 'subcategory' => array( | ||
129 | - array( | ||
130 | - 'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg', | ||
131 | - 'name' => '上衣衣1' | ||
132 | - ), | ||
133 | - array( | ||
134 | - 'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg', | ||
135 | - 'name' => '上衣衣2' | ||
136 | - ), | ||
137 | - array( | ||
138 | - 'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg', | ||
139 | - 'name' => '上衣衣3' | ||
140 | - ), | ||
141 | - | ||
142 | - ) | ||
143 | - ), | ||
144 | - array( | ||
145 | - 'subcategory' => array( | ||
146 | - array( | ||
147 | - 'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg', | ||
148 | - 'name' => '裤装1' | ||
149 | - ), | ||
150 | - array( | ||
151 | - 'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg', | ||
152 | - 'name' => '裤装2' | ||
153 | - ), | ||
154 | - array( | ||
155 | - 'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg', | ||
156 | - 'name' => '裤装3' | ||
157 | - ), | ||
158 | - ) | ||
159 | - ), | ||
160 | - array( | ||
161 | - 'subcategory' => array( | ||
162 | - array( | ||
163 | - 'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg', | ||
164 | - 'name' => '鞋靴1' | ||
165 | - ), | ||
166 | - array( | ||
167 | - 'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg', | ||
168 | - 'name' => '鞋靴2' | ||
169 | - ), | ||
170 | - array( | ||
171 | - 'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg', | ||
172 | - 'name' => '鞋靴3' | ||
173 | - ) | ||
174 | - ) | ||
175 | - ), | ||
176 | - array( | ||
177 | - 'subcategory' => array( | ||
178 | - array( | ||
179 | - 'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg', | ||
180 | - 'name' => '包类1' | ||
181 | - ), | ||
182 | - array( | ||
183 | - 'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg', | ||
184 | - 'name' => '包类2' | ||
185 | - ), | ||
186 | - array( | ||
187 | - 'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg', | ||
188 | - 'name' => '包类3' | ||
189 | - ) | ||
190 | - ) | ||
191 | - ) | ||
192 | - | ||
193 | - ) | ||
194 | - ); | ||
195 | - } | ||
196 | - | ||
197 | - /** | ||
198 | - * 店铺简介数据模拟 | ||
199 | - * | ||
200 | - * @return array | ||
201 | - */ | ||
202 | - public function getIntroContent() | ||
203 | - { | ||
204 | - return array(// 数据模拟 | ||
205 | - ); | ||
206 | - } | ||
207 | - | ||
208 | -} |
-
Please register or login to post a comment