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
1b27b065
Commit
1b27b065
authored
Nov 15, 2019
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改标题文字大小
parent
0a237895
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
465 additions
and
409 deletions
+465
-409
GT_activities.css
css/GT_activities.css
+148
-92
GT_activities.html
html/GT_activities.html
+317
-317
No files found.
css/GT_activities.css
View file @
1b27b065
html
,
body
{
html
,
height
:
100%
;
body
{
height
:
100%
;
margin
:
0
;
margin
:
0
;
padding
:
0
;
padding
:
0
;
}
}
p
{
p
{
display
:
block
;
display
:
block
;
-webkit-margin-before
:
0
;
-webkit-margin-before
:
0
;
-webkit-margin-after
:
0
;
-webkit-margin-after
:
0
;
}
}
#box
{
#box
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
background-image
:
url(../images/bg2@3x.png)
;
background-image
:
url(../images/bg2@3x.png)
;
...
@@ -21,21 +20,24 @@ p{
...
@@ -21,21 +20,24 @@ p{
padding-top
:
0.7rem
;
padding-top
:
0.7rem
;
position
:
relative
;
position
:
relative
;
}
}
.wx_bg
{
width
:
100%
;
.wx_bg
{
height
:
100%
;
width
:
100%
;
background
:
rgba
(
00
,
00
,
00
,
0.6
);
height
:
100%
;
background
:
rgba
(
00
,
00
,
00
,
0.6
);
position
:
fixed
;
position
:
fixed
;
top
:
0
;
top
:
0
;
z-index
:
999
;
z-index
:
999
;
text-align
:
center
;
text-align
:
center
;
display
:
none
;
display
:
none
;
}
}
.wx_bg
img
{
width
:
2.5rem
;
.wx_bg
img
{
margin-top
:
50%
;
width
:
2.5rem
;
margin-top
:
50%
;
}
}
.box_title
{
.box_title
{
width
:
80%
;
width
:
80%
;
margin-left
:
10%
;
margin-left
:
10%
;
height
:
2.38rem
;
height
:
2.38rem
;
...
@@ -43,15 +45,17 @@ p{
...
@@ -43,15 +45,17 @@ p{
border-radius
:
0.08rem
;
border-radius
:
0.08rem
;
position
:
relative
;
position
:
relative
;
}
}
.box_title
.G_img
{
.box_title
.G_img
{
width
:
0.56rem
;
width
:
0.56rem
;
height
:
0.57rem
;
height
:
0.57rem
;
position
:
absolute
;
position
:
absolute
;
left
:
1.23rem
;
left
:
1.23rem
;
top
:
-0.235rem
;
top
:
-0.235rem
;
}
}
.box_title
h5
{
font-size
:
0.28rem
;
.box_title
h5
{
font-size
:
0.26rem
;
color
:
#C72220
;
color
:
#C72220
;
margin-block-start
:
0
;
margin-block-start
:
0
;
margin-block-end
:
0
;
margin-block-end
:
0
;
...
@@ -59,35 +63,38 @@ p{
...
@@ -59,35 +63,38 @@ p{
padding-top
:
0.35rem
;
padding-top
:
0.35rem
;
/*font-weight: bold;*/
/*font-weight: bold;*/
}
}
.box_title
.box_limit
{
.box_title
.box_limit
{
width
:
2.6rem
;
width
:
2.6rem
;
margin
:
0.2rem
auto
;
margin
:
0.2rem
auto
;
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.box_text
{
.box_text
{
font-size
:
0.2rem
;
font-size
:
0.2rem
;
color
:
#111111
;
color
:
#111111
;
float
:
left
;
float
:
left
;
}
}
.box_d
{
.box_d
{
width
:
0.45rem
;
width
:
0.45rem
;
height
:
0.7rem
;
height
:
0.7rem
;
background
:
#C72220
;
background
:
#C72220
;
float
:
left
;
float
:
left
;
margin
:
0
0.05rem
;
margin
:
0
0.05rem
;
border-radius
:
0.05rem
;
border-radius
:
0.05rem
;
}
}
.box_d
p
{
.box_d
p
{
font-size
:
0.54rem
;
font-size
:
0.54rem
;
color
:
white
;
color
:
white
;
text-align
:
center
;
text-align
:
center
;
line-height
:
0.7rem
;
line-height
:
0.7rem
;
}
}
.box_content
{
.box_content
{
width
:
100%
;
width
:
100%
;
height
:
5.2rem
;
height
:
5.2rem
;
background-image
:
url(../images/bg1@3x.png)
;
background-image
:
url(../images/bg1@3x.png)
;
...
@@ -97,32 +104,35 @@ p{
...
@@ -97,32 +104,35 @@ p{
left
:
0
;
left
:
0
;
top
:
1.48rem
;
top
:
1.48rem
;
}
}
.box_content
.box_content_t
{
.box_content
.box_content_t
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
margin-top
:
0.1rem
;
margin-top
:
0.1rem
;
}
}
.t_name
{
.t_name
{
font-size
:
0.16rem
;
font-size
:
0.16rem
;
color
:
white
;
color
:
white
;
}
}
.time_view
{
.time_view
{
width
:
0.37rem
;
width
:
0.37rem
;
height
:
0.31rem
;
height
:
0.31rem
;
border-radius
:
0.07rem
;
border-radius
:
0.07rem
;
background
:
#FAB001
;
background
:
#FAB001
;
}
}
.time_view
p
{
.time_view
p
{
font-size
:
0.25rem
;
font-size
:
0.25rem
;
color
:
#E03234
;
color
:
#E03234
;
text-align
:
center
;
text-align
:
center
;
line-height
:
0.31rem
;
line-height
:
0.31rem
;
}
}
.img_bg_M
{
.img_bg_M
{
width
:
100%
;
width
:
100%
;
height
:
2.14rem
;
height
:
2.14rem
;
background-image
:
url(../images/M_200.png)
;
background-image
:
url(../images/M_200.png)
;
...
@@ -131,17 +141,37 @@ p{
...
@@ -131,17 +141,37 @@ p{
position
:
relative
;
position
:
relative
;
}
}
/*.img_bg_p1{*/
/*.img_bg_p1{*/
/* font-size: 0.3rem;*/
/* font-size: 0.3rem;*/
/* color: #E03234;*/
/* color: #E03234;*/
/* padding-top: 0.2rem;*/
/* padding-top: 0.2rem;*/
/*}*/
/*}*/
/*.img_bg_p2{*/
/*.img_bg_p2{*/
/* font-size: 0.14rem;*/
/* font-size: 0.14rem;*/
/* color: #E03234;*/
/* color: #E03234;*/
/* height: 0.2rem;*/
/* height: 0.2rem;*/
/*}*/
/*}*/
.img_btn
{
.img_btn
{
width
:
1.4rem
;
width
:
1.4rem
;
height
:
0.38rem
;
height
:
0.38rem
;
/*background: #FAB001;*/
/*background: #FAB001;*/
...
@@ -155,27 +185,30 @@ p{
...
@@ -155,27 +185,30 @@ p{
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
}
}
.img_btn
p
{
.img_btn
p
{
font-size
:
0.16rem
;
font-size
:
0.16rem
;
color
:
#E03234
;
color
:
#E03234
;
}
}
.explain_box
{
.explain_box
{
background
:
#C72220
;
background
:
#C72220
;
padding
:
0.15rem
;
padding
:
0.15rem
;
}
}
.explain
{
.explain
{
width
:
100%
;
width
:
100%
;
background
:
#E03234
;
background
:
#E03234
;
overflow
:
auto
;
overflow
:
auto
;
}
}
.explain
p
{
.explain
p
{
font-size
:
0.12rem
;
font-size
:
0.12rem
;
color
:
#FFFFFF
;
color
:
#FFFFFF
;
margin
:
0.15rem
;
margin
:
0.15rem
;
line-height
:
0.2rem
;
line-height
:
0.2rem
;
}
}
.img_bg_M
.received_img
{
.img_bg_M
.received_img
{
position
:
absolute
;
position
:
absolute
;
right
:
0.14rem
;
right
:
0.14rem
;
top
:
0.67rem
;
top
:
0.67rem
;
...
@@ -183,7 +216,8 @@ p{
...
@@ -183,7 +216,8 @@ p{
height
:
0.65rem
;
height
:
0.65rem
;
display
:
none
;
display
:
none
;
}
}
.box_title_2
{
.box_title_2
{
width
:
90%
;
width
:
90%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
...
@@ -191,12 +225,13 @@ p{
...
@@ -191,12 +225,13 @@ p{
justify-content
:
center
;
justify-content
:
center
;
margin-left
:
5%
;
margin-left
:
5%
;
}
}
.box_title_2
p
{
.box_title_2
p
{
font-size
:
0.26rem
;
font-size
:
0.26rem
;
color
:
#FFFFFF
;
color
:
#FFFFFF
;
}
}
#notice
{
#notice
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
position
:
absolute
;
position
:
absolute
;
...
@@ -207,7 +242,8 @@ p{
...
@@ -207,7 +242,8 @@ p{
z-index
:
100
;
z-index
:
100
;
display
:
none
;
display
:
none
;
}
}
.notice_img
{
.notice_img
{
width
:
2.66rem
;
width
:
2.66rem
;
height
:
3.18rem
;
height
:
3.18rem
;
position
:
absolute
;
position
:
absolute
;
...
@@ -222,20 +258,22 @@ p{
...
@@ -222,20 +258,22 @@ p{
opacity
:
1
;
opacity
:
1
;
display
:
none
;
display
:
none
;
}
}
.notice_img
img
{
.notice_img
img
{
width
:
1.99rem
;
width
:
1.99rem
;
height
:
0.63rem
;
height
:
0.63rem
;
margin-left
:
0.3rem
;
margin-left
:
0.3rem
;
}
}
.notice_name
{
.notice_name
{
font-size
:
0.16rem
;
font-size
:
0.16rem
;
color
:
#FFFFFF
;
color
:
#FFFFFF
;
text-align
:
center
;
text-align
:
center
;
margin-top
:
0
;
margin-top
:
0
;
}
}
.notice_content
,
.notice_content2
{
.notice_content
,
.notice_content2
{
font-size
:
0.10rem
;
font-size
:
0.10rem
;
color
:
#FFFFFF
;
color
:
#FFFFFF
;
text-align
:
center
;
text-align
:
center
;
...
@@ -243,7 +281,8 @@ p{
...
@@ -243,7 +281,8 @@ p{
margin-left
:
3%
;
margin-left
:
3%
;
line-height
:
0.2rem
;
line-height
:
0.2rem
;
}
}
.c_close
{
.c_close
{
width
:
1.2rem
;
width
:
1.2rem
;
height
:
0.35rem
;
height
:
0.35rem
;
border-radius
:
0.06rem
;
border-radius
:
0.06rem
;
...
@@ -253,12 +292,13 @@ p{
...
@@ -253,12 +292,13 @@ p{
justify-content
:
center
;
justify-content
:
center
;
margin
:
0.4rem
auto
;
margin
:
0.4rem
auto
;
}
}
.c_close
p
{
.c_close
p
{
font-size
:
0.16rem
;
font-size
:
0.16rem
;
color
:
#9B0612
;
color
:
#9B0612
;
}
}
.use_oupon
{
.use_oupon
{
width
:
3.14rem
;
width
:
3.14rem
;
height
:
0.4rem
;
height
:
0.4rem
;
margin-top
:
0.16rem
;
margin-top
:
0.16rem
;
...
@@ -268,84 +308,93 @@ p{
...
@@ -268,84 +308,93 @@ p{
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.use_news
{
.use_news
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
align-items
:
center
;
align-items
:
center
;
}
}
.use_news
img
{
.use_news
img
{
width
:
0.4rem
;
width
:
0.4rem
;
height
:
0.4rem
;
height
:
0.4rem
;
/*border-radius: 0.2rem;*/
/*border-radius: 0.2rem;*/
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.use_news
div
{
.use_news
div
{
height
:
0.4rem
;
height
:
0.4rem
;
margin-left
:
0.1rem
;
margin-left
:
0.1rem
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
justify-content
:
space-around
;
justify-content
:
space-around
;
}
}
.use_news
div
p
:nth-child
(
1
)
{
.use_news
div
p
:nth-child
(
1
)
{
font-size
:
0.12rem
;
font-size
:
0.12rem
;
color
:
#111111
;
color
:
#111111
;
}
}
.use_news
div
p
:nth-child
(
2
)
{
.use_news
div
p
:nth-child
(
2
)
{
font-size
:
0.1rem
;
font-size
:
0.1rem
;
color
:
#888888
;
color
:
#888888
;
width
:
1.8rem
;
width
:
1.8rem
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.click_use
{
.click_use
{
width
:
0.8rem
;
width
:
0.8rem
;
height
:
0.25rem
;
height
:
0.25rem
;
border
:
solid
1px
#E03234
border
:
solid
1px
#E03234
}
}
.click_use
p
{
.click_use
p
{
font-size
:
0.11rem
;
font-size
:
0.11rem
;
color
:
#E03234
;
color
:
#E03234
;
text-align
:
center
;
text-align
:
center
;
line-height
:
0.25rem
;
line-height
:
0.25rem
;
}
}
.deta_replace
{
.deta_replace
{
width
:
2rem
;
width
:
2rem
;
height
:
0.7rem
;
height
:
0.7rem
;
display
:
none
;
display
:
none
;
flex-direction
:
row
;
flex-direction
:
row
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.replace_box
{
.replace_box
{
width
:
0.46rem
;
width
:
0.46rem
;
height
:
100%
;
height
:
100%
;
display
:
inline-block
;
display
:
inline-block
;
position
:
relative
;
position
:
relative
;
}
}
.replace_top
{
.replace_top
{
width
:
0.46rem
;
width
:
0.46rem
;
height
:
50%
;
height
:
50%
;
background
:
#C72220
;
background
:
#C72220
;
border-bottom
:
1px
solid
#FFFFFF
;
border-bottom
:
1px
solid
#FFFFFF
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
border-radius
:
10px
10px
0
0
;
border-radius
:
10px
10px
0
0
;
}
}
.replace_bottom
{
height
:
50%
;
.replace_bottom
{
height
:
50%
;
background
:
#C72220
;
background
:
#C72220
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
border-radius
:
0
0
10px
10px
;
border-radius
:
0
0
10px
10px
;
}
}
.replace_text
{
.replace_text
{
width
:
0.46rem
;
width
:
0.46rem
;
height
:
100%
;
height
:
100%
;
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
}
}
.replace_text
p
{
.replace_text
p
{
color
:
#FFFFFF
;
color
:
#FFFFFF
;
font-family
:
"Helvetica Neue"
,
Helvetica
,
sans-serif
;
font-family
:
"Helvetica Neue"
,
Helvetica
,
sans-serif
;
font-size
:
0.54rem
;
font-size
:
0.54rem
;
...
@@ -354,13 +403,13 @@ p{
...
@@ -354,13 +403,13 @@ p{
text-align
:
center
;
text-align
:
center
;
}
}
.app_share
{
.app_share
{
width
:
100%
;
width
:
100%
;
height
:
0.35rem
;
height
:
0.35rem
;
display
:
none
;
display
:
none
;
}
}
.app_sharebox
{
.app_sharebox
{
width
:
90%
;
width
:
90%
;
margin-left
:
5%
;
margin-left
:
5%
;
height
:
0.35rem
;
height
:
0.35rem
;
...
@@ -368,51 +417,58 @@ p{
...
@@ -368,51 +417,58 @@ p{
flex-direction
:
row
;
flex-direction
:
row
;
align-items
:
center
;
align-items
:
center
;
}
}
.app_sharebox
p
{
.app_sharebox
p
{
font-size
:
0.14rem
;
font-size
:
0.14rem
;
color
:
white
;
color
:
white
;
margin-right
:
0.1rem
;
margin-right
:
0.1rem
;
}
}
.app_sharebox
img
{
.app_sharebox
img
{
width
:
0.2rem
;
width
:
0.2rem
;
height
:
0.2rem
;
height
:
0.2rem
;
margin-left
:
0.15rem
;
margin-left
:
0.15rem
;
}
}
.Noticewarp
{
.Noticewarp
{
overflow
:
hidden
;
overflow
:
hidden
;
height
:
0.3rem
;
height
:
0.3rem
;
line-height
:
0.3rem
;
line-height
:
0.3rem
;
width
:
100%
;
width
:
100%
;
position
:
absolute
;
position
:
absolute
;
top
:
2.7rem
;
top
:
2.7rem
;
z-index
:
999
;
z-index
:
999
;
}
}
.Noticewarp
.scroll
{
.Noticewarp
.scroll
{
width
:
200%
;
width
:
200%
;
float
:
left
;
float
:
left
;
position
:
relative
;
position
:
relative
;
}
}
.Noticewarp
a
{
.Noticewarp
a
{
color
:
#fff
;
color
:
#fff
;
width
:
auto
;
width
:
auto
;
float
:
left
;
float
:
left
;
padding
:
0
0.2rem
0
0.05rem
;
padding
:
0
0.2rem
0
0.05rem
;
height
:
0.3rem
;
height
:
0.3rem
;
text-decoration
:
none
;
text-decoration
:
none
;
margin-right
:
0.1rem
;
margin-right
:
0.1rem
;
border-radius
:
1rem
;
border-radius
:
1rem
;
background
:
rgba
(
0
,
0
,
0
,
0.5
);
background
:
rgba
(
0
,
0
,
0
,
0.5
);
font-size
:
0.1rem
;
font-size
:
0.1rem
;
display
:
inline-block
;
display
:
inline-block
;
}
}
.scroll
a
img
{
width
:
0.25rem
;
.scroll
a
img
{
height
:
0.25rem
;
width
:
0.25rem
;
height
:
0.25rem
;
vertical-align
:
middle
;
vertical-align
:
middle
;
position
:
relative
;
position
:
relative
;
top
:
-0.02rem
;
top
:
-0.02rem
;
border-radius
:
50%
;
border-radius
:
50%
;
}
}
.Noticewarp
a
:last-child
{
margin-right
:
0
;
.Noticewarp
a
:last-child
{
margin-right
:
0
;
}
}
\ No newline at end of file
html/GT_activities.html
View file @
1b27b065
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<meta
name=
"x5-orientation"
content=
"portrait"
>
<meta
name=
"x5-orientation"
content=
"portrait"
>
</meta>
</meta>
<!-- <link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon" />-->
<!-- <link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon" />-->
<link
rel=
"stylesheet"
href=
"../css/GT_activities.css"
>
<link
rel=
"stylesheet"
href=
"../css/GT_activities.css
?r=1213213123
"
>
<link
rel=
"stylesheet"
href=
"../css/GT_activities2.css"
media=
"screen"
type=
"text/css"
/>
<link
rel=
"stylesheet"
href=
"../css/GT_activities2.css"
media=
"screen"
type=
"text/css"
/>
<div
id=
'wx_pic'
style=
'margin:0 auto;display:none;'
>
<div
id=
'wx_pic'
style=
'margin:0 auto;display:none;'
>
<img
src=
'../images/18logo.png'
/>
<img
src=
'../images/18logo.png'
/>
...
@@ -223,7 +223,7 @@
...
@@ -223,7 +223,7 @@
}
}
var
str
=
''
var
str
=
''
for
(
var
i
=
0
;
i
<
dataList
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
dataList
.
length
;
i
++
)
{
if
(
!
dataList
[
i
].
customerPhoto
)
{
if
(
!
dataList
[
i
].
customerPhoto
)
{
dataList
[
i
].
customerPhoto
=
'../images/tx_bg.png'
dataList
[
i
].
customerPhoto
=
'../images/tx_bg.png'
}
}
str
+=
`<a href="javascript:void(0);">
str
+=
`<a href="javascript:void(0);">
...
@@ -314,7 +314,7 @@
...
@@ -314,7 +314,7 @@
}
}
if
(
login
==
true
)
{
if
(
login
==
true
)
{
}
}
...
@@ -339,95 +339,130 @@
...
@@ -339,95 +339,130 @@
$
(
'.click_use p'
).
html
(
'立即登录'
);
$
(
'.click_use p'
).
html
(
'立即登录'
);
}
}
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
url
:
`
${
getApiUrl
().
urlJava
}
api/appActivity/getUserPurchaseTime`
,
url
:
`
${
getApiUrl
().
urlJava
}
api/appActivity/getUserPurchaseTime`
,
contentType
:
"application/json"
,
contentType
:
"application/json"
,
data
:
getJavaData
({}),
data
:
getJavaData
({}),
async
:
false
,
async
:
false
,
success
:
function
(
res
)
{
if
(
res
.
resultCode
===
1
)
{
getTicketList
(
res
.
data
.
couponId
);
let
num
=
res
.
data
.
repertory
;
//优惠券总共数量
// let num = 5000; //优惠券总共数量
$
(
'.box_title_2 p'
).
html
(
res
.
data
.
redemptionPrice
+
'元抢购'
);
$
(
'.box_title h5'
).
html
(
res
.
data
.
remark
);
$
(
'.explain p'
).
html
(
'活动规则'
+
'<br/>'
+
res
.
data
.
instructions
);
if
(
login
==
false
)
{
$
(
'.use_o'
).
html
(
'暂无登录'
);
}
else
{
$
(
'.use_o'
).
html
(
res
.
data
.
contact
);
}
success
:
function
(
res
)
{
$
(
'.use_t'
).
html
(
res
.
data
.
customerName
);
if
(
res
.
resultCode
===
1
)
{
getTicketList
(
res
.
data
.
couponId
);
let
num
=
res
.
data
.
repertory
;
//优惠券总共数量
let
activityStartDate
=
new
Date
(
res
.
data
.
activityStartDate
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
)).
getTime
();
//活动开始时间
// let num = 5000; //优惠券总共数量
let
activityEndDate
=
new
Date
(
res
.
data
.
activityEndDate
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
)).
getTime
();
//活动结束时间
$
(
'.box_title_2 p'
).
html
(
res
.
data
.
redemptionPrice
+
'元抢购'
);
let
nowDate
=
new
Date
(
res
.
data
.
currentTime
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
)).
getTime
();
//服务器时间
$
(
'.box_title h5'
).
html
(
res
.
data
.
remark
);
$
(
'.explain p'
).
html
(
'活动规则'
+
'<br/>'
+
res
.
data
.
instructions
);
$
(
'.dataStatistics'
).
dataStatistics
({
if
(
login
==
false
)
{
max
:
num
,
$
(
'.use_o'
).
html
(
'暂无登录'
);
min
:
num
,
}
else
{
len
:
4
,
$
(
'.use_o'
).
html
(
res
.
data
.
contact
);
add
:
true
,
}
price
:
res
.
data
.
redemptionPrice
,
couponId
:
res
.
data
.
couponId
,
$
(
'.use_t'
).
html
(
res
.
data
.
customerName
);
platform
:
platform
,
login
:
login
,
count
:
res
.
data
.
count
,
//判断是否可以抢购 0为不可以
activityStartDate
:
activityStartDate
,
activityEndDate
:
activityEndDate
,
});
//刚进入页面不执行动画
let
activityStartDate
=
new
Date
(
res
.
data
.
activityStartDate
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
)).
getTime
();
//活动开始时间
let
activityEndDate
=
new
Date
(
res
.
data
.
activityEndDate
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
)).
getTime
();
//活动结束时间
let
nowDate
=
new
Date
(
res
.
data
.
currentTime
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
)).
getTime
();
//服务器时间
$
(
'.dataStatistics'
).
dataStatistics
({
max
:
num
,
min
:
num
,
len
:
4
,
add
:
true
,
price
:
res
.
data
.
redemptionPrice
,
couponId
:
res
.
data
.
couponId
,
platform
:
platform
,
login
:
login
,
count
:
res
.
data
.
count
,
//判断是否可以抢购 0为不可以
activityStartDate
:
activityStartDate
,
activityEndDate
:
activityEndDate
,
});
//刚进入页面不执行动画
// let activityStartDate = new Date('2019/11/08 17:43:50').getTime();
// let activityEndDate = new Date('2019/11/14 11:23:00').getTime(); //活动结束时间
let
nextActivity
=
res
.
data
.
nextActivity
;
if
(
nextActivity
!=
null
)
{
let
nexttime
=
nextActivity
.
activityStartDate
;
let
year
=
nexttime
.
split
(
'T'
)[
0
].
split
(
'-'
)[
0
];
let
month
=
nexttime
.
split
(
'T'
)[
0
].
split
(
'-'
)[
1
];
let
day
=
nexttime
.
split
(
'T'
)[
0
].
split
(
'-'
)[
2
];
let
hour
=
nexttime
.
split
(
'T'
)[
1
].
split
(
':'
)[
0
];
$
(
'.notice_content'
).
html
(
'下期活动将于'
+
year
+
'年'
+
month
+
'月'
+
day
+
'日'
+
hour
+
'点开始。'
);
$
(
'.notice_content2'
).
html
(
'届时会有'
+
nextActivity
.
couponCount
+
'张价值'
+
nextActivity
.
denomination
+
'的折扣券等待您的抢 购(抢购价'
+
nextActivity
.
redemptionPrice
+
'元),请准时参加。'
);
// var time2 = setInterval(setTimer3, 1000); //计时器
let
beforeDawn
=
new
Date
(
year
+
'/'
+
month
+
'/'
+
day
+
' 00:00:00'
).
getTime
()
let
time
=
((
beforeDawn
-
nowDate
)
/
1000
).
toFixed
(
0
);
runtime
(
time
)
// let activityStartDate = new Date('2019/11/08 17:43:50').getTime();
}
// let activityEndDate = new Date('2019/11/14 11:23:00').getTime(); //活动结束时间
let
nextActivity
=
res
.
data
.
nextActivity
;
if
(
nextActivity
!=
null
)
{
let
nexttime
=
nextActivity
.
activityStartDate
;
let
year
=
nexttime
.
split
(
'T'
)[
0
].
split
(
'-'
)[
0
];
let
month
=
nexttime
.
split
(
'T'
)[
0
].
split
(
'-'
)[
1
];
let
day
=
nexttime
.
split
(
'T'
)[
0
].
split
(
'-'
)[
2
];
let
hour
=
nexttime
.
split
(
'T'
)[
1
].
split
(
':'
)[
0
];
$
(
'.notice_content'
).
html
(
'下期活动将于'
+
year
+
'年'
+
month
+
'月'
+
day
+
'日'
+
hour
+
'点开始。'
);
$
(
'.notice_content2'
).
html
(
'届时会有'
+
nextActivity
.
couponCount
+
'张价值'
+
nextActivity
.
denomination
+
'的折扣券等待您的抢 购(抢购价'
+
nextActivity
.
redemptionPrice
+
'元),请准时参加。'
);
// var time2 = setInterval(setTimer3, 1000); //计时器
let
beforeDawn
=
new
Date
(
year
+
'/'
+
month
+
'/'
+
day
+
' 00:00:00'
).
getTime
()
let
time
=
((
beforeDawn
-
nowDate
)
/
1000
).
toFixed
(
0
);
runtime
(
time
)
}
//判断当前时间是否到了抢购时间
if
(
activityStartDate
>=
nowDate
)
{
//没到抢购时间 显示抢购的具体时间
$
(
'#t1'
).
html
(
'抢购时间:'
);
$
(
'#t2'
).
html
(
''
);
let
startDate
=
res
.
data
.
activityStartDate
;
let
month
=
startDate
.
split
(
'T'
)[
0
].
split
(
'-'
)[
1
];
let
day
=
startDate
.
split
(
'T'
)[
0
].
split
(
'-'
)[
2
];
let
hour
=
startDate
.
split
(
'T'
)[
1
].
split
(
':'
)[
0
];
$
(
'#p1'
).
html
(
month
);
$
(
'#p2'
).
html
(
day
);
$
(
'#p3'
).
html
(
hour
);
$
(
'#t3'
).
html
(
'月'
);
$
(
'#t4'
).
html
(
'日'
);
$
(
'#t5'
).
html
(
'点整'
);
$
(
'.img_btn p'
).
html
(
'立即抢购'
);
$
(
'.img_btn'
).
css
(
"background-image"
,
"url(../images/nobuy_btn.png)"
);
$
(
'.img_btn p'
).
css
(
"color"
,
"#FFFFFF"
);
// $(".received_img").attr("src", "");
let
time
=
((
activityStartDate
-
nowDate
)
/
1000
).
toFixed
(
0
);
runtime
(
time
)
}
else
if
(
nowDate
>
activityEndDate
||
res
.
data
.
activityIsEnding
==
1
)
{
// 活动时间已过
// $(".received_img").attr("src", "");
$
(
'.img_bg_M'
).
css
(
"background-image"
,
"url(../images/MJ_200@3x.png)"
);
$
(
'.img_bg_p1'
).
css
(
"color"
,
"#CCCCCC"
);
$
(
'.img_bg_p2'
).
css
(
"color"
,
"#CCCCCC"
);
$
(
'.img_btn p'
).
css
(
"color"
,
"#FFFFFF"
);
$
(
'.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"
);
}
else
{
// 到了抢购的时间显示距离结束时间的倒计时
currentTime
=
res
.
data
.
currentTime
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
);
end
=
res
.
data
.
activityEndDate
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
);
if
(
num
>
0
)
{
$
(
'#t1'
).
html
(
'结束倒计时:'
)
if
(
res
.
data
.
count
!=
0
)
{
// $(".received_img").attr("src", "");
//判断当前时间是否到了抢购时间
$
(
'.img_btn p'
).
html
(
'立即抢购'
);
if
(
activityStartDate
>=
nowDate
)
{
//没到抢购时间 显示抢购的具体时间
$
(
'#t1'
).
html
(
'抢购时间:'
);
$
(
'#t2'
).
html
(
''
);
let
startDate
=
res
.
data
.
activityStartDate
;
let
month
=
startDate
.
split
(
'T'
)[
0
].
split
(
'-'
)[
1
];
let
day
=
startDate
.
split
(
'T'
)[
0
].
split
(
'-'
)[
2
];
let
hour
=
startDate
.
split
(
'T'
)[
1
].
split
(
':'
)[
0
];
$
(
'#p1'
).
html
(
month
);
$
(
'#p2'
).
html
(
day
);
$
(
'#p3'
).
html
(
hour
);
$
(
'#t3'
).
html
(
'月'
);
$
(
'#t4'
).
html
(
'日'
);
$
(
'#t5'
).
html
(
'点整'
);
$
(
'.img_btn p'
).
html
(
'立即抢购'
);
$
(
'.img_btn'
).
css
(
"background-image"
,
"url(../images/nobuy_btn.png)"
);
$
(
'.img_btn p'
).
css
(
"color"
,
"#FFFFFF"
);
}
else
{
// $(".received_img").attr("src", ""
);
$
(
'.img_btn p'
).
html
(
'去使用'
);
let
time
=
((
activityStartDate
-
nowDate
)
/
1000
).
toFixed
(
0
);
$
(
".received_img"
).
css
(
'display'
,
"block"
);
runtime
(
time
)
$
(
'.img_btn'
).
css
(
"background-image"
,
"url(../images/buy_btn.png)"
);
}
else
if
(
nowDate
>
activityEndDate
||
res
.
data
.
activityIsEnding
==
1
)
{
// 活动时间已过
}
}
else
{
// $(".received_img").attr("src", "");
// $(".received_img").attr("src", "");
$
(
'.img_bg_M'
).
css
(
"background-image"
,
"url(../images/MJ_200@3x.png)"
);
$
(
'.img_bg_M'
).
css
(
"background-image"
,
"url(../images/MJ_200@3x.png)"
);
...
@@ -437,73 +472,26 @@
...
@@ -437,73 +472,26 @@
$
(
'.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"
);
$
(
'.dataStatistics'
).
css
(
'display'
,
"none"
);
$
(
'.deta_replace'
).
css
(
'display'
,
"flex"
);
$
(
'.deta_replace'
).
css
(
'display'
,
"flex"
);
$
(
'#notice'
).
css
(
'display'
,
"block"
);
$
(
'#notice'
).
css
(
'display'
,
"block"
);
$
(
'.notice_img'
).
css
(
'display'
,
"block"
);
$
(
'.notice_img'
).
css
(
'display'
,
"block"
);
}
else
{
// 到了抢购的时间显示距离结束时间的倒计时
currentTime
=
res
.
data
.
currentTime
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
);
end
=
res
.
data
.
activityEndDate
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
);
if
(
num
>
0
)
{
$
(
'#t1'
).
html
(
'结束倒计时:'
)
if
(
res
.
data
.
count
!=
0
)
{
// $(".received_img").attr("src", "");
$
(
'.img_btn p'
).
html
(
'立即抢购'
);
}
else
{
$
(
'.img_btn p'
).
html
(
'去使用'
);
$
(
".received_img"
).
css
(
'display'
,
"block"
);
$
(
'.img_btn'
).
css
(
"background-image"
,
"url(../images/buy_btn.png)"
);
}
}
else
{
// $(".received_img").attr("src", "");
$
(
'.img_bg_M'
).
css
(
"background-image"
,
"url(../images/MJ_200@3x.png)"
);
$
(
'.img_bg_p1'
).
css
(
"color"
,
"#CCCCCC"
);
$
(
'.img_bg_p2'
).
css
(
"color"
,
"#CCCCCC"
);
$
(
'.img_btn p'
).
css
(
"color"
,
"#FFFFFF"
);
$
(
'.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"
);
}
}
}
//优惠券的有限时间
}
let
expirationDate
=
(
res
.
data
.
expirationDate
).
split
(
'T'
)[
0
].
replace
(
/-/g
,
'.'
);
let
title
=
$
(
'.img_bg_p1'
).
text
()
let
RushbuyTime
=
{
RushbuyTime
:
expirationDate
,
title
:
title
,
}
localStorage
.
RushbuyTime
=
JSON
.
stringify
(
RushbuyTime
)
$
(
'.img_bg_p2'
).
html
(
'有效期截止:'
+
expirationDate
)
}
else
{
$
(
'.dataStatistics'
).
dataStatistics
({
max
:
0
,
min
:
0
,
len
:
4
,
add
:
true
});
//刚进入页面不执行动画
//优惠券的有限时间
let
expirationDate
=
(
res
.
data
.
expirationDate
).
split
(
'T'
)[
0
].
replace
(
/-/g
,
'.'
);
let
title
=
$
(
'.img_bg_p1'
).
text
()
let
RushbuyTime
=
{
RushbuyTime
:
expirationDate
,
title
:
title
,
}
}
// clearInterval(xht
ime)
localStorage
.
RushbuyTime
=
JSON
.
stringify
(
RushbuyT
ime
)
},
$
(
'.img_bg_p2'
).
html
(
'有效期截止:'
+
expirationDate
)
error
:
function
(
res
)
{
layer
.
msg
(
res
.
message
)
}
else
{
$
(
'.dataStatistics'
).
dataStatistics
({
$
(
'.dataStatistics'
).
dataStatistics
({
max
:
0
,
max
:
0
,
min
:
0
,
min
:
0
,
...
@@ -512,7 +500,19 @@
...
@@ -512,7 +500,19 @@
});
//刚进入页面不执行动画
});
//刚进入页面不执行动画
}
}
});
// clearInterval(xhtime)
},
error
:
function
(
res
)
{
layer
.
msg
(
res
.
message
)
$
(
'.dataStatistics'
).
dataStatistics
({
max
:
0
,
min
:
0
,
len
:
4
,
add
:
true
});
//刚进入页面不执行动画
}
});
...
@@ -697,185 +697,185 @@
...
@@ -697,185 +697,185 @@
window
.
postMessage
(
JSON
.
stringify
(
data
));
window
.
postMessage
(
JSON
.
stringify
(
data
));
})
})
setInterval
(()
=>
{
setInterval
(()
=>
{
$
(
'.digit_set'
).
empty
()
$
(
'.digit_set'
).
empty
()
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
url
:
`
${
getApiUrl
().
urlJava
}
api/appActivity/getUserPurchaseTime`
,
url
:
`
${
getApiUrl
().
urlJava
}
api/appActivity/getUserPurchaseTime`
,
contentType
:
"application/json"
,
contentType
:
"application/json"
,
data
:
getJavaData
({}),
data
:
getJavaData
({}),
async
:
false
,
async
:
false
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
resultCode
===
1
)
{
if
(
res
.
resultCode
===
1
)
{
getTicketList
(
res
.
data
.
couponId
);
getTicketList
(
res
.
data
.
couponId
);
let
num
=
res
.
data
.
repertory
;
//优惠券总共数量
let
num
=
res
.
data
.
repertory
;
//优惠券总共数量
// let num = 5000; //优惠券总共数量
// let num = 5000; //优惠券总共数量
$
(
'.box_title_2 p'
).
html
(
res
.
data
.
redemptionPrice
+
'元抢购'
);
$
(
'.box_title_2 p'
).
html
(
res
.
data
.
redemptionPrice
+
'元抢购'
);
$
(
'.box_title h5'
).
html
(
res
.
data
.
remark
);
$
(
'.box_title h5'
).
html
(
res
.
data
.
remark
);
$
(
'.explain p'
).
html
(
'活动规则'
+
'<br/>'
+
res
.
data
.
instructions
);
$
(
'.explain p'
).
html
(
'活动规则'
+
'<br/>'
+
res
.
data
.
instructions
);
if
(
login
==
false
)
{
if
(
login
==
false
)
{
$
(
'.use_o'
).
html
(
'暂无登录'
);
$
(
'.use_o'
).
html
(
'暂无登录'
);
}
else
{
}
else
{
$
(
'.use_o'
).
html
(
res
.
data
.
contact
);
$
(
'.use_o'
).
html
(
res
.
data
.
contact
);
}
}
$
(
'.use_t'
).
html
(
res
.
data
.
customerName
);
$
(
'.use_t'
).
html
(
res
.
data
.
customerName
);
let
activityStartDate
=
new
Date
(
res
.
data
.
activityStartDate
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
)).
getTime
();
//活动开始时间
let
activityStartDate
=
new
Date
(
res
.
data
.
activityStartDate
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
)).
getTime
();
//活动开始时间
let
activityEndDate
=
new
Date
(
res
.
data
.
activityEndDate
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
)).
getTime
();
//活动结束时间
let
activityEndDate
=
new
Date
(
res
.
data
.
activityEndDate
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
)).
getTime
();
//活动结束时间
let
nowDate
=
new
Date
(
res
.
data
.
currentTime
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
)).
getTime
();
//服务器时间
let
nowDate
=
new
Date
(
res
.
data
.
currentTime
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
)).
getTime
();
//服务器时间
$
(
'.dataStatistics'
).
dataStatistics
({
$
(
'.dataStatistics'
).
dataStatistics
({
max
:
num
,
max
:
num
,
min
:
num
,
min
:
num
,
len
:
4
,
len
:
4
,
add
:
true
,
add
:
true
,
price
:
res
.
data
.
redemptionPrice
,
price
:
res
.
data
.
redemptionPrice
,
couponId
:
res
.
data
.
couponId
,
couponId
:
res
.
data
.
couponId
,
platform
:
platform
,
platform
:
platform
,
login
:
login
,
login
:
login
,
count
:
res
.
data
.
count
,
//判断是否可以抢购 0为不可以
count
:
res
.
data
.
count
,
//判断是否可以抢购 0为不可以
activityStartDate
:
activityStartDate
,
activityStartDate
:
activityStartDate
,
activityEndDate
:
activityEndDate
,
activityEndDate
:
activityEndDate
,
});
//刚进入页面不执行动画
});
//刚进入页面不执行动画
// let activityStartDate = new Date('2019/11/08 17:43:50').getTime();
// let activityStartDate = new Date('2019/11/08 17:43:50').getTime();
// let activityEndDate = new Date('2019/11/14 11:23:00').getTime(); //活动结束时间
// let activityEndDate = new Date('2019/11/14 11:23:00').getTime(); //活动结束时间
let
nextActivity
=
res
.
data
.
nextActivity
;
let
nextActivity
=
res
.
data
.
nextActivity
;
if
(
nextActivity
!=
null
)
{
if
(
nextActivity
!=
null
)
{
let
nexttime
=
nextActivity
.
activityStartDate
;
let
nexttime
=
nextActivity
.
activityStartDate
;
let
year
=
nexttime
.
split
(
'T'
)[
0
].
split
(
'-'
)[
0
];
let
year
=
nexttime
.
split
(
'T'
)[
0
].
split
(
'-'
)[
0
];
let
month
=
nexttime
.
split
(
'T'
)[
0
].
split
(
'-'
)[
1
];
let
month
=
nexttime
.
split
(
'T'
)[
0
].
split
(
'-'
)[
1
];
let
day
=
nexttime
.
split
(
'T'
)[
0
].
split
(
'-'
)[
2
];
let
day
=
nexttime
.
split
(
'T'
)[
0
].
split
(
'-'
)[
2
];
let
hour
=
nexttime
.
split
(
'T'
)[
1
].
split
(
':'
)[
0
];
let
hour
=
nexttime
.
split
(
'T'
)[
1
].
split
(
':'
)[
0
];
$
(
'.notice_content'
).
html
(
'下期活动将于'
+
year
+
'年'
+
month
+
'月'
+
day
+
'日'
+
hour
+
'点开始。'
);
$
(
'.notice_content'
).
html
(
'下期活动将于'
+
year
+
'年'
+
month
+
'月'
+
day
+
'日'
+
hour
+
'点开始。'
);
$
(
'.notice_content2'
).
html
(
'届时会有'
+
nextActivity
.
couponCount
+
'张价值'
+
nextActivity
.
denomination
+
'的折扣券等待您的抢 购(抢购价'
+
nextActivity
.
redemptionPrice
+
'元),请准时参加。'
);
$
(
'.notice_content2'
).
html
(
'届时会有'
+
nextActivity
.
couponCount
+
'张价值'
+
nextActivity
.
denomination
+
'的折扣券等待您的抢 购(抢购价'
+
nextActivity
.
redemptionPrice
+
'元),请准时参加。'
);
// var time2 = setInterval(setTimer3, 1000); //计时器
// var time2 = setInterval(setTimer3, 1000); //计时器
let
beforeDawn
=
new
Date
(
year
+
'/'
+
month
+
'/'
+
day
+
' 00:00:00'
).
getTime
()
let
beforeDawn
=
new
Date
(
year
+
'/'
+
month
+
'/'
+
day
+
' 00:00:00'
).
getTime
()
let
time
=
((
beforeDawn
-
nowDate
)
/
1000
).
toFixed
(
0
);
let
time
=
((
beforeDawn
-
nowDate
)
/
1000
).
toFixed
(
0
);
runtime
(
time
)
runtime
(
time
)
}
}
//判断当前时间是否到了抢购时间
//判断当前时间是否到了抢购时间
if
(
activityStartDate
>=
nowDate
)
{
//没到抢购时间 显示抢购的具体时间
if
(
activityStartDate
>=
nowDate
)
{
//没到抢购时间 显示抢购的具体时间
$
(
'#t1'
).
html
(
'抢购时间:'
);
$
(
'#t1'
).
html
(
'抢购时间:'
);
$
(
'#t2'
).
html
(
''
);
$
(
'#t2'
).
html
(
''
);
let
startDate
=
res
.
data
.
activityStartDate
;
let
startDate
=
res
.
data
.
activityStartDate
;
let
month
=
startDate
.
split
(
'T'
)[
0
].
split
(
'-'
)[
1
];
let
month
=
startDate
.
split
(
'T'
)[
0
].
split
(
'-'
)[
1
];
let
day
=
startDate
.
split
(
'T'
)[
0
].
split
(
'-'
)[
2
];
let
day
=
startDate
.
split
(
'T'
)[
0
].
split
(
'-'
)[
2
];
let
hour
=
startDate
.
split
(
'T'
)[
1
].
split
(
':'
)[
0
];
let
hour
=
startDate
.
split
(
'T'
)[
1
].
split
(
':'
)[
0
];
$
(
'#p1'
).
html
(
month
);
$
(
'#p1'
).
html
(
month
);
$
(
'#p2'
).
html
(
day
);
$
(
'#p2'
).
html
(
day
);
$
(
'#p3'
).
html
(
hour
);
$
(
'#p3'
).
html
(
hour
);
$
(
'#t3'
).
html
(
'月'
);
$
(
'#t3'
).
html
(
'月'
);
$
(
'#t4'
).
html
(
'日'
);
$
(
'#t4'
).
html
(
'日'
);
$
(
'#t5'
).
html
(
'点整'
);
$
(
'#t5'
).
html
(
'点整'
);
$
(
'.img_btn p'
).
html
(
'立即抢购'
);
$
(
'.img_btn p'
).
html
(
'立即抢购'
);
$
(
'.img_btn'
).
css
(
"background-image"
,
"url(../images/nobuy_btn.png)"
);
$
(
'.img_btn'
).
css
(
"background-image"
,
"url(../images/nobuy_btn.png)"
);
$
(
'.img_btn p'
).
css
(
"color"
,
"#FFFFFF"
);
$
(
'.img_btn p'
).
css
(
"color"
,
"#FFFFFF"
);
// $(".received_img").attr("src", "");
// $(".received_img").attr("src", "");
let
time
=
((
activityStartDate
-
nowDate
)
/
1000
).
toFixed
(
0
);
let
time
=
((
activityStartDate
-
nowDate
)
/
1000
).
toFixed
(
0
);
runtime
(
time
)
runtime
(
time
)
}
else
if
(
nowDate
>
activityEndDate
||
res
.
data
.
activityIsEnding
==
1
)
{
// 活动时间已过
}
else
if
(
nowDate
>
activityEndDate
||
res
.
data
.
activityIsEnding
==
1
)
{
// 活动时间已过
// $(".received_img").attr("src", "");
// $(".received_img").attr("src", "");
$
(
'.img_bg_M'
).
css
(
"background-image"
,
"url(../images/MJ_200@3x.png)"
);
$
(
'.img_bg_M'
).
css
(
"background-image"
,
"url(../images/MJ_200@3x.png)"
);
$
(
'.img_bg_p1'
).
css
(
"color"
,
"#CCCCCC"
);
$
(
'.img_bg_p1'
).
css
(
"color"
,
"#CCCCCC"
);
$
(
'.img_bg_p2'
).
css
(
"color"
,
"#CCCCCC"
);
$
(
'.img_bg_p2'
).
css
(
"color"
,
"#CCCCCC"
);
$
(
'.img_btn p'
).
css
(
"color"
,
"#FFFFFF"
);
$
(
'.img_btn p'
).
css
(
"color"
,
"#FFFFFF"
);
$
(
'.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"
);
$
(
'.dataStatistics'
).
css
(
'display'
,
"none"
);
$
(
'.deta_replace'
).
css
(
'display'
,
"flex"
);
$
(
'.deta_replace'
).
css
(
'display'
,
"flex"
);
$
(
'#notice'
).
css
(
'display'
,
"block"
);
$
(
'#notice'
).
css
(
'display'
,
"block"
);
$
(
'.notice_img'
).
css
(
'display'
,
"block"
);
$
(
'.notice_img'
).
css
(
'display'
,
"block"
);
}
else
{
// 到了抢购的时间显示距离结束时间的倒计时
}
else
{
// 到了抢购的时间显示距离结束时间的倒计时
currentTime
=
res
.
data
.
currentTime
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
);
currentTime
=
res
.
data
.
currentTime
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
);
end
=
res
.
data
.
activityEndDate
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
);
end
=
res
.
data
.
activityEndDate
.
replace
(
'T'
,
' '
).
replace
(
/-/g
,
'/'
);
if
(
num
>
0
)
{
if
(
num
>
0
)
{
$
(
'#t1'
).
html
(
'结束倒计时:'
)
$
(
'#t1'
).
html
(
'结束倒计时:'
)
if
(
res
.
data
.
count
!=
0
)
{
if
(
res
.
data
.
count
!=
0
)
{
// $(".received_img").attr("src", "");
// $(".received_img").attr("src", "");
$
(
'.img_btn p'
).
html
(
'立即抢购'
);
$
(
'.img_btn p'
).
html
(
'立即抢购'
);
}
else
{
}
else
{
$
(
'.img_btn p'
).
html
(
'去使用'
);
$
(
'.img_btn p'
).
html
(
'去使用'
);
$
(
".received_img"
).
css
(
'display'
,
"block"
);
$
(
".received_img"
).
css
(
'display'
,
"block"
);
$
(
'.img_btn'
).
css
(
"background-image"
,
"url(../images/buy_btn.png)"
);
$
(
'.img_btn'
).
css
(
"background-image"
,
"url(../images/buy_btn.png)"
);
}
}
}
else
{
}
else
{
// $(".received_img").attr("src", "");
// $(".received_img").attr("src", "");
$
(
'.img_bg_M'
).
css
(
"background-image"
,
"url(../images/MJ_200@3x.png)"
);
$
(
'.img_bg_M'
).
css
(
"background-image"
,
"url(../images/MJ_200@3x.png)"
);
$
(
'.img_bg_p1'
).
css
(
"color"
,
"#CCCCCC"
);
$
(
'.img_bg_p1'
).
css
(
"color"
,
"#CCCCCC"
);
$
(
'.img_bg_p2'
).
css
(
"color"
,
"#CCCCCC"
);
$
(
'.img_bg_p2'
).
css
(
"color"
,
"#CCCCCC"
);
$
(
'.img_btn p'
).
css
(
"color"
,
"#FFFFFF"
);
$
(
'.img_btn p'
).
css
(
"color"
,
"#FFFFFF"
);
$
(
'.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"
);
$
(
'.dataStatistics'
).
css
(
'display'
,
"none"
);
$
(
'.deta_replace'
).
css
(
'display'
,
"flex"
);
$
(
'.deta_replace'
).
css
(
'display'
,
"flex"
);
$
(
'#notice'
).
css
(
'display'
,
"block"
);
$
(
'#notice'
).
css
(
'display'
,
"block"
);
$
(
'.notice_img'
).
css
(
'display'
,
"block"
);
$
(
'.notice_img'
).
css
(
'display'
,
"block"
);
}
}
}
}
//优惠券的有限时间
//优惠券的有限时间
let
expirationDate
=
(
res
.
data
.
expirationDate
).
split
(
'T'
)[
0
].
replace
(
/-/g
,
'.'
);
let
expirationDate
=
(
res
.
data
.
expirationDate
).
split
(
'T'
)[
0
].
replace
(
/-/g
,
'.'
);
let
title
=
$
(
'.img_bg_p1'
).
text
()
let
title
=
$
(
'.img_bg_p1'
).
text
()
let
RushbuyTime
=
{
let
RushbuyTime
=
{
RushbuyTime
:
expirationDate
,
RushbuyTime
:
expirationDate
,
title
:
title
,
title
:
title
,
}
}
localStorage
.
RushbuyTime
=
JSON
.
stringify
(
RushbuyTime
)
localStorage
.
RushbuyTime
=
JSON
.
stringify
(
RushbuyTime
)
$
(
'.img_bg_p2'
).
html
(
'有效期截止:'
+
expirationDate
)
$
(
'.img_bg_p2'
).
html
(
'有效期截止:'
+
expirationDate
)
}
else
{
}
else
{
$
(
'.dataStatistics'
).
dataStatistics
({
$
(
'.dataStatistics'
).
dataStatistics
({
max
:
0
,
max
:
0
,
min
:
0
,
min
:
0
,
len
:
4
,
len
:
4
,
add
:
true
add
:
true
});
//刚进入页面不执行动画
});
//刚进入页面不执行动画
}
}
// clearInterval(xhtime)
// clearInterval(xhtime)
},
},
error
:
function
(
res
)
{
error
:
function
(
res
)
{
layer
.
msg
(
res
.
message
)
layer
.
msg
(
res
.
message
)
$
(
'.dataStatistics'
).
dataStatistics
({
$
(
'.dataStatistics'
).
dataStatistics
({
max
:
0
,
max
:
0
,
min
:
0
,
min
:
0
,
len
:
4
,
len
:
4
,
add
:
true
add
:
true
});
//刚进入页面不执行动画
});
//刚进入页面不执行动画
}
}
});
});
},
300000
)
//5分钟请求一次接口
},
300000
)
//5分钟请求一次接口
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
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