no message

Former-commit-id: 8329299ce85ce8b02f8656e7daa01ee0a4de5cc0 [formerly 8329299ce85ce8b02f8656e7daa01ee0a4de5cc0 [formerly 8329299ce85ce8b02f8656e7daa01ee0a4de5cc0 [formerly 8329299ce85ce8b02f8656e7daa01ee0a4de5cc0 [formerly 10ea0c6299417071a6f8d8ec3c8cb6db5dee87ff [formerly 0f552a7a4f3aa7b8052c148ffa46b7491123f877]]]]]
Former-commit-id: a5f542a0187ef215bf13a1134987cf6f172c48fb
Former-commit-id: befa7739ad2736a0545f574fc29924c2a3cae1d9
Former-commit-id: 85a924b44eed00c21cc76ac48760fc215676ae6e [formerly 39e8b7ca24567f93fdcc19f6320e3225a71b6e24]
Former-commit-id: 286b66a0e8d0484d9b05579f3160aa96fb068ce9
Former-commit-id: eae45a26c22185d3f266b37fe8b851917754f145
Former-commit-id: 296c72114af3d5fe565180a345df71e642cd46ed
Former-commit-id: aaf65a706338f0d3638a461b364d19fb15a2c7d8
Former-commit-id: 750c6c0ea619b9881b88e691c4f6db2c6bbfe56e
This commit is contained in:
liyang
2018-06-16 19:19:08 +08:00
parent a837173b5f
commit 7aaf5ccce7

View File

@@ -116,8 +116,8 @@ const routes = [
let router = new VueRouter({ routes }) let router = new VueRouter({ routes })
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
// 需要身份校 // 验证当前路由所有的匹配中是否需要有登陆验证的
if (to.meta.requiresAuth) { if (to.matched.some(r => r.meta.requiresAuth)) {
// 这里暂时将cookie里是否存有token作为验证是否登陆的条件 // 这里暂时将cookie里是否存有token作为验证是否登陆的条件
// 请根据自身业务需要修改 // 请根据自身业务需要修改
if (Cookies.get('token')) { if (Cookies.get('token')) {