Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-operation-4
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
达摩4.0重构
haoban-operation-4
Commits
44bfd2ad
Commit
44bfd2ad
authored
Aug 14, 2020
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:调整登录流程
parent
f5a44b6d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
11 deletions
+24
-11
index.js
src/api/index.js
+10
-2
yw-header.vue
src/layout/yw-header.vue
+14
-9
No files found.
src/api/index.js
View file @
44bfd2ad
...
...
@@ -6,7 +6,15 @@ let api = {
// 登出
getLoginOut
:
'/logout'
}
let
api1
=
{
isLogin
:
{
url
:
'/login'
,
useIntercept
:
false
}
}
api
=
getFetch
(
api
,
'/gic-operation-web'
);
api1
=
getFetch
(
api1
,
'/hb-manage-operation-web'
)
export
default
api
;
\ No newline at end of file
export
default
{
...
api
,
...
api1
};
\ No newline at end of file
src/layout/yw-header.vue
View file @
44bfd2ad
...
...
@@ -37,9 +37,9 @@
</
template
>
<
script
>
import
{
origin
}
from
'@/config'
import
{
origin
,
succCode
}
from
'@/config'
import
fetch
from
'@/api'
;
const
{
getUserInfo
,
getLoginOut
}
=
fetch
;
const
{
getUserInfo
,
getLoginOut
,
isLogin
}
=
fetch
;
export
default
{
name
:
'ywHeader'
,
data
()
{
...
...
@@ -55,13 +55,18 @@ export default {
methods
:
{
// 获取用户信息
getUserInfo
()
{
getUserInfo
().
then
(
res
=>
{
const
result
=
res
.
result
||
{};
this
.
userInfo
=
Object
.
assign
({},
result
);
this
.
$emit
(
'updateAsideMenu'
,
result
.
menuTree
||
[]);
}).
catch
(
e
=>
{
// 登录异常时需要跳转到这个地址重新授权
window
.
location
.
href
=
`
${
origin
}
/hb-manage-operation-web/authcenter`
;
isLogin
().
then
(
res
=>
{
if
(
res
.
code
!=
succCode
)
{
window
.
location
.
href
=
`
${
origin
}
/hb-manage-operation-web/authcenter`
;
return
;
}
getUserInfo
().
then
(
res
=>
{
const
result
=
res
.
result
||
{};
this
.
userInfo
=
Object
.
assign
({},
result
);
this
.
$emit
(
'updateAsideMenu'
,
result
.
menuTree
||
[]);
}).
catch
(
e
=>
{
window
.
location
.
reload
();
})
})
},
// 退出登录
...
...
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