Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
group-buy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
group-buy-ui
Commits
9c17f0b7
Commit
9c17f0b7
authored
Sep 26, 2021
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
59bcf45a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
+4
-13
init.service.js
src/service/init.service.js
+4
-13
No files found.
src/service/init.service.js
View file @
9c17f0b7
...
@@ -14,27 +14,18 @@ export default {
...
@@ -14,27 +14,18 @@ export default {
const
{
meta
}
=
to
;
const
{
meta
}
=
to
;
isWechat
&&
localStorage
.
set
(
'
vccChannel
'
,
'
159913
'
);
isWechat
&&
localStorage
.
set
(
'
vccChannel
'
,
'
159913
'
);
meta
?.
has
?.
header
&&
store
.
commit
(
'
CHANGE_HEADER
'
,
meta
.
has
.
header
);
// 改变header
meta
?.
has
?.
header
&&
store
.
commit
(
'
CHANGE_HEADER
'
,
meta
.
has
.
header
);
// 改变header
const
localParams
=
[
'
token
'
,
'
redirectUrl
'
];
const
localParams
=
[
'
token
'
,
'
redirectUrl
'
,
'
h
'
,
'
vccToken
'
,
'
vccChannel
'
,
'
sonVccChannel
'
];
const
cookieParams
=
[
'
h
'
,
'
vccToken
'
,
'
vccChannel
'
,
'
sonVccChannel
'
];
// TODO: 类似逻辑可以整合
// TODO: 类似逻辑可以整合
localParams
.
forEach
(
item
=>
{
localParams
.
forEach
(
item
=>
{
const
value
=
to
.
query
[
item
];
const
value
=
to
.
query
[
item
];
if
(
item
===
'
token
'
&&
value
===
''
)
{
if
(
item
===
'
token
'
&&
value
===
''
)
{
localStorage
.
remove
(
'
token
'
);
localStorage
.
remove
(
'
token
'
);
}
}
if
(
value
&&
value
!==
'
{token}
'
&&
value
!==
'
{vccToken}
'
)
{
localStorage
.
set
(
item
,
value
);
}
});
Cookies
.
remove
(
'
ka
'
);
Cookies
.
remove
(
'
sonVccChannel
'
);
cookieParams
.
forEach
(
item
=>
{
const
value
=
to
.
query
[
item
];
if
(
item
===
'
vccToken
'
&&
value
===
''
)
{
if
(
item
===
'
vccToken
'
&&
value
===
''
)
{
Cookies
.
remove
(
'
vccToken
'
);
localStorage
.
remove
(
'
vccToken
'
);
}
}
if
(
value
&&
value
!==
'
{
vccToken}
'
&&
value
!==
'
{t
oken}
'
)
{
if
(
value
&&
value
!==
'
{
token}
'
&&
value
!==
'
{vccT
oken}
'
)
{
Cookies
.
set
(
item
,
value
);
localStorage
.
set
(
item
,
value
);
}
}
});
});
...
...
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