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
254ca491
Commit
254ca491
authored
Nov 15, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/huaguohao/surprised
parents
fd395ea8
e07388b5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
492 additions
and
421 deletions
+492
-421
GT_activities.html
html/GT_activities.html
+2
-5
Rushbuy.html
html/Rushbuy.html
+413
-343
mian.js
js/mian.js
+77
-73
No files found.
html/GT_activities.html
View file @
254ca491
...
...
@@ -11,7 +11,7 @@
<meta
name=
"x5-orientation"
content=
"portrait"
>
</meta>
<!-- <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"
/>
<div
id=
'wx_pic'
style=
'margin:0 auto;display:none;'
>
<img
src=
'../images/18logo.png'
/>
...
...
@@ -257,7 +257,7 @@
let
login
=
true
;
//判断是否登录
let
userInfo
=
{};
let
platform
=
"H5"
;
if
(
localStorage
.
u
)
{
if
(
localStorage
.
u
&&
href
.
indexOf
(
"platform"
)
==
-
1
)
{
try
{
userInfo
=
JSON
.
parse
(
localStorage
.
u
);
if
(
!
userInfo
.
customerId
)
{
...
...
@@ -277,8 +277,6 @@
login
=
false
}
}
else
{
// 如果进入页面没有登录的参数 处理跳到h5页面登录
if
(
href
.
split
(
'?'
)[
1
])
{
...
...
@@ -300,7 +298,6 @@
secretKey
:
param
[
3
].
split
(
'='
)[
1
]
}
platform
=
param
[
4
].
split
(
'='
)[
1
]
//获取从哪里跳过来的
}
}
else
{
// window.location.href = 'https://activity.oytour.com/html/login.html';
...
...
html/Rushbuy.html
View file @
254ca491
<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=
"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
{
*
{
margin
:
0
;
padding
:
0
;
}
.main
{
width
:
100%
;
height
:
100%
;
background
:
url(../images/gongxi4.png)
no-repeat
;
background-size
:
100%
;
background-size
:
100%
;
background-color
:
#8d54cc
;
position
:
relative
;
overflow
:
hidden
;
}
.main
.box
{
.main
.box
{
position
:
relative
;
top
:
30%
;
width
:
100%
;
opacity
:
0
;
text-align
:
center
;
}
.main
.box.nomove
{
.main
.box.nomove
{
top
:
40%
;
opacity
:
1
;
}
.main
.box.move
{
.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 */
-moz-transition
:
all
linear
.5s
;
/* Firefox 4 */
-webkit-transition
:
all
linear
.5s
;
/* Safari and Chrome */
-o-transition
:
all
linear
.5s
;
/* Opera */
}
.main
.box
.hongbao
{
.main
.box
.hongbao
{
width
:
80%
;
}
.main
.box
.anniu
{
.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-repeat
:
no-repeat
;
background-size
:
100%
100%
;
background-position-x
:
center
;
margin
:
0
auto
;
font-size
:
1.4rem
;
...
...
@@ -57,13 +69,14 @@
height
:
4rem
;
line-height
:
4rem
;
}
.main
.box
.anniu
::after
{
.main
.box
.anniu
::after
{
content
:
""
;
display
:
block
;
padding-bottom
:
36%
;
}
#RushbuyTime
{
#RushbuyTime
{
font-size
:
0.13rem
;
color
:
#e03234
;
height
:
0.2rem
;
...
...
@@ -72,96 +85,122 @@
right
:
-18.5%
;
top
:
26%
;
}
.rushNocheck
{
width
:
0.9rem
;
height
:
0.9rem
;
border
:
1px
solid
#fff
;
.rushNocheck
{
width
:
0.9rem
;
height
:
0.9rem
;
border
:
1px
solid
#fff
;
display
:
inline-block
;
border-radius
:
0.2rem
;
border-radius
:
0.2rem
;
position
:
relative
;
top
:
0.1rem
;
margin-right
:
0.2rem
;
top
:
0.1rem
;
margin-right
:
0.2rem
;
display
:
none
;
}
.rushNocheckTwo
{
width
:
1rem
;
height
:
1rem
;
.rushNocheckTwo
{
width
:
1rem
;
height
:
1rem
;
display
:
inline-block
;
border-radius
:
0.2rem
;
border-radius
:
0.2rem
;
position
:
relative
;
top
:
0.1rem
;
margin-right
:
0.2rem
;
top
:
0.1rem
;
margin-right
:
0.2rem
;
}
.rushNocheckTwo
img
{
width
:
100%
;
height
:
100%
;
.rushNocheckTwo
img
{
width
:
100%
;
height
:
100%
;
}
.readXieyi
{
color
:
#fff
;
font-size
:
1rem
;
width
:
100%
;
.readXieyi
{
color
:
#fff
;
font-size
:
1rem
;
width
:
100%
;
text-align
:
center
;
position
:
absolute
;
bottom
:
3rem
;
bottom
:
3rem
;
}
.benciXieyi
{
color
:
#FFCE55
;
.benciXieyi
{
color
:
#FFCE55
;
text-decoration
:
underline
;
}
.activeXieyi
{
.activeXieyi
{
position
:
absolute
;
width
:
100%
;
height
:
100%
;
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
;
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
;
margin
:
0
auto
;
margin-top
:
6rem
;
border-radius
:
1rem
;
}
.xieyiTitle
{
font-size
:
1rem
;
width
:
100%
;
.xieyiTitle
{
font-size
:
1rem
;
width
:
100%
;
text-align
:
center
;
}
.xieyiNei
{
width
:
100%
;
height
:
6rem
;
.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
;
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
;
color
:
#A76104
;
border
:
none
;
outline
:
none
;
font-size
:
1rem
;
border-radius
:
0.5rem
;
margin-top
:
1rem
;
margin-top
:
1rem
;
}
</style>
</head>
<body>
<div
class=
"main"
>
<div
class=
"box"
>
...
...
@@ -175,7 +214,7 @@
<div
class=
"readXieyi"
>
<div
class=
"rushNocheck"
></div>
<div
class=
"rushNocheckTwo"
>
<img
src=
"../images/xyck.png"
alt=
""
/>
<img
src=
"../images/xyck.png"
alt=
""
/>
</div>
<span>
我已阅读并同意
</span><span
class=
"benciXieyi"
>
《本次活动说明》
</span>
</div>
...
...
@@ -202,7 +241,7 @@
<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/layer/layer.js"
></script>
<script
type=
"text/javascript"
src=
"../js/mian.js
"
></script>
<script
type=
"text/javascript"
src=
"../js/mian.js?r=12312312312
"
></script>
<script
type=
"text/javascript"
src=
"https://res.wx.qq.com/open/js/jweixin-1.3.2.js"
></script>
<script>
...
...
@@ -210,7 +249,7 @@
let
price
=
param
?
param
[
0
].
split
(
'='
)[
1
]
:
0
;
let
couponId
=
param
?
param
[
1
].
split
(
'='
)[
1
]
:
0
;
let
platform
=
param
?
param
[
2
].
split
(
'='
)[
1
]
:
0
;
$
(
'.anniu'
).
html
(
'支付'
+
price
+
'元领取'
)
$
(
'.anniu'
).
html
(
'支付'
+
price
+
'元领取'
)
let
buyIf
=
{}
// if (localStorage.buyInfo) {
// buyIf = JSON.parse(localStorage.buyInfo)
...
...
@@ -222,50 +261,73 @@
}
else
{
move
(
2
)
}
let
RushbuyTime
=
localStorage
.
RushbuyTime
?
JSON
.
parse
(
localStorage
.
RushbuyTime
)
:
{
RushbuyTime
:
''
}
let
RushbuyTime
=
localStorage
.
RushbuyTime
?
JSON
.
parse
(
localStorage
.
RushbuyTime
)
:
{
RushbuyTime
:
''
}
$
(
'#RushbuyTime'
).
html
(
`有效期截止:`
+
RushbuyTime
.
RushbuyTime
)
function
move
(
t
){
function
move
(
t
)
{
if
(
t
===
1
)
{
$
(
'.box'
).
addClass
(
'nomove'
)
}
else
{
setTimeout
(
function
()
{
setTimeout
(
function
()
{
$
(
'.box'
).
addClass
(
'move'
)
},
500
)
}
}
var
isChecke
=
true
;
$
(
'.readXieyi'
).
click
(
function
(){
isChecke
=!
isChecke
if
(
!
isChecke
){
$
(
'.rushNocheckTwo'
).
css
({
'display'
:
'none'
})
$
(
'.rushNocheck'
).
css
({
'display'
:
'inline-block'
})
}
else
{
$
(
'.rushNocheckTwo'
).
css
({
'display'
:
'inline-block'
})
$
(
'.rushNocheck'
).
css
({
'display'
:
'none'
})
var
isChecke
=
true
;
$
(
'.readXieyi'
).
click
(
function
()
{
isChecke
=
!
isChecke
if
(
!
isChecke
)
{
$
(
'.rushNocheckTwo'
).
css
({
'display'
:
'none'
})
$
(
'.rushNocheck'
).
css
({
'display'
:
'inline-block'
})
}
else
{
$
(
'.rushNocheckTwo'
).
css
({
'display'
:
'inline-block'
})
$
(
'.rushNocheck'
).
css
({
'display'
:
'none'
})
}
})
//点击本次协议弹出窗
$
(
".benciXieyi"
).
click
(
function
(
e
)
{
e
.
stopPropagation
();
$
(
'.activeXieyi'
).
css
({
'display'
:
'block'
});
$
(
'.activeXieyi'
).
css
({
'display'
:
'block'
});
});
//关闭弹窗
$
(
'.readBtn'
).
click
(
function
(){
$
(
'.activeXieyi'
).
css
({
'display'
:
'none'
});
$
(
'.readBtn'
).
click
(
function
()
{
$
(
'.activeXieyi'
).
css
({
'display'
:
'none'
});
})
$
(
'.anniu'
).
click
(
function
()
{
if
(
!
isChecke
)
{
$
(
'.anniu'
).
click
(
function
()
{
if
(
!
isChecke
)
{
layer
.
msg
(
'请同意活动说明'
);
return
;
}
var
loadingFlag
;
if
(
platform
==
'app'
)
{
window
.
postMessage
(
JSON
.
stringify
({
'action'
:
'showHud'
,
'message'
:
'抢购中...'
}));
window
.
postMessage
(
JSON
.
stringify
({
'action'
:
'showHud'
,
'message'
:
'抢购中...'
}));
}
if
(
platform
==
'H5'
)
{
loadingFlag
=
layer
.
msg
(
'抢购中...'
,
{
icon
:
16
,
shade
:
0.01
,
shadeClose
:
false
,
time
:
60000
});
loadingFlag
=
layer
.
msg
(
'抢购中...'
,
{
icon
:
16
,
shade
:
0.01
,
shadeClose
:
false
,
time
:
60000
});
}
$
.
ajax
({
type
:
"POST"
,
...
...
@@ -277,9 +339,11 @@
productName
:
'印象之旅-200元线路产品优惠券'
}),
async
:
false
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
platform
==
'app'
)
{
window
.
postMessage
(
JSON
.
stringify
({
'action'
:
'dismissHud'
}));
window
.
postMessage
(
JSON
.
stringify
({
'action'
:
'dismissHud'
}));
}
if
(
platform
==
'H5'
)
{
layer
.
close
(
loadingFlag
);
...
...
@@ -297,12 +361,12 @@
'price'
:
res
.
data
.
preferPrice
,
'backType'
:
'reload'
,
'data'
:
res
.
data
,
'goBack'
:
'1'
,
'cardInfo'
:
{
title
:
RushbuyTime
.
title
,
date
:
RushbuyTime
.
RushbuyTime
,
userName
:
RushbuyTime
.
userName
,
shopName
:
RushbuyTime
.
shopName
,
'goBack'
:
'1'
,
'cardInfo'
:
{
title
:
RushbuyTime
.
title
,
date
:
RushbuyTime
.
RushbuyTime
,
userName
:
RushbuyTime
.
userName
,
shopName
:
RushbuyTime
.
shopName
,
}
}
}
...
...
@@ -317,7 +381,7 @@
data
.
sProductName
=
title
;
data
.
productId
=
res
.
data
.
couponId
;
data
.
dTotalPrice
=
res
.
data
.
preferPrice
;
wx
.
miniProgram
.
getEnv
(
function
(
res
)
{
wx
.
miniProgram
.
getEnv
(
function
(
res
)
{
window
.
wx
.
miniProgram
.
navigateTo
({
url
:
`/pages/Home/pay/pay?data=`
+
JSON
.
stringify
(
data
),
});
...
...
@@ -340,7 +404,10 @@
}
else
{
if
(
platform
==
'app'
)
{
window
.
postMessage
(
JSON
.
stringify
({
'action'
:
'showToast'
,
'message'
:
res
.
message
}));
window
.
postMessage
(
JSON
.
stringify
({
'action'
:
'showToast'
,
'message'
:
res
.
message
}));
}
else
{
layer
.
msg
(
res
.
message
)
}
...
...
@@ -350,10 +417,12 @@
}
},
error
:
function
(
res
)
{
error
:
function
(
res
)
{
console
.
log
(
platform
)
if
(
platform
==
'app'
)
{
window
.
postMessage
(
JSON
.
stringify
({
'action'
:
'dismissHud'
}));
window
.
postMessage
(
JSON
.
stringify
({
'action'
:
'dismissHud'
}));
}
else
if
(
platform
==
'H5'
)
{
layer
.
close
(
loadingFlag
);
}
...
...
@@ -362,4 +431,5 @@
})
</script>
</body>
</html>
\ No newline at end of file
js/mian.js
View file @
254ca491
let
locationName
=
window
.
location
.
hostname
;
function
getApiUrl
()
{
let
url
=
{
urlPost
:
"https://reborn.oytour.com/api/common/post"
,
...
...
@@ -9,10 +9,11 @@ function getApiUrl() {
}
return
url
}
String
.
prototype
.
myReplace
=
function
(
f
,
e
){
//时间格式化 苹果手机-替换为/
var
reg
=
new
RegExp
(
f
,
"g"
);
//创建正则RegExp对象
return
this
.
replace
(
reg
,
e
);
String
.
prototype
.
myReplace
=
function
(
f
,
e
)
{
//时间格式化 苹果手机-替换为/
var
reg
=
new
RegExp
(
f
,
"g"
);
//创建正则RegExp对象
return
this
.
replace
(
reg
,
e
);
}
function
getLocalStorage
()
{
var
localStorageData
=
window
.
localStorage
[
"userInfo"
];
if
(
localStorageData
!=
undefined
)
{
...
...
@@ -21,6 +22,7 @@ function getLocalStorage() {
return
null
;
}
}
function
getLocalStorage2
()
{
var
localStorageData
=
window
.
localStorage
[
"userInfo2"
];
if
(
localStorageData
!=
undefined
)
{
...
...
@@ -33,6 +35,7 @@ function getLocalStorage2() {
function
clearLocalStorage
()
{
window
.
localStorage
.
removeItem
(
'userInfo'
)
}
function
getAjaxData
(
cmd
,
msg
,
tk
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
...
...
@@ -55,6 +58,7 @@ function getAjaxData(cmd, msg, tk) {
}
return
JSON
.
stringify
(
postData
)
}
function
getJavaData
(
msg
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
...
...
@@ -64,7 +68,7 @@ function getJavaData(msg) {
let
key
=
""
;
if
(
getLocalStorage
()
!=
null
)
{
token
=
getLocalStorage
().
token
;
key
=
getLocalStorage
().
S
ecretKey
;
key
=
getLocalStorage
().
s
ecretKey
;
}
else
if
(
getLocalStorage2
()
!=
null
)
{
if
(
getLocalStorage2
()
!=
null
)
{
token
=
getLocalStorage2
().
token
;
...
...
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