Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
h5
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8682392f
authored
Aug 01, 2019
by
肖康
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'XK_carB20190624' into Development
parents
809d9306
a53f6338
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
3 deletions
public/index.html
src/views/home/Index.vue
view/5.js
view/index.html
public/index.html
View file @
8682392f
...
...
@@ -55,10 +55,44 @@
var
cval
=
getCookie
(
name
);
if
(
cval
!=
null
)
document
.
cookie
=
name
+
"="
+
cval
+
";expires="
+
exp
.
toGMTString
();
}
//标准获取地址栏参数,不乱码
function
GetRequest
(
value
)
{
//url例子:www.bicycle.com?id="123456"&Name="bicycle";
if
(
window
.
location
.
pathname
==
"/s/"
)
{
var
url
=
location
.
search
//?id="123456"&Name="bicycle";
}
else
{
var
url
=
decodeURI
(
location
.
search
);
//?id="123456"&Name="bicycle";
}
var
url_t
=
decodeURI
(
location
.
href
),
url
=
""
;
if
(
url_t
.
indexOf
(
"?"
)
!=-
1
){
url
=
"?"
+
url_t
.
split
(
"?"
)[
1
];
}
var
object
=
{};
if
(
url
.
indexOf
(
"?"
)
!=
-
1
)
//url中存在问号,也就说有参数。
{
var
str
=
url
.
substr
(
1
);
//得到?后面的字符串
var
strs
=
str
.
split
(
"&"
);
//将得到的参数分隔成数组[id="123456",Name="bicycle"];
for
(
var
i
=
0
;
i
<
strs
.
length
;
i
++
)
{
object
[
strs
[
i
].
split
(
"="
)[
0
]]
=
strs
[
i
].
split
(
"="
)[
1
]
}
}
return
object
[
value
];
}
var
cookiex
=
getCookie
(
"Yo4teW_csrf"
)
||
""
,
csrf
=
"csrf"
;
var
cookieHostname
=
window
.
location
.
hostname
.
split
(
"."
)[
1
]
+
"."
+
window
.
location
.
hostname
.
split
(
"."
)[
2
];
//adtag写进cookie
if
(
GetRequest
(
"adtag"
)){
SetCookie
(
"adtag"
,
GetRequest
(
"adtag"
),
1
,
cookieHostname
)
}
else
{
if
(
GetRequest
(
"ADTAG"
)){
SetCookie
(
"adtag"
,
GetRequest
(
"ADTAG"
),
1
,
cookieHostname
)
}
if
(
GetRequest
(
"utm_source"
))
{
SetCookie
(
"adtag"
,
GetRequest
(
"utm_source"
),
1
,
cookieHostname
)
}
}
var
browser
=
{
versions
:
function
()
{
var
u
=
navigator
.
userAgent
,
app
=
navigator
.
appVersion
;
...
...
src/views/home/Index.vue
View file @
8682392f
...
...
@@ -60,7 +60,7 @@
<span
class=
"t2"
>
{{
item
.
ad_words
}}
</span>
</div>
<template
v-if=
"item.link_words"
>
<a
class=
"r"
:href=
"item.url
+'?ptag='+ptag+'-floor'+(count * 1 +1)
"
@
click=
"recordFloorFn(ptag+'-floor'+(count * 1 +1))"
>
<a
class=
"r"
:href=
"item.url"
@
click=
"recordFloorFn(ptag+'-floor'+(count * 1 +1))"
>
<span>
{{
item
.
link_words
}}
</span>
<i
class=
"lineBlock"
></i>
</a>
...
...
view/5.js
View file @
8682392f
This diff could not be displayed because it is too large.
view/index.html
View file @
8682392f
...
...
@@ -55,10 +55,44 @@
var
cval
=
getCookie
(
name
);
if
(
cval
!=
null
)
document
.
cookie
=
name
+
"="
+
cval
+
";expires="
+
exp
.
toGMTString
();
}
//标准获取地址栏参数,不乱码
function
GetRequest
(
value
)
{
//url例子:www.bicycle.com?id="123456"&Name="bicycle";
if
(
window
.
location
.
pathname
==
"/s/"
)
{
var
url
=
location
.
search
//?id="123456"&Name="bicycle";
}
else
{
var
url
=
decodeURI
(
location
.
search
);
//?id="123456"&Name="bicycle";
}
var
url_t
=
decodeURI
(
location
.
href
),
url
=
""
;
if
(
url_t
.
indexOf
(
"?"
)
!=-
1
){
url
=
"?"
+
url_t
.
split
(
"?"
)[
1
];
}
var
object
=
{};
if
(
url
.
indexOf
(
"?"
)
!=
-
1
)
//url中存在问号,也就说有参数。
{
var
str
=
url
.
substr
(
1
);
//得到?后面的字符串
var
strs
=
str
.
split
(
"&"
);
//将得到的参数分隔成数组[id="123456",Name="bicycle"];
for
(
var
i
=
0
;
i
<
strs
.
length
;
i
++
)
{
object
[
strs
[
i
].
split
(
"="
)[
0
]]
=
strs
[
i
].
split
(
"="
)[
1
]
}
}
return
object
[
value
];
}
var
cookiex
=
getCookie
(
"Yo4teW_csrf"
)
||
""
,
csrf
=
"csrf"
;
var
cookieHostname
=
window
.
location
.
hostname
.
split
(
"."
)[
1
]
+
"."
+
window
.
location
.
hostname
.
split
(
"."
)[
2
];
//adtag写进cookie
if
(
GetRequest
(
"adtag"
)){
SetCookie
(
"adtag"
,
GetRequest
(
"adtag"
),
1
,
cookieHostname
)
}
else
{
if
(
GetRequest
(
"ADTAG"
)){
SetCookie
(
"adtag"
,
GetRequest
(
"ADTAG"
),
1
,
cookieHostname
)
}
if
(
GetRequest
(
"utm_source"
))
{
SetCookie
(
"adtag"
,
GetRequest
(
"utm_source"
),
1
,
cookieHostname
)
}
}
var
browser
=
{
versions
:
function
()
{
var
u
=
navigator
.
userAgent
,
app
=
navigator
.
appVersion
;
...
...
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