Skip to content
This repository was archived by the owner on May 12, 2020. It is now read-only.

Commit c5f8982

Browse files
committed
feat(route): use public route to replace common route
1 parent 3f8fb79 commit c5f8982

4 files changed

Lines changed: 27 additions & 23 deletions

File tree

src/pages/Common/User.vue

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/pages/Public/Anyone/index.vue

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<template functional>
2+
<div class="anyone">
3+
<h3>This route is public without any user access verification.</h3>
4+
<p>
5+
Current route is
6+
<strong>{{ parent.$route.path }}</strong>
7+
</p>
8+
</div>
9+
</template>
10+
11+
<script>
12+
export default {
13+
name: 'PublicAnyone'
14+
}
15+
</script>
16+
17+
<style lang="sass" scoped>
18+
.anyone
19+
+flex-center
20+
height: 100%
21+
</style>

src/router/components/constant-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default [
44
'pages/Home',
55
'pages/Admin/Dashboard',
66
'pages/Admin/Table',
7-
'pages/Common/User',
7+
'pages/Public/Anyone',
88
'pages/Login',
99
'pages/Error/NotFound',
1010
'pages/Error/Unauthorized',

src/router/routes/public.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,18 @@ export default [
6666
]
6767
},
6868
{
69-
path: '/common',
69+
path: '/public',
7070
component: plainExport,
7171
meta: {
72-
title: 'Common',
72+
title: 'Public',
7373
icon: 'el-icon-s-promotion'
7474
},
7575
children: [
7676
{
77-
path: 'user',
78-
component: constantComponents.pagesCommonUser,
77+
path: 'anyone',
78+
component: constantComponents.pagesPublicAnyone,
7979
meta: {
80-
title: 'User'
80+
title: 'Anyone'
8181
}
8282
}
8383
]

0 commit comments

Comments
 (0)