is-mobile页面
Former-commit-id: c859c0a360ad0d23b45c479e4d9e39edbca03cf8 [formerly c859c0a360ad0d23b45c479e4d9e39edbca03cf8 [formerly c859c0a360ad0d23b45c479e4d9e39edbca03cf8 [formerly c859c0a360ad0d23b45c479e4d9e39edbca03cf8 [formerly e67ff51ddc4498da1d45a5ed1b29a006e284ca9e [formerly 0847d1f0e60a9992c4e4457d35eff0d981c0e79e]]]]] Former-commit-id: 4bbc804527be8d0b049558d616926d107964d630 Former-commit-id: 0aa8a6c02f2474fe40761b65e958b6a862a809b0 Former-commit-id: b4aa260b2fc851f1411723a10980ec8eeb8812a1 [formerly ea0cd16fec9ecf1f5d8ae5fef8371f858a53f4a2] Former-commit-id: 14f651f5bdeeeee713f9fabfd1cd94836c7ff1b1 Former-commit-id: 4ad96fab15f02793f4727c5f047679cf90d5c7f4 Former-commit-id: 2958b0c9a6e039c6aeb9888a250428559e91171c Former-commit-id: 1ae356951e27fc2a841da0028f5fe08f89d2eb58 Former-commit-id: a25fa4db9e8516374c6379e67a331e0903985d8e
This commit is contained in:
@@ -16,6 +16,11 @@ let router = new VueRouter({ routes })
|
||||
* 权限验证
|
||||
*/
|
||||
router.beforeEach((to, from, next) => {
|
||||
// 禁止手机访问
|
||||
if (to.name !== 'is-mobile' && util.isMobile()) {
|
||||
next({ name: 'is-mobile' })
|
||||
return
|
||||
}
|
||||
// 验证当前路由所有的匹配中是否需要有登陆验证的
|
||||
if (to.matched.some(r => r.meta.requiresAuth)) {
|
||||
// 这里暂时将cookie里是否存有token作为验证是否登陆的条件
|
||||
|
||||
@@ -1 +1 @@
|
||||
b48413cb8c217f7ecaf10be1313caa442cffe91b
|
||||
51bf6b20922ac42bc614d4dafc3928f2f9017796
|
||||
Reference in New Issue
Block a user