Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pc
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
wbx-PCAndMobi
pc
Commits
c16b48eb
Commit
c16b48eb
authored
Jul 07, 2021
by
levante
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
5fb9ccdc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
264 deletions
+15
-264
index.vue
src/components/Layout/index.vue
+2
-3
index.js
src/router/index.js
+13
-0
routes.js
src/router/routes.js
+0
-261
No files found.
src/components/Layout/index.vue
View file @
c16b48eb
...
@@ -24,17 +24,16 @@
...
@@ -24,17 +24,16 @@
</div>
</div>
<div>
<div>
<!--
<a-badge
:count=
"0"
showZero
><a><a-icon
type=
"bell"
/></a></a-badge>
-->
<!--
<a-badge
:count=
"0"
showZero
><a><a-icon
type=
"bell"
/></a></a-badge>
-->
<
!--
<
a-dropdown
class=
"navdropmenu"
style=
"margin-right:20px;"
>
<a-dropdown
class=
"navdropmenu"
style=
"margin-right:20px;"
>
<span>
<span>
<a-icon
type=
"user"
/>
<a-icon
type=
"user"
/>
<span
class=
"name"
>
{{
username
}}
</span>
<span
class=
"name"
>
{{
username
}}
</span>
<a-icon
type=
"down"
/>
<a-icon
type=
"down"
/>
</span>
</span>
<a-menu
slot=
"overlay"
@
click=
"handleClick"
>
<a-menu
slot=
"overlay"
@
click=
"handleClick"
>
<a-menu-item
key=
"changePwd"
@
click=
"showChangePwdModal"
>
修改密码
</a-menu-item>
<a-menu-item
key=
"2"
>
退出登录
</a-menu-item>
<a-menu-item
key=
"2"
>
退出登录
</a-menu-item>
</a-menu>
</a-menu>
</a-dropdown>
-->
</a-dropdown>
</div>
</div>
</a-layout-header>
</a-layout-header>
<a-layout-content
class=
"layout-content"
>
<a-layout-content
class=
"layout-content"
>
...
...
src/router/index.js
View file @
c16b48eb
...
@@ -12,4 +12,17 @@ const router = new Router({
...
@@ -12,4 +12,17 @@ const router = new Router({
routes
,
routes
,
})
})
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
// TODO
store
.
commit
(
'setWebviewSrc'
,
to
.
meta
&&
to
.
meta
.
src
)
// 判断有src的话为需要嵌入iframe的子项目
const
token
=
Cookie
.
get
(
'token'
)
// 当前无token且不在login页面则推到登录页面
if
(
to
.
path
!=
'/login'
&&
!
token
)
{
next
(
'/login'
)
}
else
{
next
()
}
})
export
default
router
export
default
router
src/router/routes.js
View file @
c16b48eb
This diff is collapsed.
Click to expand it.
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