Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
back-own
Overview
Overview
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
office
back-own
Commits
f7af32cb
Commit
f7af32cb
authored
Aug 09, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 退出登录跳转到运维后台的登录页
parent
52a7184a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
13 deletions
+5
-13
api.js
src/api/api.js
+4
-12
vue-office-header.vue
src/components/vue-office-header.vue
+1
-1
No files found.
src/api/api.js
View file @
f7af32cb
...
...
@@ -56,17 +56,9 @@ Vue.axios.interceptors.response.use(
data
=>
{
removePending
(
data
.
config
);
//在一个ajax响应后再执行一下取消操作,把已经完成的请求从pending中移除
// console.log(data);
if
(
data
.
status
&&
data
.
status
==
200
&&
data
.
data
.
errorCode
!=
1
)
{
// Message.error({message: data.data.message});
if
(
data
.
data
.
errorCode
==
4
)
{
if
(
window
.
location
.
href
.
indexOf
(
'gic-error'
)
!=
-
1
)
{
return
false
;
}
// window.location.href = local + '/haoban-3/#/login';
}
if
(
data
.
data
.
errorCode
==
10
||
data
.
data
.
errorCode
==
7
)
{
// window.location.href = local + '/haoban-3/#/index';
if
(
data
.
status
&&
data
.
status
==
200
&&
data
.
data
.
code
!=
1
)
{
if
(
data
.
data
.
code
==
'401'
)
{
window
.
location
.
href
=
local
+
'/operation-platform/#/login'
;
}
return
data
;
}
...
...
@@ -89,7 +81,7 @@ Vue.axios.interceptors.response.use(
// window.location.href= local + "/haoban-3/#/login"
// Message.error({message: '权限不足,请联系管理员!'});
}
else
{
// window.location.href = local + '/haoban-3
/#/login';
window
.
location
.
href
=
local
+
'/operation-platform
/#/login'
;
Message
.
error
({
message
:
'登录失效!'
});
}
return
Promise
.
resolve
(
err
);
...
...
src/components/vue-office-header.vue
View file @
f7af32cb
...
...
@@ -204,7 +204,7 @@ export default {
type
:
'success'
});
// 跳转登录页
window
.
location
.
href
=
window
.
location
.
origin
+
'/
haoban-3
/#/login'
;
window
.
location
.
href
=
window
.
location
.
origin
+
'/
operation-platform
/#/login'
;
return
;
}
that
.
$message
.
error
({
...
...
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