Commit 578eeebe authored by 华国豪's avatar 华国豪 🙄
parents 162a87ab 824209d6
This diff is collapsed.
......@@ -11,7 +11,8 @@ $.fn.dataStatistics = function(options) {
login: true,
activityStartDate: 0,
activityEndDate: 0,
nowDate: 0
nowDate: 0,
nextAc:false,
}, options || {});
var ths = this; //解决this指向问题
......@@ -63,7 +64,7 @@ $.fn.dataStatistics = function(options) {
var difference = 0; //执行次数
var nownumber = options.min; //优惠券数量
var Activityendtime = ''; //活动结束时间
let nodisplay = false;
function run(diff) {
if (diff) {
......@@ -84,7 +85,7 @@ $.fn.dataStatistics = function(options) {
$('.img_btn p').html('活动结束')
$('.box_content_t').hide()
$('.img_btn').css("background-image", "url(../images/nobuy_btn.png)");
if (nodisplay == true) { //显示活动预告
if (options.nextAc == true) { //显示活动预告
$('.dataStatistics').css('display', "none");
$('.deta_replace').css('display', "flex");
$('#notice').css('display', "block");
......@@ -173,6 +174,7 @@ $.fn.dataStatistics = function(options) {
count: options.count, //判断是否可以抢购 0为不可以
activityStartDate: options.activityStartDate,
activityEndDate: options.activityEndDate,
nextAc: options.nextAc,
}); //刚进入页面不执行动画
} else {
......@@ -193,12 +195,10 @@ $.fn.dataStatistics = function(options) {
count: options.count, //判断是否可以抢购 0为不可以
activityStartDate: options.activityStartDate,
activityEndDate: options.activityEndDate,
nextAc: options.nextAc,
}); //刚进入页面不执行动画
}
if (nownumber == 0) {
Activityendtime = res.data.expirationDate.replace('T', ' ').replace(/-/g, '/');
}
// options.count = res.data.count;
let activityStartDate = options.activityStartDate;
let activityEndDate = options.activityEndDate;
......@@ -219,10 +219,12 @@ $.fn.dataStatistics = function(options) {
$('.img_btn').css("background-image", "url(../images/nobuy_btn.png)");
$('.img_btn p').html('活动结束')
$('.box_content_t').hide()
$('.dataStatistics').css('display', "none");
$('.deta_replace').css('display', "flex");
$('#notice').css('display', "block");
$('.notice_img').css('display', "block");
if (options.nextAc == true) { //显示活动预告
$('.dataStatistics').css('display', "none");
$('.deta_replace').css('display', "flex");
$('#notice').css('display', "block");
$('.notice_img').css('display', "block");
}
clearInterval(timer2); //活动结束 清楚定时器
} else {
if (nownumber > 0) {
......@@ -244,10 +246,12 @@ $.fn.dataStatistics = function(options) {
$('.img_btn p').html('活动结束')
$('.box_content_t').hide()
$('.img_btn').css("background-image", "url(../images/nobuy_btn.png)");
$('.dataStatistics').css('display', "none");
$('.deta_replace').css('display', "flex");
$('#notice').css('display', "block");
$('.notice_img').css('display', "block");
if (options.nextAc == true) { //显示活动预告
$('.dataStatistics').css('display', "none");
$('.deta_replace').css('display', "flex");
$('#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