Authored by hf

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

@@ -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 }
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 position: absolute; 2 position: absolute;
3 left: 0; 3 left: 0;
4 right: 0; 4 right: 0;
5 - top: 2px; 5 + top: 0;
6 } 6 }
7 7
8 .filter-mask { 8 .filter-mask {
@@ -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;
@@ -82,6 +82,7 @@ @@ -82,6 +82,7 @@
82 <input id="page" type="hidden" value={{page}}> 82 <input id="page" type="hidden" value={{page}}>
83 {{/if}} 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}}
@@ -93,6 +93,7 @@ @@ -93,6 +93,7 @@
93 <input id="discount" type="hidden" value={{discount}}> 93 <input id="discount" type="hidden" value={{discount}}>
94 {{/if}} 94 {{/if}}
95 95
  96 + {{> product/suspend-cart}}
96 </div> 97 </div>
97 {{> layout/footer}} 98 {{> layout/footer}}
98 {{> layout/download_app}} 99 {{> layout/download_app}}