Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop
Showing
18 changed files
with
49 additions
and
26 deletions
@@ -323,7 +323,7 @@ | @@ -323,7 +323,7 @@ | ||
323 | ### 编辑页 | 323 | ### 编辑页 |
324 | 324 | ||
325 | { | 325 | { |
326 | - author: { | 326 | + authorInfo: { |
327 | avatar: '', | 327 | avatar: '', |
328 | name: '', | 328 | name: '', |
329 | info: '' | 329 | info: '' |
@@ -747,7 +747,8 @@ | @@ -747,7 +747,8 @@ | ||
747 | brandHome: { | 747 | brandHome: { |
748 | id: 0, | 748 | id: 0, |
749 | banner: '' | 749 | banner: '' |
750 | - intro: '...' | 750 | + intro: '...', |
751 | + collected: true //是否已收藏 | ||
751 | }, | 752 | }, |
752 | new: [ | 753 | new: [ |
753 | { | 754 | { |
framework @ 119c247f
@@ -73,18 +73,20 @@ navHammer.on('tap', function(e) { | @@ -73,18 +73,20 @@ navHammer.on('tap', function(e) { | ||
73 | $this.addClass('focus'); | 73 | $this.addClass('focus'); |
74 | $curNav.removeClass('focus'); | 74 | $curNav.removeClass('focus'); |
75 | 75 | ||
76 | - $infos.not('.hide').addClass('hide'); | ||
77 | - | ||
78 | $content = $infos.eq(index); | 76 | $content = $infos.eq(index); |
79 | - $content.removeClass('hide'); | ||
80 | 77 | ||
81 | $curNav = $this; | 78 | $curNav = $this; |
82 | curType = $this.data('type'); | 79 | curType = $this.data('type'); |
83 | 80 | ||
84 | //当未加载数据时去请求数据 | 81 | //当未加载数据时去请求数据 |
85 | if (state[curType].page === 1) { | 82 | if (state[curType].page === 1) { |
83 | + | ||
84 | + //无数据时隐藏正在加载和没有更多字样 | ||
85 | + $loading.addClass('hide'); | ||
86 | + $noMore.addClass('hide'); | ||
87 | + | ||
86 | loadMore($content, state[curType]); | 88 | loadMore($content, state[curType]); |
87 | - } | 89 | + } else { |
88 | 90 | ||
89 | //重置当前Tab的load-more | 91 | //重置当前Tab的load-more |
90 | if (state[curType].end) { | 92 | if (state[curType].end) { |
@@ -94,6 +96,14 @@ navHammer.on('tap', function(e) { | @@ -94,6 +96,14 @@ navHammer.on('tap', function(e) { | ||
94 | $loading.removeClass('hide'); | 96 | $loading.removeClass('hide'); |
95 | $noMore.addClass('hide'); | 97 | $noMore.addClass('hide'); |
96 | } | 98 | } |
99 | + } | ||
100 | + | ||
101 | + $infos.not('.hide').addClass('hide'); | ||
102 | + $content.removeClass('hide'); | ||
103 | + | ||
104 | + if (state[curType].page === 1) { | ||
105 | + window.rePosFooter();//进入空内容时重新定位footer位置 | ||
106 | + } | ||
97 | }); | 107 | }); |
98 | 108 | ||
99 | $(document).scroll(function() { | 109 | $(document).scroll(function() { |
@@ -128,6 +128,7 @@ function loadMore($container, opt) { | @@ -128,6 +128,7 @@ function loadMore($container, opt) { | ||
128 | 128 | ||
129 | return; | 129 | return; |
130 | } | 130 | } |
131 | + | ||
131 | $container.append(data); | 132 | $container.append(data); |
132 | 133 | ||
133 | if (num > 0) { | 134 | if (num > 0) { |
@@ -140,6 +141,10 @@ function loadMore($container, opt) { | @@ -140,6 +141,10 @@ function loadMore($container, opt) { | ||
140 | 141 | ||
141 | if (opt.page === 1) { | 142 | if (opt.page === 1) { |
142 | loading.hideLoadingMask(); | 143 | loading.hideLoadingMask(); |
144 | + | ||
145 | + $loading.removeClass('hide');//显示空屏加载时hide的隐藏 | ||
146 | + | ||
147 | + window.rePosFooter();//插入内容后重新计算底部位置 | ||
143 | } | 148 | } |
144 | 149 | ||
145 | opt.page++; | 150 | opt.page++; |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | float: left; | 2 | float: left; |
3 | width: 276rem / $pxConvertRem; | 3 | width: 276rem / $pxConvertRem; |
4 | height: 486rem / $pxConvertRem; | 4 | height: 486rem / $pxConvertRem; |
5 | - margin: 0 (15rem / $pxConvertRem) (28rem / $pxConvertRem); | 5 | + margin: 0 (15rem / $pxConvertRem) (15rem / $pxConvertRem); |
6 | 6 | ||
7 | .tag-container { | 7 | .tag-container { |
8 | height: 28rem / $pxConvertRem; | 8 | height: 28rem / $pxConvertRem; |
@@ -112,11 +112,8 @@ | @@ -112,11 +112,8 @@ | ||
112 | .goods-container { | 112 | .goods-container { |
113 | position: relative; | 113 | position: relative; |
114 | min-height: 440px; | 114 | min-height: 440px; |
115 | - | ||
116 | - .container { | ||
117 | - padding-left: 10px; | ||
118 | - margin-top: 9px; | ||
119 | - } | 115 | + padding-left: 0.375rem; |
116 | + padding-top: 0.2rem; | ||
120 | } | 117 | } |
121 | 118 | ||
122 | } | 119 | } |
@@ -73,6 +73,7 @@ | @@ -73,6 +73,7 @@ | ||
73 | > img { | 73 | > img { |
74 | display: block; | 74 | display: block; |
75 | height: 100%; | 75 | height: 100%; |
76 | + width: 100%; | ||
76 | } | 77 | } |
77 | } | 78 | } |
78 | 79 | ||
@@ -100,6 +101,18 @@ | @@ -100,6 +101,18 @@ | ||
100 | .iconfont { | 101 | .iconfont { |
101 | font-size: 12px; | 102 | font-size: 12px; |
102 | } | 103 | } |
104 | + | ||
105 | + &.coled { | ||
106 | + opacity: 0.5; | ||
107 | + } | ||
108 | + | ||
109 | + .txt:after { | ||
110 | + content: '收藏' | ||
111 | + } | ||
112 | + | ||
113 | + &.coled .txt:after { | ||
114 | + content: '已收藏' | ||
115 | + } | ||
103 | } | 116 | } |
104 | 117 | ||
105 | .brand-intro-box { | 118 | .brand-intro-box { |
@@ -228,5 +241,7 @@ | @@ -228,5 +241,7 @@ | ||
228 | .goods-container { | 241 | .goods-container { |
229 | position: relative; | 242 | position: relative; |
230 | min-height: 440px; | 243 | min-height: 440px; |
244 | + padding-left: 0.375rem; | ||
245 | + padding-top: 0.2rem; | ||
231 | } | 246 | } |
232 | } | 247 | } |
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | <div class="swiper-pagination"></div> | 15 | <div class="swiper-pagination"></div> |
16 | </div> | 16 | </div> |
17 | 17 | ||
18 | - {{# author}} | 18 | + {{# authorInfo}} |
19 | <div id="author-infos" class="editor-header clearfix" data-id={{id}}> | 19 | <div id="author-infos" class="editor-header clearfix" data-id={{id}}> |
20 | <div class="avatar"> | 20 | <div class="avatar"> |
21 | <img src="{{avatar}}"> | 21 | <img src="{{avatar}}"> |
@@ -25,7 +25,7 @@ | @@ -25,7 +25,7 @@ | ||
25 | <p class="info">{{info}}</p> | 25 | <p class="info">{{info}}</p> |
26 | </div> | 26 | </div> |
27 | </div> | 27 | </div> |
28 | - {{/ author}} | 28 | + {{/ authorInfo}} |
29 | 29 | ||
30 | <ul id="guang-nav" class="guang-nav clearfix"> | 30 | <ul id="guang-nav" class="guang-nav clearfix"> |
31 | {{# navs}} | 31 | {{# navs}} |
@@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
37 | 37 | ||
38 | <div id="info-list" class="info-list-container"> | 38 | <div id="info-list" class="info-list-container"> |
39 | {{# infos}} | 39 | {{# infos}} |
40 | - <div class="info-list {{^show}}hide{{/show}}"> | 40 | + <div class="info-list{{^show}} hide{{/show}}"> |
41 | {{# info}} | 41 | {{# info}} |
42 | {{> guang/info}} | 42 | {{> guang/info}} |
43 | {{/ info}} | 43 | {{/ info}} |
@@ -29,9 +29,9 @@ | @@ -29,9 +29,9 @@ | ||
29 | <a class="btn-intro" href="javascript:void(0);"> | 29 | <a class="btn-intro" href="javascript:void(0);"> |
30 | 品牌介绍 | 30 | 品牌介绍 |
31 | </a> | 31 | </a> |
32 | - <a class="btn-col" href="javascript:void(0);"> | 32 | + <a class="btn-col{{#if collected}} coled{{/if}}" href="javascript:void(0);"> |
33 | <span class="iconfont"></span> | 33 | <span class="iconfont"></span> |
34 | - 收藏 | 34 | + <span class="txt"></span> |
35 | </a> | 35 | </a> |
36 | </div> | 36 | </div> |
37 | <div id="intro-box" class="brand-intro-box hide"> | 37 | <div id="intro-box" class="brand-intro-box hide"> |
-
Please register or login to post a comment