Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
techbook
Project
Project
Details
Activity
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
front-end-dev
techbook
Commits
10cd880f
Commit
10cd880f
authored
Sep 25, 2020
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交退出登录
parent
3c86cabc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
api.js
src/api/api.js
+2
-2
public.js
src/assets/js/public.js
+2
-2
No files found.
src/api/api.js
View file @
10cd880f
...
...
@@ -41,7 +41,7 @@ export default {
i18n
,
isToWhich
(
data
){
// publicFunc.clearCookie();
if
(
data
!=
998
)
this
.
publicFun
.
delCookie
();
if
(
data
!=
998
)
publicFun
.
delCookie
();
isMobile
?
router
.
replace
(
"/mobileLogin"
)
:
router
.
replace
(
"/login"
);
},
...
...
@@ -89,7 +89,7 @@ export default {
}
else
if
(
data
==
998
||
data
==
996
){
if
(
data
==
998
&&
publicFun
.
getUserInfoCookieType
()){
this
.
publicFun
.
removeCookieType
();
publicFun
.
removeCookieType
();
}
window
.
sessionStorage
.
setItem
(
"errorMsg"
,
response
.
data
.
msg
);
if
(
isMobile
){
...
...
src/assets/js/public.js
View file @
10cd880f
...
...
@@ -192,10 +192,10 @@ export default {
//清除所有cookie
// ***谨慎使用 涉及到用户唯一id标识
delCookie
()
{
var
keys
=
document
.
cookie
.
match
(
/
[^
=;
]
+
(?=
=
)
/g
),
language
,
type
=
navigator
.
appName
,
that
=
this
;
var
keys
=
document
.
cookie
.
match
(
/
[^
=;
]
+
(?=
=
)
/g
),
language
,
type
=
navigator
.
appName
,
that
=
this
,
userValue
=
that
.
judgeBrand
()
+
"userInfo"
;
if
(
keys
)
{
for
(
var
i
=
keys
.
length
;
i
--
;)
{
if
(
keys
[
i
]
==
that
.
judgeBrand
()
+
"userInfo"
){
if
(
keys
[
i
]
==
userValue
){
}
else
{
document
.
cookie
=
keys
[
i
]
+
'=0;path=/;expires='
+
new
Date
(
0
).
toUTCString
()
// 清除当前域名下的,例如:m.ratingdog.cn
...
...
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