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
bcb81382
Commit
bcb81382
authored
Nov 15, 2019
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
cada0c10
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
491 additions
and
417 deletions
+491
-417
GT_activities.html
html/GT_activities.html
+1
-1
Rushbuy.html
html/Rushbuy.html
+413
-343
mian.js
js/mian.js
+77
-73
No files found.
html/GT_activities.html
View file @
bcb81382
...
@@ -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=2341654165
"
>
<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'
/>
...
...
html/Rushbuy.html
View file @
bcb81382
<html>
<html>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi"
/>
<meta
name=
"screen-orientation"
content=
"portrait"
>
</meta>
<meta
name=
"x5-orientation"
content=
"portrait"
>
</meta>
<title>
印象之旅11.18
</title>
<style>
*
{
margin
:
0
;
padding
:
0
;}
.main
{
width
:
100%
;
height
:
100%
;
background
:
url(../images/gongxi4.png)
no-repeat
;
background-size
:
100%
;
background-color
:
#8d54cc
;
position
:
relative
;
overflow
:
hidden
;
}
.main
.box
{
position
:
relative
;
top
:
30%
;
width
:
100%
;
opacity
:
0
;
text-align
:
center
;
}
.main
.box.nomove
{
top
:
40%
;
opacity
:
1
;
}
.main
.box.move
{
top
:
40%
;
opacity
:
1
;
transition
:
all
linear
.5s
;
-moz-transition
:
all
linear
.5s
;
/* Firefox 4 */
-webkit-transition
:
all
linear
.5s
;
/* Safari and Chrome */
-o-transition
:
all
linear
.5s
;
/* Opera */
}
.main
.box
.hongbao
{
width
:
80%
;
}
.main
.box
.anniu
{
width
:
64%
;
position
:
absolute
;
left
:
18%
;
bottom
:
15%
;
background
:
url(../images/gongxi22.png)
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
background-position-x
:
center
;
margin
:
0
auto
;
font-size
:
1.4rem
;
color
:
#c6780f
;
height
:
4rem
;
line-height
:
4rem
;
}
.main
.box
.anniu
::after
{
content
:
""
;
display
:
block
;
padding-bottom
:
36%
;
}
<head>
#RushbuyTime
{
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
font-size
:
0.13rem
;
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
color
:
#e03234
;
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi"
/>
height
:
0.2rem
;
<meta
name=
"screen-orientation"
content=
"portrait"
>
position
:
absolute
;
</meta>
width
:
100%
;
<meta
name=
"x5-orientation"
content=
"portrait"
>
right
:
-18.5%
;
</meta>
top
:
26%
;
<title>
印象之旅11.18
</title>
}
<style>
.rushNocheck
{
*
{
width
:
0.9rem
;
margin
:
0
;
height
:
0.9rem
;
padding
:
0
;
border
:
1px
solid
#fff
;
}
display
:
inline-block
;
border-radius
:
0.2rem
;
.main
{
position
:
relative
;
width
:
100%
;
top
:
0.1rem
;
height
:
100%
;
margin-right
:
0.2rem
;
background
:
url(../images/gongxi4.png)
no-repeat
;
display
:
none
;
background-size
:
100%
;
}
background-color
:
#8d54cc
;
.rushNocheckTwo
{
position
:
relative
;
width
:
1rem
;
overflow
:
hidden
;
height
:
1rem
;
}
display
:
inline-block
;
border-radius
:
0.2rem
;
.main
.box
{
position
:
relative
;
position
:
relative
;
top
:
0.1rem
;
top
:
30%
;
margin-right
:
0.2rem
;
width
:
100%
;
}
opacity
:
0
;
.rushNocheckTwo
img
{
text-align
:
center
;
width
:
100%
;
}
height
:
100%
;
}
.main
.box.nomove
{
.readXieyi
{
top
:
40%
;
color
:
#fff
;
opacity
:
1
;
font-size
:
1rem
;
}
width
:
100%
;
text-align
:
center
;
.main
.box.move
{
position
:
absolute
;
top
:
40%
;
bottom
:
3rem
;
opacity
:
1
;
}
transition
:
all
linear
.5s
;
.benciXieyi
{
-moz-transition
:
all
linear
.5s
;
color
:
#FFCE55
;
/* Firefox 4 */
text-decoration
:
underline
;
-webkit-transition
:
all
linear
.5s
;
}
/* Safari and Chrome */
.activeXieyi
{
-o-transition
:
all
linear
.5s
;
position
:
absolute
;
/* Opera */
width
:
100%
;
}
height
:
100%
;
display
:
none
;
.main
.box
.hongbao
{
top
:
0
;
width
:
80%
;
left
:
0
;
}
background
:
rgba
(
0
,
0
,
0
,
.6
);
color
:
#333333
;
.main
.box
.anniu
{
}
width
:
64%
;
.xieyiContent
{
position
:
absolute
;
width
:
80%
;
left
:
18%
;
height
:
26rem
;
bottom
:
15%
;
padding
:
1rem
;
background
:
url(../images/gongxi22.png)
;
background-color
:
#fff
;
background-repeat
:
no-repeat
;
margin
:
0
auto
;
background-size
:
100%
100%
;
margin-top
:
6rem
;
background-position-x
:
center
;
border-radius
:
1rem
;
margin
:
0
auto
;
}
font-size
:
1.4rem
;
.xieyiTitle
{
color
:
#c6780f
;
font-size
:
1rem
;
height
:
4rem
;
width
:
100%
;
line-height
:
4rem
;
text-align
:
center
;
}
}
.xieyiNei
{
.main
.box
.anniu
::after
{
width
:
100%
;
content
:
""
;
height
:
6rem
;
display
:
block
;
width
:
100%
;
padding-bottom
:
36%
;
height
:
20rem
;
}
margin-top
:
1rem
;
overflow-y
:
auto
;
#RushbuyTime
{
font-size
:
0.9rem
;
font-size
:
0.13rem
;
color
:
#333333
;
color
:
#e03234
;
padding
:
0
0.2rem
;
height
:
0.2rem
;
}
position
:
absolute
;
.xieyiNei
div
{
width
:
100%
;
margin-bottom
:
1rem
;
right
:
-18.5%
;
}
top
:
26%
;
.xieyiNei
::-webkit-scrollbar
{
width
:
4px
;
height
:
8px
;}
}
.xieyiNei
::-webkit-scrollbar-thumb
{
border-radius
:
4px
;
box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.2
);
background
:
#c9c9c9
;}
.xieyiNei
::-webkit-scrollbar-track
{
box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.2
);
border-radius
:
4px
;
background
:
#EDEDED
;}
.rushNocheck
{
.readBtn
{
width
:
0.9rem
;
width
:
6rem
;
height
:
0.9rem
;
height
:
2.5rem
;
border
:
1px
solid
#fff
;
background-color
:
#FFC430
;
display
:
inline-block
;
color
:
#A76104
;
border-radius
:
0.2rem
;
border
:
none
;
position
:
relative
;
outline
:
none
;
top
:
0.1rem
;
font-size
:
1rem
;
margin-right
:
0.2rem
;
border-radius
:
0.5rem
;
display
:
none
;
margin-top
:
1rem
;
}
}
</style>
.rushNocheckTwo
{
width
:
1rem
;
height
:
1rem
;
display
:
inline-block
;
border-radius
:
0.2rem
;
position
:
relative
;
top
:
0.1rem
;
margin-right
:
0.2rem
;
}
.rushNocheckTwo
img
{
width
:
100%
;
height
:
100%
;
}
.readXieyi
{
color
:
#fff
;
font-size
:
1rem
;
width
:
100%
;
text-align
:
center
;
position
:
absolute
;
bottom
:
3rem
;
}
.benciXieyi
{
color
:
#FFCE55
;
text-decoration
:
underline
;
}
.activeXieyi
{
position
:
absolute
;
width
:
100%
;
height
:
100%
;
display
:
none
;
top
:
0
;
left
:
0
;
background
:
rgba
(
0
,
0
,
0
,
.6
);
color
:
#333333
;
}
.xieyiContent
{
width
:
80%
;
height
:
26rem
;
padding
:
1rem
;
background-color
:
#fff
;
margin
:
0
auto
;
margin-top
:
6rem
;
border-radius
:
1rem
;
}
.xieyiTitle
{
font-size
:
1rem
;
width
:
100%
;
text-align
:
center
;
}
.xieyiNei
{
width
:
100%
;
height
:
6rem
;
width
:
100%
;
height
:
20rem
;
margin-top
:
1rem
;
overflow-y
:
auto
;
font-size
:
0.9rem
;
color
:
#333333
;
padding
:
0
0.2rem
;
}
.xieyiNei
div
{
margin-bottom
:
1rem
;
}
.xieyiNei
::-webkit-scrollbar
{
width
:
4px
;
height
:
8px
;
}
.xieyiNei
::-webkit-scrollbar-thumb
{
border-radius
:
4px
;
box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.2
);
background
:
#c9c9c9
;
}
.xieyiNei
::-webkit-scrollbar-track
{
box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.2
);
border-radius
:
4px
;
background
:
#EDEDED
;
}
.readBtn
{
width
:
6rem
;
height
:
2.5rem
;
background-color
:
#FFC430
;
color
:
#A76104
;
border
:
none
;
outline
:
none
;
font-size
:
1rem
;
border-radius
:
0.5rem
;
margin-top
:
1rem
;
}
</style>
</head>
</head>
<body>
<body>
<div
class=
"main"
>
<div
class=
"main"
>
<div
class=
"box"
>
<div
class=
"box"
>
<img
class=
"hongbao"
src=
"../images/gongxi1.png"
>
<img
class=
"hongbao"
src=
"../images/gongxi1.png"
>
<span
id=
"RushbuyTime"
></span>
<span
id=
"RushbuyTime"
></span>
<div
class=
"anniu"
>
<div
class=
"anniu"
>
</div>
</div>
<!-- <img class="anniu" src="../images/gongxi2.png"> -->
<!-- <img class="anniu" src="../images/gongxi2.png"> -->
</div>
<div
class=
"readXieyi"
>
<div
class=
"rushNocheck"
></div>
<div
class=
"rushNocheckTwo"
>
<img
src=
"../images/xyck.png"
alt=
""
/>
</div>
</div>
<span>
我已阅读并同意
</span><span
class=
"benciXieyi"
>
《本次活动说明》
</span>
<div
class=
"readXieyi"
>
</div>
<div
class=
"rushNocheck"
></div>
<div
class=
"rushNocheckTwo"
>
<div
class=
"activeXieyi"
>
<img
src=
"../images/xyck.png"
alt=
""
/>
<div
class=
"xieyiContent"
>
<div
class=
"xieyiTitle"
>
11.18活动说明
</div>
<div
class=
"xieyiNei"
>
<div>
1、所有印象同业会员均可参加本次活动
</div>
<div>
2、活动期间内,每天更新1118张面额为200的散拼跟团游优惠券,用户需要进入活动页面进行抢购,抢到优惠券的用户需要在1分钟内完成支付,若未完成支付系统将自动取消订单;用户完成付款后,系统将自动发放优惠券,可前往APP“我的优惠券”页面进行查看。
</div>
<div>
3、本次活动的优惠券只能用于印象之旅的散拼跟团游产品,每团限定使用一张。
</div>
<div>
4、本次活动商品为APP专享优惠券,只能在印象同业APP中使用,优惠券有效期为:2019-11-18 至 2020-11-17。
</div>
<div>
5、本次优惠券不能与其他优惠券叠加使用,但可以与其他活动一起组合使用。例如:幸福存折等。
</div>
<div>
6、每个同行用户限定每天只能抢购一张优惠券。
</div>
<div>
7、活动时间:2019年11月18日-2019年11月25日为期8天,用户可在印象同业APP,行程助理小程序以及本次活动的H5页面中参与。
</div>
<div>
本次活动最终解释权归印象之旅所有。
</div>
</div>
</div>
<div
style=
"width:100%;text-align:center;"
>
<span>
我已阅读并同意
</span><span
class=
"benciXieyi"
>
《本次活动说明》
</span>
<button
class=
"readBtn"
>
我已阅读
</button>
</div>
<div
class=
"activeXieyi"
>
<div
class=
"xieyiContent"
>
<div
class=
"xieyiTitle"
>
11.18活动说明
</div>
<div
class=
"xieyiNei"
>
<div>
1、所有印象同业会员均可参加本次活动
</div>
<div>
2、活动期间内,每天更新1118张面额为200的散拼跟团游优惠券,用户需要进入活动页面进行抢购,抢到优惠券的用户需要在1分钟内完成支付,若未完成支付系统将自动取消订单;用户完成付款后,系统将自动发放优惠券,可前往APP“我的优惠券”页面进行查看。
</div>
<div>
3、本次活动的优惠券只能用于印象之旅的散拼跟团游产品,每团限定使用一张。
</div>
<div>
4、本次活动商品为APP专享优惠券,只能在印象同业APP中使用,优惠券有效期为:2019-11-18 至 2020-11-17。
</div>
<div>
5、本次优惠券不能与其他优惠券叠加使用,但可以与其他活动一起组合使用。例如:幸福存折等。
</div>
<div>
6、每个同行用户限定每天只能抢购一张优惠券。
</div>
<div>
7、活动时间:2019年11月18日-2019年11月25日为期8天,用户可在印象同业APP,行程助理小程序以及本次活动的H5页面中参与。
</div>
<div>
本次活动最终解释权归印象之旅所有。
</div>
</div>
<div
style=
"width:100%;text-align:center;"
>
<button
class=
"readBtn"
>
我已阅读
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script
type=
"text/javascript"
src=
"../js/jquery-1.10.2.js"
></script>
<script
type=
"text/javascript"
src=
"../js/jquery-1.10.2.js"
></script>
<script
type=
"text/javascript"
src=
"../js/md5.js"
></script>
<script
type=
"text/javascript"
src=
"../js/md5.js"
></script>
<script
type=
"text/javascript"
src=
"../js/layer/layer.js"
></script>
<script
type=
"text/javascript"
src=
"../js/layer/layer.js"
></script>
<script
type=
"text/javascript"
src=
"../js/mian.js?r=12312312312"
></script>
<script
type=
"text/javascript"
src=
"../js/mian.js"
></script>
<script
type=
"text/javascript"
src=
"https://res.wx.qq.com/open/js/jweixin-1.3.2.js"
></script>
<script
type=
"text/javascript"
src=
"https://res.wx.qq.com/open/js/jweixin-1.3.2.js"
></script>
<script>
<script>
let
param
=
window
.
location
.
href
.
split
(
'?'
)[
1
].
split
(
"&"
)
?
window
.
location
.
href
.
split
(
'?'
)[
1
].
split
(
"&"
)
:
null
;
let
param
=
window
.
location
.
href
.
split
(
'?'
)[
1
].
split
(
"&"
)
?
window
.
location
.
href
.
split
(
'?'
)[
1
].
split
(
"&"
)
:
null
;
let
price
=
param
?
param
[
0
].
split
(
'='
)[
1
]
:
0
;
let
price
=
param
?
param
[
0
].
split
(
'='
)[
1
]
:
0
;
let
couponId
=
param
?
param
[
1
].
split
(
'='
)[
1
]
:
0
;
let
couponId
=
param
?
param
[
1
].
split
(
'='
)[
1
]
:
0
;
let
platform
=
param
?
param
[
2
].
split
(
'='
)[
1
]
:
0
;
let
platform
=
param
?
param
[
2
].
split
(
'='
)[
1
]
:
0
;
$
(
'.anniu'
).
html
(
'支付'
+
price
+
'元领取'
)
$
(
'.anniu'
).
html
(
'支付'
+
price
+
'元领取'
)
let
buyIf
=
{}
let
buyIf
=
{}
// if (localStorage.buyInfo) {
// if (localStorage.buyInfo) {
// buyIf = JSON.parse(localStorage.buyInfo)
// buyIf = JSON.parse(localStorage.buyInfo)
// }else {
// }else {
// history.go(-1)
// history.go(-1)
// }
// }
if
(
platform
==
'app'
)
{
if
(
platform
==
'app'
)
{
move
(
1
)
move
(
1
)
}
else
{
}
else
{
move
(
2
)
move
(
2
)
}
}
let
RushbuyTime
=
localStorage
.
RushbuyTime
?
JSON
.
parse
(
localStorage
.
RushbuyTime
)
:
{
RushbuyTime
:
''
}
let
RushbuyTime
=
localStorage
.
RushbuyTime
?
JSON
.
parse
(
localStorage
.
RushbuyTime
)
:
{
$
(
'#RushbuyTime'
).
html
(
`有效期截止:`
+
RushbuyTime
.
RushbuyTime
)
RushbuyTime
:
''
function
move
(
t
){
}
if
(
t
===
1
)
{
$
(
'#RushbuyTime'
).
html
(
`有效期截止:`
+
RushbuyTime
.
RushbuyTime
)
$
(
'.box'
).
addClass
(
'nomove'
)
}
else
{
setTimeout
(
function
(){
$
(
'.box'
).
addClass
(
'move'
)
},
500
)
}
}
var
isChecke
=
true
;
function
move
(
t
)
{
$
(
'.readXieyi'
).
click
(
function
(){
if
(
t
===
1
)
{
isChecke
=!
isChecke
$
(
'.box'
).
addClass
(
'nomove'
)
if
(
!
isChecke
){
}
else
{
$
(
'.rushNocheckTwo'
).
css
({
'display'
:
'none'
})
setTimeout
(
function
()
{
$
(
'.rushNocheck'
).
css
({
'display'
:
'inline-block'
})
$
(
'.box'
).
addClass
(
'move'
)
}
else
{
},
500
)
$
(
'.rushNocheckTwo'
).
css
({
'display'
:
'inline-block'
})
}
$
(
'.rushNocheck'
).
css
({
'display'
:
'none'
})
}
}
})
//点击本次协议弹出窗
$
(
".benciXieyi"
).
click
(
function
(
e
)
{
e
.
stopPropagation
();
$
(
'.activeXieyi'
).
css
({
'display'
:
'block'
});
});
//关闭弹窗
$
(
'.readBtn'
).
click
(
function
(){
$
(
'.activeXieyi'
).
css
({
'display'
:
'none'
});
})
$
(
'.anniu'
).
click
(
function
()
{
var
isChecke
=
true
;
if
(
!
isChecke
){
$
(
'.readXieyi'
).
click
(
function
()
{
layer
.
msg
(
'请同意活动说明'
);
isChecke
=
!
isChecke
return
;
if
(
!
isChecke
)
{
}
$
(
'.rushNocheckTwo'
).
css
({
var
loadingFlag
;
'display'
:
'none'
if
(
platform
==
'app'
)
{
})
window
.
postMessage
(
JSON
.
stringify
({
'action'
:
'showHud'
,
'message'
:
'抢购中...'
}));
$
(
'.rushNocheck'
).
css
({
}
'display'
:
'inline-block'
if
(
platform
==
'H5'
)
{
})
loadingFlag
=
layer
.
msg
(
'抢购中...'
,
{
icon
:
16
,
shade
:
0.01
,
shadeClose
:
false
,
time
:
60000
});
}
else
{
}
$
(
'.rushNocheckTwo'
).
css
({
$
.
ajax
({
'display'
:
'inline-block'
type
:
"POST"
,
})
url
:
`
${
getApiUrl
().
urlJava
}
api/appActivity/PanicBuyingCoupon`
,
$
(
'.rushNocheck'
).
css
({
contentType
:
"application/json"
,
'display'
:
'none'
data
:
getJavaData
({
})
redemptionPrice
:
price
,
}
couponId
:
couponId
,
})
productName
:
'印象之旅-200元线路产品优惠券'
//点击本次协议弹出窗
}),
$
(
".benciXieyi"
).
click
(
function
(
e
)
{
async
:
false
,
e
.
stopPropagation
();
success
:
function
(
res
)
{
$
(
'.activeXieyi'
).
css
({
if
(
platform
==
'app'
)
{
'display'
:
'block'
window
.
postMessage
(
JSON
.
stringify
({
'action'
:
'dismissHud'
}));
});
}
});
if
(
platform
==
'H5'
)
{
//关闭弹窗
layer
.
close
(
loadingFlag
);
$
(
'.readBtn'
).
click
(
function
()
{
}
$
(
'.activeXieyi'
).
css
({
if
(
res
.
resultCode
===
1
)
{
'display'
:
'none'
});
})
let
title
=
'印象之旅-200元线路产品优惠券'
;
$
(
'.anniu'
).
click
(
function
()
{
let
data
=
{
if
(
!
isChecke
)
{
layer
.
msg
(
'请同意活动说明'
);
return
;
}
var
loadingFlag
;
if
(
platform
==
'app'
)
{
window
.
postMessage
(
JSON
.
stringify
({
'action'
:
'showHud'
,
'message'
:
'抢购中...'
}));
}
if
(
platform
==
'H5'
)
{
loadingFlag
=
layer
.
msg
(
'抢购中...'
,
{
icon
:
16
,
shade
:
0.01
,
shadeClose
:
false
,
time
:
60000
});
}
$
.
ajax
({
type
:
"POST"
,
url
:
`
${
getApiUrl
().
urlJava
}
api/appActivity/PanicBuyingCoupon`
,
contentType
:
"application/json"
,
data
:
getJavaData
({
redemptionPrice
:
price
,
couponId
:
couponId
,
productName
:
'印象之旅-200元线路产品优惠券'
}),
async
:
false
,
success
:
function
(
res
)
{
if
(
platform
==
'app'
)
{
window
.
postMessage
(
JSON
.
stringify
({
'action'
:
'dismissHud'
}));
}
if
(
platform
==
'H5'
)
{
layer
.
close
(
loadingFlag
);
}
if
(
res
.
resultCode
===
1
)
{
'action'
:
'jump'
,
// showToast->一个提示信息 showHud->一个黑色的loading
let
title
=
'印象之旅-200元线路产品优惠券'
;
'page'
:
'payment'
,
let
data
=
{
'pageData'
:
{
'couponId'
:
res
.
data
.
couponId
,
'title'
:
title
,
'price'
:
res
.
data
.
preferPrice
,
'backType'
:
'reload'
,
'data'
:
res
.
data
,
'goBack'
:
'1'
,
'cardInfo'
:
{
title
:
RushbuyTime
.
title
,
date
:
RushbuyTime
.
RushbuyTime
,
userName
:
RushbuyTime
.
userName
,
shopName
:
RushbuyTime
.
shopName
,
}
}
}
if
(
platform
==
'app'
)
{
window
.
postMessage
(
JSON
.
stringify
(
data
));
}
// 跳转到支付
else
if
(
platform
==
'xcx'
)
{
// window.postMessage(JSON.stringify(data));
let
data
=
{};
data
.
sOrderNo
=
res
.
data
.
id
;
data
.
sProductName
=
title
;
data
.
productId
=
res
.
data
.
couponId
;
data
.
dTotalPrice
=
res
.
data
.
preferPrice
;
wx
.
miniProgram
.
getEnv
(
function
(
res
)
{
window
.
wx
.
miniProgram
.
navigateTo
({
url
:
`/pages/Home/pay/pay?data=`
+
JSON
.
stringify
(
data
),
});
});
}
else
if
(
platform
==
'H5'
)
{
let
userInfo
=
getLocalStorage
()
let
data
=
{};
data
.
sOrderNo
=
res
.
data
.
id
;
data
.
sProductName
=
title
;
data
.
productId
=
res
.
data
.
couponId
;
data
.
dTotalPrice
=
res
.
data
.
preferPrice
;
data
.
customerId
=
userInfo
.
customerId
;
sessionStorage
.
setItem
(
"payInfo"
,
JSON
.
stringify
(
data
));
'action'
:
'jump'
,
// showToast->一个提示信息 showHud->一个黑色的loading
//window.location.href = 'https://127.0.0.1:5500/html/pay.html';
'page'
:
'payment'
,
//window.location.href = 'http://192.168.0.117:5500/html/pay.html';
'pageData'
:
{
window
.
location
.
href
=
'https://activity.oytour.com/html/pay.html'
;
'couponId'
:
res
.
data
.
couponId
,
}
'title'
:
title
,
'price'
:
res
.
data
.
preferPrice
,
'backType'
:
'reload'
,
'data'
:
res
.
data
,
'goBack'
:
'1'
,
'cardInfo'
:
{
title
:
RushbuyTime
.
title
,
date
:
RushbuyTime
.
RushbuyTime
,
userName
:
RushbuyTime
.
userName
,
shopName
:
RushbuyTime
.
shopName
,
}
}
}
if
(
platform
==
'app'
)
{
window
.
postMessage
(
JSON
.
stringify
(
data
));
}
// 跳转到支付
else
if
(
platform
==
'xcx'
)
{
// window.postMessage(JSON.stringify(data));
let
data
=
{};
data
.
sOrderNo
=
res
.
data
.
id
;
data
.
sProductName
=
title
;
data
.
productId
=
res
.
data
.
couponId
;
data
.
dTotalPrice
=
res
.
data
.
preferPrice
;
wx
.
miniProgram
.
getEnv
(
function
(
res
)
{
window
.
wx
.
miniProgram
.
navigateTo
({
url
:
`/pages/Home/pay/pay?data=`
+
JSON
.
stringify
(
data
),
});
});
}
else
if
(
platform
==
'H5'
)
{
let
userInfo
=
getLocalStorage
()
let
data
=
{};
data
.
sOrderNo
=
res
.
data
.
id
;
data
.
sProductName
=
title
;
data
.
productId
=
res
.
data
.
couponId
;
data
.
dTotalPrice
=
res
.
data
.
preferPrice
;
data
.
customerId
=
userInfo
.
customerId
;
sessionStorage
.
setItem
(
"payInfo"
,
JSON
.
stringify
(
data
));
//window.location.href = 'https://127.0.0.1:5500/html/pay.html';
//window.location.href = 'http://192.168.0.117:5500/html/pay.html';
window
.
location
.
href
=
'https://activity.oytour.com/html/pay.html'
;
}
}
else
{
if
(
platform
==
'app'
)
{
window
.
postMessage
(
JSON
.
stringify
({
'action'
:
'showToast'
,
'message'
:
res
.
message
}));
}
else
{
layer
.
msg
(
res
.
message
)
}
layer
.
msg
(
res
.
message
)
// window.location.reload()
}
else
{
if
(
platform
==
'app'
)
{
window
.
postMessage
(
JSON
.
stringify
({
'action'
:
'showToast'
,
'message'
:
res
.
message
}));
}
else
{
layer
.
msg
(
res
.
message
)
}
layer
.
msg
(
res
.
message
)
}
// window.location.reload()
},
error
:
function
(
res
)
{
}
console
.
log
(
platform
)
},
if
(
platform
==
'app'
)
{
error
:
function
(
res
)
{
window
.
postMessage
(
JSON
.
stringify
({
'action'
:
'dismissHud'
}));
console
.
log
(
platform
)
}
else
if
(
platform
==
'H5'
)
{
if
(
platform
==
'app'
)
{
layer
.
close
(
loadingFlag
);
window
.
postMessage
(
JSON
.
stringify
({
}
'action'
:
'dismissHud'
}
}));
});
}
else
if
(
platform
==
'H5'
)
{
})
layer
.
close
(
loadingFlag
);
</script>
}
}
});
})
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
js/mian.js
View file @
bcb81382
let
locationName
=
window
.
location
.
hostname
;
let
locationName
=
window
.
location
.
hostname
;
function
getApiUrl
()
{
function
getApiUrl
()
{
let
url
=
{
let
url
=
{
urlPost
:
"https://reborn.oytour.com/api/common/post"
,
urlPost
:
"https://reborn.oytour.com/api/common/post"
,
//urlPost: locationName.indexOf('oytour') !== -1 ? "http://reborn.oytour.com/api/common/post" : "http://192.168.2.214:8082/api/common/post",
//urlPost: locationName.indexOf('oytour') !== -1 ? "http://reborn.oytour.com/api/common/post" : "http://192.168.2.214:8082/api/common/post",
//urlJava: locationName.indexOf('oytour') !== -1 ? "https://efficient.oytour.com/" : "http://192.168.2.215:9000/"
//urlJava: locationName.indexOf('oytour') !== -1 ? "https://efficient.oytour.com/" : "http://192.168.2.215:9000/"
urlJava
:
"https://efficient.oytour.com/"
urlJava
:
"https://efficient.oytour.com/"
}
}
return
url
return
url
}
}
String
.
prototype
.
myReplace
=
function
(
f
,
e
){
//时间格式化 苹果手机-替换为/
String
.
prototype
.
myReplace
=
function
(
f
,
e
)
{
//时间格式化 苹果手机-替换为/
var
reg
=
new
RegExp
(
f
,
"g"
);
//创建正则RegExp对象
var
reg
=
new
RegExp
(
f
,
"g"
);
//创建正则RegExp对象
return
this
.
replace
(
reg
,
e
);
return
this
.
replace
(
reg
,
e
);
}
}
function
getLocalStorage
()
{
function
getLocalStorage
()
{
var
localStorageData
=
window
.
localStorage
[
"userInfo"
];
var
localStorageData
=
window
.
localStorage
[
"userInfo"
];
if
(
localStorageData
!=
undefined
)
{
if
(
localStorageData
!=
undefined
)
{
return
JSON
.
parse
(
localStorageData
);
return
JSON
.
parse
(
localStorageData
);
}
else
{
}
else
{
return
null
;
return
null
;
}
}
}
}
function
getLocalStorage2
()
{
function
getLocalStorage2
()
{
var
localStorageData
=
window
.
localStorage
[
"userInfo2"
];
var
localStorageData
=
window
.
localStorage
[
"userInfo2"
];
if
(
localStorageData
!=
undefined
)
{
if
(
localStorageData
!=
undefined
)
{
return
JSON
.
parse
(
localStorageData
);
return
JSON
.
parse
(
localStorageData
);
}
else
{
}
else
{
return
null
;
return
null
;
}
}
}
}
function
clearLocalStorage
()
{
function
clearLocalStorage
()
{
window
.
localStorage
.
removeItem
(
'userInfo'
)
window
.
localStorage
.
removeItem
(
'userInfo'
)
}
}
function
getAjaxData
(
cmd
,
msg
,
tk
)
{
function
getAjaxData
(
cmd
,
msg
,
tk
)
{
if
(
msg
==
null
||
msg
==
""
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
msg
=
{}
}
}
let
timestamp
=
(
new
Date
()).
valueOf
();
let
timestamp
=
(
new
Date
()).
valueOf
();
let
token
=
""
;
let
token
=
""
;
let
key
=
""
;
let
key
=
""
;
if
(
getLocalStorage
()
!=
null
)
{
if
(
getLocalStorage
()
!=
null
)
{
token
=
getLocalStorage
().
token
;
token
=
getLocalStorage
().
token
;
key
=
getLocalStorage
().
secretKey
;
key
=
getLocalStorage
().
secretKey
;
}
}
let
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
let
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
let
md5Str
=
hex_md5
(
`cmd=
${
cmd
}
&msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
let
md5Str
=
hex_md5
(
`cmd=
${
cmd
}
&msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
let
postData
=
{
let
postData
=
{
"msg"
:
msg
,
"msg"
:
msg
,
"cmd"
:
cmd
,
"cmd"
:
cmd
,
"timestamp"
:
timestamp
,
"timestamp"
:
timestamp
,
"token"
:
tk
?
tk
:
token
,
"token"
:
tk
?
tk
:
token
,
"sign"
:
md5Str
"sign"
:
md5Str
}
}
return
JSON
.
stringify
(
postData
)
return
JSON
.
stringify
(
postData
)
}
}
function
getJavaData
(
msg
)
{
function
getJavaData
(
msg
)
{
if
(
msg
==
null
||
msg
==
""
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
msg
=
{}
}
}
let
timestamp
=
(
new
Date
()).
valueOf
();
let
timestamp
=
(
new
Date
()).
valueOf
();
let
token
=
""
;
let
token
=
""
;
let
key
=
""
;
let
key
=
""
;
if
(
getLocalStorage
()
!=
null
)
{
if
(
getLocalStorage
()
!=
null
)
{
token
=
getLocalStorage
().
token
;
token
=
getLocalStorage
().
token
;
key
=
getLocalStorage
().
S
ecretKey
;
key
=
getLocalStorage
().
s
ecretKey
;
}
else
if
(
getLocalStorage2
()
!=
null
)
{
}
else
if
(
getLocalStorage2
()
!=
null
)
{
if
(
getLocalStorage2
()
!=
null
)
{
if
(
getLocalStorage2
()
!=
null
)
{
token
=
getLocalStorage2
().
token
;
token
=
getLocalStorage2
().
token
;
key
=
getLocalStorage2
().
secretKey
;
key
=
getLocalStorage2
().
secretKey
;
}
}
}
}
let
userInfo
=
localStorage
.
userInfo
?
JSON
.
parse
(
localStorage
.
userInfo
)
:
JSON
.
parse
(
localStorage
.
userInfo2
)
?
JSON
.
parse
(
localStorage
.
userInfo2
)
:
''
let
userInfo
=
localStorage
.
userInfo
?
JSON
.
parse
(
localStorage
.
userInfo
)
:
JSON
.
parse
(
localStorage
.
userInfo2
)
?
JSON
.
parse
(
localStorage
.
userInfo2
)
:
''
let
uid
=
userInfo
.
accountId
?
userInfo
.
accountId
:
0
let
uid
=
userInfo
.
accountId
?
userInfo
.
accountId
:
0
let
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
let
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
let
md5Str
=
hex_md5
(
`msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
let
md5Str
=
hex_md5
(
`msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
let
postData
=
{
let
postData
=
{
"groupId"
:
2
,
"groupId"
:
2
,
"msg"
:
msg
,
"msg"
:
msg
,
"uid"
:
uid
,
"uid"
:
uid
,
"timestamp"
:
timestamp
,
"timestamp"
:
timestamp
,
"token"
:
token
,
"token"
:
token
,
"sign"
:
md5Str
"sign"
:
md5Str
}
}
return
JSON
.
stringify
(
postData
)
return
JSON
.
stringify
(
postData
)
}
}
function
getJavaA
(
msg
,
tk
)
{
function
getJavaA
(
msg
,
tk
)
{
...
@@ -110,4 +114,4 @@ function getJavaA(msg, tk) {
...
@@ -110,4 +114,4 @@ function getJavaA(msg, tk) {
"uid"
:
uid
,
"uid"
:
uid
,
}
}
return
JSON
.
stringify
(
postData
)
return
JSON
.
stringify
(
postData
)
}
}
\ 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