Merge branch 'release/5.1' of git.yoho.cn:fe/yohobuywap-node into release/5.1
Showing
11 changed files
with
42 additions
and
26 deletions
@@ -15,8 +15,7 @@ const shopList = (uid, tabName) => { | @@ -15,8 +15,7 @@ const shopList = (uid, tabName) => { | ||
15 | uid: uid, | 15 | uid: uid, |
16 | tab_name: tabName | 16 | tab_name: tabName |
17 | }, { | 17 | }, { |
18 | - code: 200, | ||
19 | - cache: true | 18 | + code: 200 |
20 | }).then((result) => { | 19 | }).then((result) => { |
21 | if (result && result.code === 200) { | 20 | if (result && result.code === 200) { |
22 | _.forEach(result.data, function(data) { | 21 | _.forEach(result.data, function(data) { |
@@ -140,7 +140,7 @@ | @@ -140,7 +140,7 @@ | ||
140 | <input type="hidden" class="user-mobile" value="{{userMobile}}" /> | 140 | <input type="hidden" class="user-mobile" value="{{userMobile}}" /> |
141 | <span class="title">发票</span> | 141 | <span class="title">发票</span> |
142 | <span class="iconfont checkbox {{#if needInvoice}}icon-cb-radio{{else}}icon-radio{{/if}}"></span> | 142 | <span class="iconfont checkbox {{#if needInvoice}}icon-cb-radio{{else}}icon-radio{{/if}}"></span> |
143 | - <a id="invoice" class="invoice-info" href="invoiceInfo"> | 143 | + <a id="invoice" class="invoice-info" href="/cart/index/invoiceInfo"> |
144 | <span class="title">发票信息</span> | 144 | <span class="title">发票信息</span> |
145 | <span class="invoice-type"><i class="iconfont"></i></span> | 145 | <span class="invoice-type"><i class="iconfont"></i></span> |
146 | </a> | 146 | </a> |
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | <p class="good-tag new-festival-tag">新品节</p> | 18 | <p class="good-tag new-festival-tag">新品节</p> |
19 | {{/ is_yohood}} | 19 | {{/ is_yohood}} |
20 | {{# is_limited}} | 20 | {{# is_limited}} |
21 | - <p class="good-tag limit-tag">限量商品</p> | 21 | + <p class="good-tag limit-tag">限量</p> |
22 | {{/ is_limited}} | 22 | {{/ is_limited}} |
23 | {{/ tags}} | 23 | {{/ tags}} |
24 | </div> | 24 | </div> |
@@ -14,6 +14,7 @@ | @@ -14,6 +14,7 @@ | ||
14 | <ol> | 14 | <ol> |
15 | <li>秒杀商品限活动开始后,在详情页抢购,提前加入购物车无效</li> | 15 | <li>秒杀商品限活动开始后,在详情页抢购,提前加入购物车无效</li> |
16 | <li>秒杀数量有限,抢完即止</li> | 16 | <li>秒杀数量有限,抢完即止</li> |
17 | + <li>秒杀商品限购1件, 不能使用优惠券或优惠码</li> | ||
17 | <li>活动最终解释权归YOHO!BUY有货所有</li> | 18 | <li>活动最终解释权归YOHO!BUY有货所有</li> |
18 | </ol> | 19 | </ol> |
19 | </section> | 20 | </section> |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <a href="{{href}}"> | 3 | <a href="{{href}}"> |
4 | <div class="info-title"> | 4 | <div class="info-title"> |
5 | <div class="collect"> | 5 | <div class="collect"> |
6 | - <span class="fans">粉丝:{{collectionNum}}</span> | 6 | + <span class="fans">粉丝:<b class="fans-count">{{collectionNum}}</b></span> |
7 | <i class="iconfont collect-btn {{#if isFavorite}}already-collect{{/ if}}"></i> | 7 | <i class="iconfont collect-btn {{#if isFavorite}}already-collect{{/ if}}"></i> |
8 | </div> | 8 | </div> |
9 | 9 |
@@ -96,7 +96,8 @@ function shopListData(tabName, stoping) { | @@ -96,7 +96,8 @@ function shopListData(tabName, stoping) { | ||
96 | // 店铺收藏 | 96 | // 店铺收藏 |
97 | $('.collect-btn').on('click', function(e) { | 97 | $('.collect-btn').on('click', function(e) { |
98 | var opt, | 98 | var opt, |
99 | - $this = $(this); | 99 | + $this = $(this), |
100 | + fansCount = parseInt($this.parent().find('.fans-count').html()); | ||
100 | 101 | ||
101 | shopId = $this.parents('.shop-info').data('id'); | 102 | shopId = $this.parents('.shop-info').data('id'); |
102 | 103 | ||
@@ -131,9 +132,11 @@ function shopListData(tabName, stoping) { | @@ -131,9 +132,11 @@ function shopListData(tabName, stoping) { | ||
131 | if ($this.hasClass('already-collect')) { | 132 | if ($this.hasClass('already-collect')) { |
132 | $this.removeClass('already-collect'); | 133 | $this.removeClass('already-collect'); |
133 | tip.show('店铺取消收藏成功'); | 134 | tip.show('店铺取消收藏成功'); |
135 | + $this.parent().find('.fans-count').html(fansCount - 1); | ||
134 | } else { | 136 | } else { |
135 | $this.addClass('already-collect'); | 137 | $this.addClass('already-collect'); |
136 | tip.show('店铺收藏成功'); | 138 | tip.show('店铺收藏成功'); |
139 | + $this.parent().find('.fans-count').html(fansCount + 1); | ||
137 | } | 140 | } |
138 | } | 141 | } |
139 | 142 |
@@ -297,9 +297,17 @@ seckillObj = { | @@ -297,9 +297,17 @@ seckillObj = { | ||
297 | }, | 297 | }, |
298 | 298 | ||
299 | bindEvents: function() { | 299 | bindEvents: function() { |
300 | + var self = this; | ||
301 | + var $nav = self.el.$navList; | ||
302 | + var top = $nav.position().top + $nav.height(); | ||
303 | + | ||
300 | if (yoho.isApp) { | 304 | if (yoho.isApp) { |
301 | this.$productList.on('click', '[data-remind]', $.proxy(this.toggleRemind, this)); | 305 | this.$productList.on('click', '[data-remind]', $.proxy(this.toggleRemind, this)); |
302 | } | 306 | } |
307 | + | ||
308 | + $(document).on('scroll', function() { | ||
309 | + $nav.toggleClass('fix-top', $(window).scrollTop() > top); | ||
310 | + }); | ||
303 | }, | 311 | }, |
304 | 312 | ||
305 | /* | 313 | /* |
@@ -17,7 +17,8 @@ var nowTime = 0; | @@ -17,7 +17,8 @@ var nowTime = 0; | ||
17 | 17 | ||
18 | var startTime = 0; | 18 | var startTime = 0; |
19 | 19 | ||
20 | -var endTime = 0; | 20 | +var endTime = 0, |
21 | + diffTime = 0;// 误差时间 | ||
21 | 22 | ||
22 | var dateText = 0, | 23 | var dateText = 0, |
23 | newDate = 0, | 24 | newDate = 0, |
@@ -183,7 +184,11 @@ $( | @@ -183,7 +184,11 @@ $( | ||
183 | 184 | ||
184 | endTime = data.endTime; | 185 | endTime = data.endTime; |
185 | 186 | ||
186 | - nowTime = Date.parse(new Date()) / 1000; | 187 | + diffTime = data.currentTime; |
188 | + | ||
189 | + // nowTime = Date.parse(new Date()) / 1000; | ||
190 | + | ||
191 | + nowTime = diffTime;// 使用请求服务器时间作为当前时间 | ||
187 | 192 | ||
188 | if (startTime > nowTime) { | 193 | if (startTime > nowTime) { |
189 | offsetTime = startTime - nowTime; | 194 | offsetTime = startTime - nowTime; |
@@ -26,7 +26,6 @@ | @@ -26,7 +26,6 @@ | ||
26 | 26 | ||
27 | .active { | 27 | .active { |
28 | color: #000; | 28 | color: #000; |
29 | - font-weight: bold; | ||
30 | } | 29 | } |
31 | } | 30 | } |
32 | 31 | ||
@@ -86,7 +85,7 @@ | @@ -86,7 +85,7 @@ | ||
86 | float: left; | 85 | float: left; |
87 | margin-left: 25px; | 86 | margin-left: 25px; |
88 | font-size: 22px; | 87 | font-size: 22px; |
89 | - width: 170px; | 88 | + width: 200px; |
90 | height: 65px; | 89 | height: 65px; |
91 | } | 90 | } |
92 | 91 | ||
@@ -98,17 +97,16 @@ | @@ -98,17 +97,16 @@ | ||
98 | white-space: nowrap; | 97 | white-space: nowrap; |
99 | overflow: hidden; | 98 | overflow: hidden; |
100 | text-overflow: ellipsis; | 99 | text-overflow: ellipsis; |
100 | + width: 240px; | ||
101 | } | 101 | } |
102 | 102 | ||
103 | .shop-name { | 103 | .shop-name { |
104 | - width: 170px; | ||
105 | font-weight: bold; | 104 | font-weight: bold; |
106 | font-size: 24px; | 105 | font-size: 24px; |
107 | height: 35px; | 106 | height: 35px; |
108 | } | 107 | } |
109 | 108 | ||
110 | .giving { | 109 | .giving { |
111 | - width: 170px; | ||
112 | color: #b0b0b0; | 110 | color: #b0b0b0; |
113 | font-size: 22px; | 111 | font-size: 22px; |
114 | } | 112 | } |
@@ -137,9 +137,6 @@ | @@ -137,9 +137,6 @@ | ||
137 | } | 137 | } |
138 | 138 | ||
139 | .cost { | 139 | .cost { |
140 | - | ||
141 | - /*margin-bottom: 100px; 排除被固定底部遮挡的影响*/ | ||
142 | - | ||
143 | li { | 140 | li { |
144 | font-size: 28px; | 141 | font-size: 28px; |
145 | 142 | ||
@@ -156,11 +153,11 @@ | @@ -156,11 +153,11 @@ | ||
156 | .dollar { | 153 | .dollar { |
157 | background: #fff; | 154 | background: #fff; |
158 | padding: 0.5rem 0.75rem; | 155 | padding: 0.5rem 0.75rem; |
159 | - height:1.5rem; | ||
160 | - line-height:1.5rem; | ||
161 | - font-size:0.7rem ; | ||
162 | - | ||
163 | - .bg-dollar{ | 156 | + height: 1.5rem; |
157 | + line-height: 1.5rem; | ||
158 | + font-size: 0.7rem; | ||
159 | + | ||
160 | + .bg-dollar { | ||
164 | display: inline-block; | 161 | display: inline-block; |
165 | width: 0.6rem; | 162 | width: 0.6rem; |
166 | height: 0.6rem; | 163 | height: 0.6rem; |
@@ -262,9 +259,9 @@ | @@ -262,9 +259,9 @@ | ||
262 | } | 259 | } |
263 | 260 | ||
264 | .box-main { | 261 | .box-main { |
265 | - background: #FFFFFF; | 262 | + background: #FFF; |
266 | padding: 20px; | 263 | padding: 20px; |
267 | - height:300px; | 264 | + height: 300px; |
268 | 265 | ||
269 | .active-mask { | 266 | .active-mask { |
270 | width: 500px; | 267 | width: 500px; |
@@ -368,8 +365,4 @@ | @@ -368,8 +365,4 @@ | ||
368 | float: right; | 365 | float: right; |
369 | } | 366 | } |
370 | } | 367 | } |
371 | - | ||
372 | - .price-wrap { | ||
373 | - top: 0; | ||
374 | - } | ||
375 | } | 368 | } |
-
Please register or login to post a comment