Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
6 changed files
with
172 additions
and
165 deletions
@@ -4,15 +4,13 @@ | @@ -4,15 +4,13 @@ | ||
4 | * @date: 2015/10/28 | 4 | * @date: 2015/10/28 |
5 | */ | 5 | */ |
6 | var $ = require('jquery'); | 6 | var $ = require('jquery'); |
7 | - | ||
8 | var $searchBox = $('.search-box'), | 7 | var $searchBox = $('.search-box'), |
9 | $indexSearch = $('.index-search'), | 8 | $indexSearch = $('.index-search'), |
10 | $indexLogo = $('.index-logo'); | 9 | $indexLogo = $('.index-logo'); |
11 | 10 | ||
12 | -$searchBox.find('input').on('focus', function () { | 11 | +$searchBox.find('input').on('focus', function() { |
13 | $indexLogo.css({ | 12 | $indexLogo.css({ |
14 | - width: 0, | ||
15 | - display: 'none' | 13 | + width: 0 |
16 | }); | 14 | }); |
17 | $searchBox.css({ | 15 | $searchBox.css({ |
18 | width: '12.8rem' | 16 | width: '12.8rem' |
@@ -21,10 +19,9 @@ $searchBox.find('input').on('focus', function () { | @@ -21,10 +19,9 @@ $searchBox.find('input').on('focus', function () { | ||
21 | width: '15.5rem' | 19 | width: '15.5rem' |
22 | }); | 20 | }); |
23 | $('.clear-text, .no-search').show(); | 21 | $('.clear-text, .no-search').show(); |
24 | -}).on('blur', function () { | 22 | +}).on('blur', function() { |
25 | $indexLogo.css({ | 23 | $indexLogo.css({ |
26 | - width: '5.4rem', | ||
27 | - display: 'block' | 24 | + width: '5.4rem' |
28 | }); | 25 | }); |
29 | $searchBox.css({ | 26 | $searchBox.css({ |
30 | width: '8.8rem' | 27 | width: '8.8rem' |
@@ -34,11 +31,10 @@ $searchBox.find('input').on('focus', function () { | @@ -34,11 +31,10 @@ $searchBox.find('input').on('focus', function () { | ||
34 | }); | 31 | }); |
35 | $('.clear-text, .no-search').hide(); | 32 | $('.clear-text, .no-search').hide(); |
36 | }); | 33 | }); |
37 | - | ||
38 | -$searchBox.find('.clear-text').click(function () { | 34 | +$searchBox.find('.clear-text').click(function() { |
39 | $searchBox.find('input').val('').trigger('focus'); | 35 | $searchBox.find('input').val('').trigger('focus'); |
40 | }); | 36 | }); |
41 | - | ||
42 | -$searchBox.find('.search-icon').click(function () { | 37 | +$searchBox.find('.search-icon').click(function() { |
43 | $indexSearch.submit(); | 38 | $indexSearch.submit(); |
44 | -}); | ||
39 | +}); | ||
40 | + |
@@ -398,6 +398,8 @@ if ($brandHeader.length > 0) { | @@ -398,6 +398,8 @@ if ($brandHeader.length > 0) { | ||
398 | success: function(data) { | 398 | success: function(data) { |
399 | if (data.code === 200) { | 399 | if (data.code === 200) { |
400 | $this.toggleClass('coled'); | 400 | $this.toggleClass('coled'); |
401 | + } else if (data.code === 400 || data.code === 412) { | ||
402 | + tip.show('未登录'); | ||
401 | } else { | 403 | } else { |
402 | tip.show(data.message); | 404 | tip.show(data.message); |
403 | } | 405 | } |
@@ -13,11 +13,18 @@ | @@ -13,11 +13,18 @@ | ||
13 | font-size: 50rem / $pxConvertRem; | 13 | font-size: 50rem / $pxConvertRem; |
14 | width: 216rem / $pxConvertRem; | 14 | width: 216rem / $pxConvertRem; |
15 | color: #343434; | 15 | color: #343434; |
16 | + overflow: hidden; | ||
17 | + transition: width 400ms; | ||
16 | } | 18 | } |
17 | 19 | ||
18 | .index-search { | 20 | .index-search { |
19 | - float: right; | 21 | + position: absolute; |
22 | + top: 0; | ||
23 | + right: 0; | ||
20 | width: 384rem / $pxConvertRem; | 24 | width: 384rem / $pxConvertRem; |
25 | + height: 112rem / $pxConvertRem; | ||
26 | + overflow: hidden; | ||
27 | + transition: width 400ms; | ||
21 | .search-box { | 28 | .search-box { |
22 | float: left; | 29 | float: left; |
23 | position: relative; | 30 | position: relative; |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div class="newarrival-page yoho-page"> | 2 | <div class="newarrival-page yoho-page"> |
3 | - {{# headerBanner}} | ||
4 | - {{> product/banner_swipe_and_single}} | ||
5 | - {{/ headerBanner}} | ||
6 | - | ||
7 | - <ul id="list-nav" class="list-nav clearfix"> | ||
8 | - <li id="today" class="today active"> | ||
9 | - <a href="javascript:void(0);"> | ||
10 | - </a> | ||
11 | - </li> | ||
12 | - <li class="week"> | ||
13 | - <a href="javascript:void(0);"> | ||
14 | - 本周上新 | ||
15 | - </a> | ||
16 | - </li> | ||
17 | - <li class="sale"> | ||
18 | - <a href="javascript:void(0);"> | ||
19 | - 销量 | ||
20 | - </a> | ||
21 | - </li> | ||
22 | - <li class="filter"> | ||
23 | - <a href="javascript:void(0);"> | ||
24 | - 筛选 | ||
25 | - </a> | ||
26 | - <span class="iconfont"></span> | ||
27 | - </li> | ||
28 | - </ul> | ||
29 | - | ||
30 | - <div id="goods-container" class="goods-container"> | ||
31 | - <div class="container clearfix"> | ||
32 | - {{# goods}} | ||
33 | - {{> good}} | ||
34 | - {{/ goods}} | ||
35 | - </div> | ||
36 | - <div class="container hide clearfix"></div> | ||
37 | - <div class="container hide clearfix"></div> | ||
38 | - {{> filter}} | 3 | + {{# headerBanner}} |
4 | + {{> product/banner_swipe_and_single}} | ||
5 | + {{/ headerBanner}} | ||
6 | + | ||
7 | + <ul id="list-nav" class="list-nav clearfix"> | ||
8 | + <li id="today" class="today active"> | ||
9 | + <a href="javascript:void(0);"> | ||
10 | + </a> | ||
11 | + </li> | ||
12 | + <li class="week"> | ||
13 | + <a href="javascript:void(0);"> | ||
14 | + 本周上新 | ||
15 | + </a> | ||
16 | + </li> | ||
17 | + <li class="sale"> | ||
18 | + <a href="javascript:void(0);"> | ||
19 | + 销量 | ||
20 | + </a> | ||
21 | + </li> | ||
22 | + <li class="filter"> | ||
23 | + <a href="javascript:void(0);"> | ||
24 | + 筛选 | ||
25 | + </a> | ||
26 | + <span class="iconfont"></span> | ||
27 | + </li> | ||
28 | + </ul> | ||
29 | + | ||
30 | + <div id="goods-container" class="goods-container"> | ||
31 | + <div class="container clearfix"> | ||
32 | + {{# goods}} | ||
33 | + {{> good}} | ||
34 | + {{/ goods}} | ||
39 | </div> | 35 | </div> |
40 | - | ||
41 | - {{#if brand}} | ||
42 | - <input id="brand" type="hidden" value={{brand}}> | ||
43 | - {{/if}} | 36 | + <div class="container hide clearfix"></div> |
37 | + <div class="container hide clearfix"></div> | ||
38 | + {{> filter}} | ||
39 | + </div> | ||
40 | + | ||
41 | + {{#if brand}} | ||
42 | + <input id="brand" type="hidden" value={{brand}}> | ||
43 | + {{/if}} | ||
44 | 44 | ||
45 | - {{#if gender}} | ||
46 | - <input id="gender" type="hidden" value={{gender}}> | ||
47 | - {{/if}} | 45 | + {{#if gender}} |
46 | + <input id="gender" type="hidden" value={{gender}}> | ||
47 | + {{/if}} | ||
48 | 48 | ||
49 | - {{#if sort}} | ||
50 | - <input id="sort" type="hidden" value={{sort}}> | ||
51 | - {{/if}} | 49 | + {{#if sort}} |
50 | + <input id="sort" type="hidden" value={{sort}}> | ||
51 | + {{/if}} | ||
52 | 52 | ||
53 | - {{#if color}} | ||
54 | - <input id="color" type="hidden" value={{color}}> | ||
55 | - {{/if}} | 53 | + {{#if color}} |
54 | + <input id="color" type="hidden" value={{color}}> | ||
55 | + {{/if}} | ||
56 | 56 | ||
57 | - {{#if size}} | ||
58 | - <input id="size" type="hidden" value={{size}}> | ||
59 | - {{/if}} | 57 | + {{#if size}} |
58 | + <input id="size" type="hidden" value={{size}}> | ||
59 | + {{/if}} | ||
60 | 60 | ||
61 | - {{#if price}} | ||
62 | - <input id="price" type="hidden" value={{price}}> | ||
63 | - {{/if}} | 61 | + {{#if price}} |
62 | + <input id="price" type="hidden" value={{price}}> | ||
63 | + {{/if}} | ||
64 | 64 | ||
65 | - {{#if p_d}} | ||
66 | - <input id="p_d" type="hidden" value={{p_d}}> | ||
67 | - {{/if}} | 65 | + {{#if p_d}} |
66 | + <input id="p_d" type="hidden" value={{p_d}}> | ||
67 | + {{/if}} | ||
68 | 68 | ||
69 | - {{#if channel}} | ||
70 | - <input id="channel" type="hidden" value={{channel}}> | ||
71 | - {{/if}} | 69 | + {{#if channel}} |
70 | + <input id="channel" type="hidden" value={{channel}}> | ||
71 | + {{/if}} | ||
72 | 72 | ||
73 | - {{#if dayLimit}} | ||
74 | - <input id="dayLimit" type="hidden" value={{dayLimit}}> | ||
75 | - {{/if}} | 73 | + {{#if dayLimit}} |
74 | + <input id="dayLimit" type="hidden" value={{dayLimit}}> | ||
75 | + {{/if}} | ||
76 | 76 | ||
77 | - {{#if limit}} | ||
78 | - <input id="limit" type="hidden" value={{limit}}> | ||
79 | - {{/if}} | 77 | + {{#if limit}} |
78 | + <input id="limit" type="hidden" value={{limit}}> | ||
79 | + {{/if}} | ||
80 | 80 | ||
81 | - {{#if page}} | ||
82 | - <input id="page" type="hidden" value={{page}}> | ||
83 | - {{/if}} | 81 | + {{#if page}} |
82 | + <input id="page" type="hidden" value={{page}}> | ||
83 | + {{/if}} | ||
84 | 84 | ||
85 | + {{> product/suspend-cart}} | ||
85 | </div> | 86 | </div> |
86 | {{> layout/footer}} | 87 | {{> layout/footer}} |
87 | {{> layout/download_app}} | 88 | {{> layout/download_app}} |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div class="discount-page yoho-page"> | 2 | <div class="discount-page yoho-page"> |
3 | - {{# headerBanner}} | ||
4 | - {{> product/banner_swipe_and_single}} | ||
5 | - {{/ headerBanner}} | ||
6 | - | ||
7 | - <ul id="list-nav" class="list-nav clearfix"> | ||
8 | - <li class="new active"> | ||
9 | - <a href="javascript:void(0);"> | ||
10 | - <span class="spanTest">最新</span> | ||
11 | - <span class="iconfont cur"></span> | ||
12 | - </a> | ||
13 | - </li> | ||
14 | - <li class="price"> | ||
15 | - <a href="javascript:void(0);"> | ||
16 | - <span class="spanTest">价格</span> | ||
17 | - <span class="icon"> | ||
18 | - <i class="iconfont up"></i> | ||
19 | - <i class="iconfont down cur"></i> | ||
20 | - </span> | ||
21 | - </a> | ||
22 | - </li> | ||
23 | - <li class="discount"> | ||
24 | - <a href="javascript:void(0);"> | ||
25 | - <span class="spanTest">折扣</span> | ||
26 | - <span class="icon"> | ||
27 | - <i class="iconfont up"></i> | ||
28 | - <i class="iconfont down cur"></i> | ||
29 | - </span> | ||
30 | - </a> | ||
31 | - </li> | ||
32 | - <li class="filter"> | ||
33 | - <a href="javascript:void(0);"> | ||
34 | - <span class="spanTest">筛选</span> | ||
35 | - <span class="iconfont"></span> | ||
36 | - </a> | ||
37 | - </li> | ||
38 | - </ul> | 3 | + {{# headerBanner}} |
4 | + {{> product/banner_swipe_and_single}} | ||
5 | + {{/ headerBanner}} | ||
39 | 6 | ||
40 | - <div id="goods-container" class="goods-container"> | ||
41 | - <div class="new-goods container clearfix"> | ||
42 | - {{# goods}} | ||
43 | - {{> good}} | ||
44 | - {{/ goods}} | ||
45 | - </div> | ||
46 | - <div class="price-goods container hide clearfix"></div> | ||
47 | - <div class="discount-goods container hide clearfix"></div> | ||
48 | - | ||
49 | - {{> filter}} | 7 | + <ul id="list-nav" class="list-nav clearfix"> |
8 | + <li class="new active"> | ||
9 | + <a href="javascript:void(0);"> | ||
10 | + <span class="spanTest">最新</span> | ||
11 | + <span class="iconfont cur"></span> | ||
12 | + </a> | ||
13 | + </li> | ||
14 | + <li class="price"> | ||
15 | + <a href="javascript:void(0);"> | ||
16 | + <span class="spanTest">价格</span> | ||
17 | + <span class="icon"> | ||
18 | + <i class="iconfont up"></i> | ||
19 | + <i class="iconfont down cur"></i> | ||
20 | + </span> | ||
21 | + </a> | ||
22 | + </li> | ||
23 | + <li class="discount"> | ||
24 | + <a href="javascript:void(0);"> | ||
25 | + <span class="spanTest">折扣</span> | ||
26 | + <span class="icon"> | ||
27 | + <i class="iconfont up"></i> | ||
28 | + <i class="iconfont down cur"></i> | ||
29 | + </span> | ||
30 | + </a> | ||
31 | + </li> | ||
32 | + <li class="filter"> | ||
33 | + <a href="javascript:void(0);"> | ||
34 | + <span class="spanTest">筛选</span> | ||
35 | + <span class="iconfont"></span> | ||
36 | + </a> | ||
37 | + </li> | ||
38 | + </ul> | ||
39 | + | ||
40 | + <div id="goods-container" class="goods-container"> | ||
41 | + <div class="new-goods container clearfix"> | ||
42 | + {{# goods}} | ||
43 | + {{> good}} | ||
44 | + {{/ goods}} | ||
50 | </div> | 45 | </div> |
51 | - | ||
52 | - {{#if brand}} | ||
53 | - <input id="brand" type="hidden" value={{brand}}> | ||
54 | - {{/if}} | 46 | + <div class="price-goods container hide clearfix"></div> |
47 | + <div class="discount-goods container hide clearfix"></div> | ||
48 | + | ||
49 | + {{> filter}} | ||
50 | + </div> | ||
51 | + | ||
52 | + {{#if brand}} | ||
53 | + <input id="brand" type="hidden" value={{brand}}> | ||
54 | + {{/if}} | ||
55 | + | ||
56 | + {{#if gender}} | ||
57 | + <input id="gender" type="hidden" value={{gender}}> | ||
58 | + {{/if}} | ||
55 | 59 | ||
56 | - {{#if gender}} | ||
57 | - <input id="gender" type="hidden" value={{gender}}> | ||
58 | - {{/if}} | 60 | + {{#if sort}} |
61 | + <input id="sort" type="hidden" value={{sort}}> | ||
62 | + {{/if}} | ||
59 | 63 | ||
60 | - {{#if sort}} | ||
61 | - <input id="sort" type="hidden" value={{sort}}> | ||
62 | - {{/if}} | 64 | + {{#if color}} |
65 | + <input id="color" type="hidden" value={{color}}> | ||
66 | + {{/if}} | ||
63 | 67 | ||
64 | - {{#if color}} | ||
65 | - <input id="color" type="hidden" value={{color}}> | ||
66 | - {{/if}} | 68 | + {{#if size}} |
69 | + <input id="size" type="hidden" value={{size}}> | ||
70 | + {{/if}} | ||
67 | 71 | ||
68 | - {{#if size}} | ||
69 | - <input id="size" type="hidden" value={{size}}> | ||
70 | - {{/if}} | 72 | + {{#if price}} |
73 | + <input id="price" type="hidden" value={{price}}> | ||
74 | + {{/if}} | ||
71 | 75 | ||
72 | - {{#if price}} | ||
73 | - <input id="price" type="hidden" value={{price}}> | ||
74 | - {{/if}} | 76 | + {{#if p_d}} |
77 | + <input id="p_d" type="hidden" value={{p_d}}> | ||
78 | + {{/if}} | ||
75 | 79 | ||
76 | - {{#if p_d}} | ||
77 | - <input id="p_d" type="hidden" value={{p_d}}> | ||
78 | - {{/if}} | 80 | + {{#if channel}} |
81 | + <input id="channel" type="hidden" value={{channel}}> | ||
82 | + {{/if}} | ||
79 | 83 | ||
80 | - {{#if channel}} | ||
81 | - <input id="channel" type="hidden" value={{channel}}> | ||
82 | - {{/if}} | 84 | + {{#if limit}} |
85 | + <input id="limit" type="hidden" value={{limit}}> | ||
86 | + {{/if}} | ||
83 | 87 | ||
84 | - {{#if limit}} | ||
85 | - <input id="limit" type="hidden" value={{limit}}> | ||
86 | - {{/if}} | 88 | + {{#if page}} |
89 | + <input id="page" type="hidden" value={{page}}> | ||
90 | + {{/if}} | ||
87 | 91 | ||
88 | - {{#if page}} | ||
89 | - <input id="page" type="hidden" value={{page}}> | ||
90 | - {{/if}} | 92 | + {{#if discount}} |
93 | + <input id="discount" type="hidden" value={{discount}}> | ||
94 | + {{/if}} | ||
91 | 95 | ||
92 | - {{#if discount}} | ||
93 | - <input id="discount" type="hidden" value={{discount}}> | ||
94 | - {{/if}} | ||
95 | - | 96 | + {{> product/suspend-cart}} |
96 | </div> | 97 | </div> |
97 | {{> layout/footer}} | 98 | {{> layout/footer}} |
98 | {{> layout/download_app}} | 99 | {{> layout/download_app}} |
-
Please register or login to post a comment