...
|
...
|
@@ -19,9 +19,7 @@ const plugin = { |
|
|
checkPurview() {
|
|
|
return Promise.resolve();
|
|
|
|
|
|
// let pUrl = `/${_.split(to.name, '.').join('/')}`;
|
|
|
|
|
|
// let pur = _.find(purviews, p => p.menu_url === pUrl);
|
|
|
// let pur = _.find(Vue.$purviews, p => p.menu_url === to.path);
|
|
|
|
|
|
// if (pur) {
|
|
|
// return Promise.resolve();
|
...
|
...
|
@@ -42,6 +40,8 @@ const plugin = { |
|
|
user = Rsa.decrypt(user, Object);
|
|
|
return this.initPurview(Vue, user).then(() => {
|
|
|
next();
|
|
|
}, () => {
|
|
|
next();
|
|
|
});
|
|
|
}
|
|
|
next();
|
...
|
...
|
@@ -65,7 +65,7 @@ const plugin = { |
|
|
return next('/login.html');
|
|
|
}
|
|
|
|
|
|
return this.checkPurview(Vue.$purviews, to).then(() => {
|
|
|
return this.checkPurview(Vue, to).then(() => {
|
|
|
return next();
|
|
|
}, () => {
|
|
|
return next('/401.html');
|
...
|
...
|
|