Authored by runner

样式及时间插件修改

... ... @@ -115,7 +115,7 @@ const convertActicityData = (data) => {
const getHomeActivity = (data) => {
var params = {
method: 'app.outlets.activityGet',
platform: 2,
platform: 3,
};
return api.get('', sign.apiSign(_.assign(params, data))).then(res => {
... ...
<div id="demo1">
<!--<p>1 默认,服务端输出leftTime,把客户端时间干扰降到最低。单位秒</p>-->
<div class="cd cd-lite time" data-config="{'leftTime':{{leftTime}} }">— 仅剩<span class="left-day">${d}天</span>${h}时${m}分${s}秒 —</div>
<!--<div class="cd cd-medium" data-config="{'leftTime':82390943}">剩余时间:${h}时${m}分${s}秒</div>-->
<!--默认,服务端输出leftTime,把客户端时间干扰降到最低。单位秒-->
<div class="cd cd-lite time hide" data-config="{'leftTime': {{leftTime}} }">— 仅剩<span class="left-day">${d}天</span>${h}时${m}分${s}秒 —</div>
<div class="cd cd-medium time hide" data-config="{'leftTime': {{leftTime}} }">仅剩<span class="left-day">${d}天</span>${h}时${m}分${s}秒</div>
</div>
<!--<div id="demo4">-->
<!--<p>2 notify:cd.notify(xx, fn); 当倒计时还剩xx秒时调用fn,精准度为 1s</p>-->
<!--&lt;!&ndash;notify:cd.notify(xx, fn); 当倒计时还剩xx秒时调用fn,精准度为 1s&ndash;&gt;-->
<!--<div class="cd cd-large cd-slide" data-config="{'leftTime':4}">剩余时间:<span class="clock">${h}时${m}分${s}秒</span></div>-->
<!--</div>-->
<!--<div id="demo6">-->
<!--<p>3 使用本地时间(注意:stopPoint为UNIX时间戳,故单位是毫秒) & 使用js配置,不依赖DOM上的data-config</p>-->
<!--&lt;!&ndash;使用本地时间(注意:stopPoint为UNIX时间戳,故单位是毫秒) & 使用js配置,不依赖DOM上的data-config&ndash;&gt;-->
<!--<div class="cd cd-large cd-slide" data-config="{'stopPoint':4529059200000,'effect':'slide'}">剩余时间:<span class="clock">${d}天${h}时${m}分${s}秒</span></div>-->
<!--</div>-->
... ...
... ... @@ -3,7 +3,7 @@
<a class="back-ground-white {{#if hide}} hidden {{/if}}" href="{{activityUrl}}" >
<img class="back-image" src="{{image coverUrl 640 300}}">
<div class="center-square">
<img class="logo" src="{{image logoUrl 150 100}}"></img>
<img class="logo" src="{{image logoUrl 85 55}}"></img>
<div class="title">{{title}}</div>
<div class="num">{{promotionName}} </div>
{{>product/outlet/countdown}}
... ...
... ... @@ -5,13 +5,17 @@ var $ = require('yoho-jquery'),
Countdown = require('./outlet/countdown'),
tip = require('../plugin/tip');
var el = $('.cd-lite');
var $el = $('.cd-medium');
require('../common');
new Countdown.Countdown({
el: el
});
if ($el.length > 0) {
$el.each(function(){
Countdown.Countdown({
el: $(this)
})
})
}
$('.will-end-back').on('click', function() {
tip.show('活动即将结束');
... ...
... ... @@ -5,13 +5,17 @@ var $ = require('yoho-jquery'),
Countdown = require('./outlet/countdown'),
tip = require('../plugin/tip');
var el = $('.cd-lite');
var $el = $('.cd-lite');
require('../common');
new Countdown.Countdown({
el: el
});
if ($el.length > 0) {
$el.each(function(){
Countdown.Countdown({
el: $(this)
})
})
}
$('.back-ground-white').on('click', function() {
tip.show('活动即将开始');
... ...
... ... @@ -15,9 +15,11 @@ lazyLoad($('img.lazy'));
if ($el.length > 0) {
new Countdown.Countdown({
el: $el
});
$el.each(function(){
Countdown.Countdown({
el: $(this)
})
})
}
if ($('.swiper-container .swiper-slide').length > 1) {
... ... @@ -69,15 +71,16 @@ if ($('#index_nav').length > 0) {
}).goto($('#index_nav').find('.active').index());
}
if ($('.outlet-category-nav').length > 0) {
if ($('#list-nav').length > 0) {
iscroll({
el: '.outlet-category-nav'
el: '#list-nav'
}).goto(0);
}
if ($('.back-ground-white').length > 10) {
$('.more-activity').show();
$('.back-ground-white').each(function(index, e) {
console.log(index);
if(index > 9) {
$(e).hide();
}
... ... @@ -87,7 +90,7 @@ if ($('.back-ground-white').length > 10) {
$('.more-activity').click(function() {
$('.more-activity').hide();
$('.back-ground-white').each(function(index, e) {
if (index > 9) {
if(index > 9) {
$(e).show();
}
});
... ...
... ... @@ -45,17 +45,17 @@
.center-square {
position: absolute;
top: 50px;
width: 70%;
margin-left: 15%;
height: 200px;
margin-top: -106px;
margin-left: -193px;
width: 386px;
left: 50%;
top: 50%;
height: 212px;
}
.logo {
opacity: 1;
width: 100px;
height: auto;
margin-bottom: 10px;
margin-top: 20px;
}
.num {
... ... @@ -66,8 +66,10 @@
.title {
text-align: center;
font-size: 28px;
font-size: 32px;
font-weight: bold;
height: 40px;
line-height: 40px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
... ...