Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SURPRISED
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
华国豪
SURPRISED
Commits
824209d6
Commit
824209d6
authored
Nov 15, 2019
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改活动预告
parent
57835589
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
170 additions
and
153 deletions
+170
-153
GT_activities.html
html/GT_activities.html
+152
-142
jquery.dataStatistics.js
js/jquery.dataStatistics.js
+18
-11
No files found.
html/GT_activities.html
View file @
824209d6
This diff is collapsed.
Click to expand it.
js/jquery.dataStatistics.js
View file @
824209d6
...
@@ -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"
);
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment