Skip to content

Commit

Permalink
remove about
Browse files Browse the repository at this point in the history
  • Loading branch information
luoyunchong committed Apr 22, 2024
1 parent 48dff89 commit 7b83e7b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 595 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.4.3",
"license": "MIT",
"scripts": {
"dev": "vue-cli-service serve",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit",
Expand Down
4 changes: 2 additions & 2 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ router.beforeEach((to, from, next) => {
// 权限验证
if (store?.state && store?.getters) {
const { permissions, user } = store.getters
if (to.path !== '/about' && !Util.hasPermission(permissions, to.meta, user)) {
if (!Util.hasPermission(permissions, to.meta, user)) {
ElMessage.error('您无此页面的权限哟')
next({ path: '/about' })
next({ path: '/login' })
return
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/store/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export default {
},

sidebarLevel: appConfig.sidebarLevel || 3,
defaultRoute: appConfig.defaultRoute || '/about',
defaultRoute: appConfig.defaultRoute || '/login',
}
Loading

0 comments on commit 7b83e7b

Please sign in to comment.