Authored by zhangxiaoru

merge

... ... @@ -7,7 +7,8 @@
{{#ticket}}
<div class="ticket">
<div class="left">
<span>¥</span>{{couponAmount}}
<span>¥</span>
<div>{{couponAmount}}</div>
</div>
<div class="right">
<p class="first">{{couponName}}</p>
... ...
... ... @@ -18,7 +18,7 @@
<div class="ticket-btn-c">
<div>
{{#if isOverTime}}
<a class="disable">失效</a>
<a class="disable">过期</a>
{{else if isCollar}}
<a class="disable">已领取</a>
{{else}}
... ...
... ... @@ -11,7 +11,7 @@ const isTest = process.env.NODE_ENV === 'test';
module.exports = {
app: 'h5',
appVersion: '5.1.0', // 调用api的版本
appVersion: '5.3.0', // 调用api的版本
port: 6001,
siteUrl: '//m.yohobuy.com',
assetUrl: '//localhost:5001',
... ...
'use strict';
const fs = require('fs');
let devHost = '172.16.6.134';
let devHost = '127.0.0.1';
fs.readFile('.devhost', (err, buf)=> {
if (!err) {
... ...
... ... @@ -148,4 +148,6 @@ $page.on('touchstart', '.btn', function() {
}
});
});
$('.dialog-right-btn').css('color', '#000');
});
... ...
... ... @@ -22,7 +22,7 @@ setTimeout(() => {
var Swiper = require('yoho-swiper');
// 顶部swiper
new Swiper('.banner-swiper', {
var swiper = new Swiper('.banner-swiper', {
preloadImages: false,
lazyLoading: true,
lazyLoadingInPrevNext: true,
... ... @@ -33,6 +33,10 @@ setTimeout(() => {
prevButton: '.my-swiper-button-prev',
spaceBetween: 3
});
$(".banner-swiper").click(function() {
$('.banner-top').toggleClass('hover');
swiper.onResize();
})
}, 500);
... ... @@ -281,4 +285,26 @@ setTimeout(() => {
window.rePosFooter && window.rePosFooter();
});
}, 200);
//加载详情页的返回顶部按钮并注册事件
$(document).scroll(function() {
if($(document).scrollTop() >= $(document).height() - $(window).height() - 20) {
if (!$('.float-top').hasClass('animation')) {
var top = $('.back-to-top').offset().top - $('.float-top').offset().top + ($('.back-to-top').height()-$('.float-top').height())/2;
var left = $('.back-to-top').offset().left - $('.float-top').offset().left;
$('.float-top').addClass('animation').css({
'transform': 'translate('+left+'px, '+top+'px) scale(0, 0)',
});
}
} else if ($('.product-detail').length && $(document).scrollTop() >= $('.product-detail').offset().top) {
if (!$('.float-top').hasClass('hover') || $('.float-top').hasClass('animation')) {
$('.float-top').addClass('hover').removeClass('animation').removeAttr('style');
}
} else {
if ($('.float-top').hasClass('hover')) {
$('.float-top').removeClass('hover');
}
}
})
//加载详情页的返回顶部按钮并注册事件-end
}(productSkn, productId, brandId));
... ...
... ... @@ -81,8 +81,8 @@
width: 8px;
height: 8px;
position: absolute;
left: 16px;
top: 40px;
left: 10px;
top: 24px;
background: #f00;
border-radius: 50%;
}
... ... @@ -194,8 +194,14 @@
overflow: hidden;
span {
float: left;
margin-left: 10px;
font-size: 50px;
}
div {
overflow: hidden;
}
}
.right {
... ...