Commit 824209d6 authored by Mac's avatar Mac

修改活动预告

parent 57835589
This diff is collapsed.
...@@ -11,7 +11,8 @@ $.fn.dataStatistics = function(options) { ...@@ -11,7 +11,8 @@ $.fn.dataStatistics = function(options) {
login: true, login: true,
activityStartDate: 0, activityStartDate: 0,
activityEndDate: 0, activityEndDate: 0,
nowDate: 0 nowDate: 0,
nextAc:false,
}, options || {}); }, options || {});
var ths = this; //解决this指向问题 var ths = this; //解决this指向问题
...@@ -63,7 +64,7 @@ $.fn.dataStatistics = function(options) { ...@@ -63,7 +64,7 @@ $.fn.dataStatistics = function(options) {
var difference = 0; //执行次数 var difference = 0; //执行次数
var nownumber = options.min; //优惠券数量 var nownumber = options.min; //优惠券数量
var Activityendtime = ''; //活动结束时间 var Activityendtime = ''; //活动结束时间
let nodisplay = false;
function run(diff) { function run(diff) {
if (diff) { if (diff) {
...@@ -84,7 +85,7 @@ $.fn.dataStatistics = function(options) { ...@@ -84,7 +85,7 @@ $.fn.dataStatistics = function(options) {
$('.img_btn p').html('活动结束') $('.img_btn p').html('活动结束')
$('.box_content_t').hide() $('.box_content_t').hide()
$('.img_btn').css("background-image", "url(../images/nobuy_btn.png)"); $('.img_btn').css("background-image", "url(../images/nobuy_btn.png)");
if (nodisplay == true) { //显示活动预告 if (options.nextAc == true) { //显示活动预告
$('.dataStatistics').css('display', "none"); $('.dataStatistics').css('display', "none");
$('.deta_replace').css('display', "flex"); $('.deta_replace').css('display', "flex");
$('#notice').css('display', "block"); $('#notice').css('display', "block");
...@@ -173,6 +174,7 @@ $.fn.dataStatistics = function(options) { ...@@ -173,6 +174,7 @@ $.fn.dataStatistics = function(options) {
count: options.count, //判断是否可以抢购 0为不可以 count: options.count, //判断是否可以抢购 0为不可以
activityStartDate: options.activityStartDate, activityStartDate: options.activityStartDate,
activityEndDate: options.activityEndDate, activityEndDate: options.activityEndDate,
nextAc: options.nextAc,
}); //刚进入页面不执行动画 }); //刚进入页面不执行动画
} else { } else {
...@@ -193,6 +195,7 @@ $.fn.dataStatistics = function(options) { ...@@ -193,6 +195,7 @@ $.fn.dataStatistics = function(options) {
count: options.count, //判断是否可以抢购 0为不可以 count: options.count, //判断是否可以抢购 0为不可以
activityStartDate: options.activityStartDate, activityStartDate: options.activityStartDate,
activityEndDate: options.activityEndDate, activityEndDate: options.activityEndDate,
nextAc: options.nextAc,
}); //刚进入页面不执行动画 }); //刚进入页面不执行动画
} }
...@@ -216,10 +219,12 @@ $.fn.dataStatistics = function(options) { ...@@ -216,10 +219,12 @@ $.fn.dataStatistics = function(options) {
$('.img_btn').css("background-image", "url(../images/nobuy_btn.png)"); $('.img_btn').css("background-image", "url(../images/nobuy_btn.png)");
$('.img_btn p').html('活动结束') $('.img_btn p').html('活动结束')
$('.box_content_t').hide() $('.box_content_t').hide()
$('.dataStatistics').css('display', "none"); if (options.nextAc == true) { //显示活动预告
$('.deta_replace').css('display', "flex"); $('.dataStatistics').css('display', "none");
$('#notice').css('display', "block"); $('.deta_replace').css('display', "flex");
$('.notice_img').css('display', "block"); $('#notice').css('display', "block");
$('.notice_img').css('display', "block");
}
clearInterval(timer2); //活动结束 清楚定时器 clearInterval(timer2); //活动结束 清楚定时器
} else { } else {
if (nownumber > 0) { if (nownumber > 0) {
...@@ -241,10 +246,12 @@ $.fn.dataStatistics = function(options) { ...@@ -241,10 +246,12 @@ $.fn.dataStatistics = function(options) {
$('.img_btn p').html('活动结束') $('.img_btn p').html('活动结束')
$('.box_content_t').hide() $('.box_content_t').hide()
$('.img_btn').css("background-image", "url(../images/nobuy_btn.png)"); $('.img_btn').css("background-image", "url(../images/nobuy_btn.png)");
$('.dataStatistics').css('display', "none"); if (options.nextAc == true) { //显示活动预告
$('.deta_replace').css('display', "flex"); $('.dataStatistics').css('display', "none");
$('#notice').css('display', "block"); $('.deta_replace').css('display', "flex");
$('.notice_img').css('display', "block"); $('#notice').css('display', "block");
$('.notice_img').css('display', "block");
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment