Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohoblk-wap
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
沈志敏
9 years ago
Commit
1b17ae2d9996c5341dfd4a7abea582bbf1c4942e
1 parent
4c402d4d
修改代码
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
13 deletions
public/js/common/intercept-click.js
public/js/common/intercept-click.js
View file @
1b17ae2
...
...
@@ -96,11 +96,10 @@ const defaultTitleMap = {
}
};
const
matchHeader
=
(
url
,
titleMap
)
=>
{
const
matchHeader
=
(
path
,
qs
,
titleMap
)
=>
{
let
header
=
{
headerid
:
'-1'
};
let
path
=
url
.
split
(
'?'
)[
0
];
if
(
/
\/
cate-all$/
.
test
(
path
))
{
header
=
titleMap
[
1
];
...
...
@@ -116,16 +115,14 @@ const matchHeader = (url, titleMap) => {
if
(
/
\/
me
\/
order$/
.
test
(
path
))
{
let
des
=
''
;
let
u
=
url
.
split
(
'?'
)[
1
];
u
=
parse
(
u
);
if
(
u
.
type
===
'1'
)
{
if
(
qs
.
type
===
'1'
)
{
des
=
'我的订单'
;
}
else
if
(
u
.
type
===
'2'
)
{
}
else
if
(
qs
.
type
===
'2'
)
{
des
=
'待付款'
;
}
else
if
(
u
.
type
===
'3'
)
{
}
else
if
(
qs
.
type
===
'3'
)
{
des
=
'待发货'
;
}
else
if
(
u
.
type
===
'4'
)
{
}
else
if
(
qs
.
type
===
'4'
)
{
des
=
'待收货'
;
}
header
=
titleMap
[
1
];
...
...
@@ -183,11 +180,8 @@ const matchHeader = (url, titleMap) => {
}
if
(
/
\/
me
\/
help-detail$/
.
test
(
path
))
{
let
u
=
url
.
split
(
'?'
)[
1
];
u
=
parse
(
u
);
header
=
titleMap
[
1
];
header
.
title
.
des
=
u
.
title
;
// 帮助中心详细
header
.
title
.
des
=
qs
.
title
;
// 帮助中心详细
return
header
;
}
...
...
@@ -267,7 +261,7 @@ const intercept = (url) => {
}
yoho
.
goNewPage
({
header
:
matchHeader
(
url
,
titleMap
),
header
:
matchHeader
(
path
,
qs
,
titleMap
),
url
:
/^
(
https
?
:
)?\/\/
/i
.
test
(
url
)
?
url
:
origin
+
url
});
}
else
{
...
...
Please
register
or
login
to post a comment