Showing
7 changed files
with
42 additions
and
7 deletions
@@ -7,7 +7,8 @@ | @@ -7,7 +7,8 @@ | ||
7 | {{#ticket}} | 7 | {{#ticket}} |
8 | <div class="ticket"> | 8 | <div class="ticket"> |
9 | <div class="left"> | 9 | <div class="left"> |
10 | - <span>¥</span>{{couponAmount}} | 10 | + <span>¥</span> |
11 | + <div>{{couponAmount}}</div> | ||
11 | </div> | 12 | </div> |
12 | <div class="right"> | 13 | <div class="right"> |
13 | <p class="first">{{couponName}}</p> | 14 | <p class="first">{{couponName}}</p> |
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | <div class="ticket-btn-c"> | 18 | <div class="ticket-btn-c"> |
19 | <div> | 19 | <div> |
20 | {{#if isOverTime}} | 20 | {{#if isOverTime}} |
21 | - <a class="disable">已失效</a> | 21 | + <a class="disable">已过期</a> |
22 | {{else if isCollar}} | 22 | {{else if isCollar}} |
23 | <a class="disable">已领取</a> | 23 | <a class="disable">已领取</a> |
24 | {{else}} | 24 | {{else}} |
@@ -11,7 +11,7 @@ const isTest = process.env.NODE_ENV === 'test'; | @@ -11,7 +11,7 @@ const isTest = process.env.NODE_ENV === 'test'; | ||
11 | 11 | ||
12 | module.exports = { | 12 | module.exports = { |
13 | app: 'h5', | 13 | app: 'h5', |
14 | - appVersion: '5.1.0', // 调用api的版本 | 14 | + appVersion: '5.3.0', // 调用api的版本 |
15 | port: 6001, | 15 | port: 6001, |
16 | siteUrl: '//m.yohobuy.com', | 16 | siteUrl: '//m.yohobuy.com', |
17 | assetUrl: '//localhost:5001', | 17 | assetUrl: '//localhost:5001', |
@@ -22,7 +22,7 @@ setTimeout(() => { | @@ -22,7 +22,7 @@ setTimeout(() => { | ||
22 | var Swiper = require('yoho-swiper'); | 22 | var Swiper = require('yoho-swiper'); |
23 | 23 | ||
24 | // 顶部swiper | 24 | // 顶部swiper |
25 | - new Swiper('.banner-swiper', { | 25 | + var swiper = new Swiper('.banner-swiper', { |
26 | preloadImages: false, | 26 | preloadImages: false, |
27 | lazyLoading: true, | 27 | lazyLoading: true, |
28 | lazyLoadingInPrevNext: true, | 28 | lazyLoadingInPrevNext: true, |
@@ -33,6 +33,10 @@ setTimeout(() => { | @@ -33,6 +33,10 @@ setTimeout(() => { | ||
33 | prevButton: '.my-swiper-button-prev', | 33 | prevButton: '.my-swiper-button-prev', |
34 | spaceBetween: 3 | 34 | spaceBetween: 3 |
35 | }); | 35 | }); |
36 | + $(".banner-swiper").click(function() { | ||
37 | + $('.banner-top').toggleClass('hover'); | ||
38 | + swiper.onResize(); | ||
39 | + }) | ||
36 | }, 500); | 40 | }, 500); |
37 | 41 | ||
38 | 42 | ||
@@ -281,4 +285,26 @@ setTimeout(() => { | @@ -281,4 +285,26 @@ setTimeout(() => { | ||
281 | window.rePosFooter && window.rePosFooter(); | 285 | window.rePosFooter && window.rePosFooter(); |
282 | }); | 286 | }); |
283 | }, 200); | 287 | }, 200); |
288 | + //加载详情页的返回顶部按钮并注册事件 | ||
289 | + | ||
290 | + $(document).scroll(function() { | ||
291 | + if($(document).scrollTop() >= $(document).height() - $(window).height() - 20) { | ||
292 | + if (!$('.float-top').hasClass('animation')) { | ||
293 | + var top = $('.back-to-top').offset().top - $('.float-top').offset().top + ($('.back-to-top').height()-$('.float-top').height())/2; | ||
294 | + var left = $('.back-to-top').offset().left - $('.float-top').offset().left; | ||
295 | + $('.float-top').addClass('animation').css({ | ||
296 | + 'transform': 'translate('+left+'px, '+top+'px) scale(0, 0)', | ||
297 | + }); | ||
298 | + } | ||
299 | + } else if ($('.product-detail').length && $(document).scrollTop() >= $('.product-detail').offset().top) { | ||
300 | + if (!$('.float-top').hasClass('hover') || $('.float-top').hasClass('animation')) { | ||
301 | + $('.float-top').addClass('hover').removeClass('animation').removeAttr('style'); | ||
302 | + } | ||
303 | + } else { | ||
304 | + if ($('.float-top').hasClass('hover')) { | ||
305 | + $('.float-top').removeClass('hover'); | ||
306 | + } | ||
307 | + } | ||
308 | + }) | ||
309 | + //加载详情页的返回顶部按钮并注册事件-end | ||
284 | }(productSkn, productId, brandId)); | 310 | }(productSkn, productId, brandId)); |
@@ -81,8 +81,8 @@ | @@ -81,8 +81,8 @@ | ||
81 | width: 8px; | 81 | width: 8px; |
82 | height: 8px; | 82 | height: 8px; |
83 | position: absolute; | 83 | position: absolute; |
84 | - left: 16px; | ||
85 | - top: 40px; | 84 | + left: 10px; |
85 | + top: 24px; | ||
86 | background: #f00; | 86 | background: #f00; |
87 | border-radius: 50%; | 87 | border-radius: 50%; |
88 | } | 88 | } |
@@ -194,8 +194,14 @@ | @@ -194,8 +194,14 @@ | ||
194 | overflow: hidden; | 194 | overflow: hidden; |
195 | 195 | ||
196 | span { | 196 | span { |
197 | + float: left; | ||
198 | + margin-left: 10px; | ||
197 | font-size: 50px; | 199 | font-size: 50px; |
198 | } | 200 | } |
201 | + | ||
202 | + div { | ||
203 | + overflow: hidden; | ||
204 | + } | ||
199 | } | 205 | } |
200 | 206 | ||
201 | .right { | 207 | .right { |
-
Please register or login to post a comment