Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhang Xiaojie
fns_backend
Commits
ce4130ad
Commit
ce4130ad
authored
Sep 25, 2021
by
xhx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
layout
parent
88e907e3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
3 deletions
+36
-3
avatar.png
src/assets/images/avatar.png
+0
-0
index.ts
src/service/UserManagementService/index.ts
+1
-1
index.vue
src/views/Root/index.vue
+35
-2
No files found.
src/assets/images/avatar.png
0 → 100644
View file @
ce4130ad
5.94 KB
src/service/UserManagementService/index.ts
View file @
ce4130ad
...
...
@@ -44,7 +44,7 @@ export default class UserService {
*/
logout
()
{
return
baseAxios
({
url
:
'/log
in
'
,
url
:
'/log
out
'
,
method
:
'get'
,
})
}
...
...
src/views/Root/index.vue
View file @
ce4130ad
<
template
>
<div>
<a-layout
id=
"components-layout-demo-fixed-sider"
>
<a-layout-header>
sdlkfj
</a-layout-header>
<a-layout-header>
<div
class=
"flex justify-between items-center h-full"
>
<div
class=
"text-center text-lg my-3"
>
中小企业协会综合服务平台
</div>
<div>
<!--
<a-popover>
-->
<!--
<template
slot=
"content"
>
<p>
退出账户
</p>
</
template
>
-->
<div
class=
"flex justify-between items-center"
>
<img
class=
"w-5 h-7 mr-3"
src=
"@/assets/images/avatar.png"
alt=
"头像"
>
{{ phone }}
<span
class=
"inline-block ml-3 cursor-pointer"
@
click=
"logout"
>
退出
</span>
</div>
<!-- </a-popover> -->
</div>
</div>
</a-layout-header>
<a-layout
style=
"min-height: 100vh"
>
<a-layout-sider
width=
"256"
style=
"background: white"
>
<div
class=
"text-center text-lg my-3"
>
中小企业协会综合服务平台
</div>
<a-menu
style=
"width: 256px"
:open-keys
.
sync=
"openKeys"
...
...
@@ -60,11 +75,14 @@ import { iMenuItem, iMenuList } from "./types";
import
{
Fragment
}
from
"vue-fragment"
;
import
{
getUserMsg
}
from
"@/utils/userMsg/userMsg"
;
import
{
getOldRoleFromUserMsg
}
from
"@/utils/user"
;
import
UserService
from
'@/service/UserManagementService'
Vue
.
use
(
Menu
);
Vue
.
use
(
Icon
);
Vue
.
use
(
Layout
);
const
userService
=
new
UserService
()
export
default
Vue
.
extend
({
components
:
{
Fragment
,
...
...
@@ -94,6 +112,9 @@ export default Vue.extend({
selectedKeys
():
Array
<
String
>
{
return
[(
this
.
$route
.
meta
as
{
selectedName
:
string
}).
selectedName
];
},
phone
()
{
return
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'USER_MSG'
)
as
any
).
phone
}
},
methods
:
{
getMenuChildren
(
menu
:
iMenuItem
)
{
...
...
@@ -122,6 +143,14 @@ export default Vue.extend({
hasChildren
(
menu
:
iMenuItem
)
{
return
menu
.
children
&&
menu
.
children
.
length
!==
0
;
},
logout
()
{
userService
.
logout
().
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
window
.
localStorage
.
clear
()
this
.
$router
.
push
(
'/login'
)
}
})
}
},
});
</
script
>
...
...
@@ -130,4 +159,7 @@ export default Vue.extend({
/deep/a {
color: #1890ff;
}
/deep/ .ant-layout-header {
background: #fff;
}
</
style
>
\ No newline at end of file
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