Authored by biao

Merge branch 'release/1.0' of http://git.yoho.cn/fe/yoho-blk into release/1.0

@@ -17,6 +17,19 @@ function showOrNot() { @@ -17,6 +17,19 @@ function showOrNot() {
17 } 17 }
18 } 18 }
19 19
  20 +function reposReturnTop() {
  21 + var $top = $returnTop.parent();
  22 +
  23 + if (!$top.hasClass('service-top')) {
  24 + $top = $returnTop;
  25 + }
  26 + if ($(window).width() < 1380) {
  27 + $top.addClass('for-min');
  28 + } else {
  29 + $top.removeClass('for-min');
  30 + }
  31 +}
  32 +
20 $returnTop.click(function() { 33 $returnTop.click(function() {
21 $('html,body').animate({ 34 $('html,body').animate({
22 scrollTop: 0 35 scrollTop: 0
@@ -36,4 +49,10 @@ if ($returnTop.hasClass('hide')) { @@ -36,4 +49,10 @@ if ($returnTop.hasClass('hide')) {
36 $('img').load(showOrNot); 49 $('img').load(showOrNot);
37 } 50 }
38 51
  52 +reposReturnTop();
  53 +
  54 +if ($returnTop.length) {
  55 + $(window).resize(reposReturnTop);
  56 +}
  57 +
39 exports.returnTopShowOrNot = showOrNot; 58 exports.returnTopShowOrNot = showOrNot;
@@ -42,8 +42,10 @@ @@ -42,8 +42,10 @@
42 color: #fff; 42 color: #fff;
43 } 43 }
44 44
45 - &.min {  
46 - margin-left: 505px; 45 + &.for-min {
  46 + right: 20px;
  47 + left: auto;
  48 + margin-left: auto;
47 } 49 }
48 } 50 }
49 } 51 }