-
使用专项价
diff --git a/src/router/index.js b/src/router/index.js
index 08a9af9..d862bb1 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -290,10 +290,30 @@ let router = new Router({
// 使用 router.beforeEach 注册一个全局前置守卫,判断用户是否登陆
router.beforeEach((to, from, next) => {
+ let userInfo = local.getUserByCache()
+ if(userInfo != null){
+ $.ajax({
+ type: 'GET',
+ url: 'http://juip.wyk/api/Allow/urlCheck',
+ dataType: "json",
+ contentType: "application/json",
+ data: {'url':to.fullPath,'id':userInfo.Manager.ID},
+ success: function (res) {
+ if(res.Code == -10000){
+ router.replace({
+ path: '/login',
+ query: {
+ redirect: router.currentRoute.fullPath
+ }
+ })
+ }
+ }
+ });
+ }
if (to.path === '/login' || to.path === '/' || to.path === '/r') {
next()
} else {
- let userInfo = local.getUserByCache()// localStorage.getItem('etorcurrentuser');
+ // localStorage.getItem('etorcurrentuser');
if (!userInfo || userInfo === '') {
router.replace({
path: '/login',