|
@@ -57,9 +57,10 @@ let overallExample = new Vue({
|
|
|
template: '<App/>',
|
|
|
|
|
|
})
|
|
|
-
|
|
|
+const whiteList = ['/Login']
|
|
|
router.beforeEach((to, from, next) => {
|
|
|
- if (to.matched.some(record => record.meta.needLogin)) {
|
|
|
+
|
|
|
+ if (!whiteList.includes(to.path)) {
|
|
|
console.log('有登录权限')
|
|
|
|
|
|
if (!localStorage.getItem('userId')) {
|