|
@@ -105,7 +105,21 @@ export default {
|
|
|
this.loading = false;
|
|
|
//获取权限菜单
|
|
|
menu.getMenu().then( () =>{
|
|
|
- this.$router.push(this.redirect || '/');
|
|
|
+ const routes = JSON.parse(sessionStorage.getItem('route'))
|
|
|
+ let bSwitch = 0
|
|
|
+ for(let i=0; i<routes.length; i++) {
|
|
|
+ if(routes[i].path === '/hospital-search') {
|
|
|
+ bSwitch = 1
|
|
|
+ break
|
|
|
+ } else {
|
|
|
+ bSwitch = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (bSwitch) {
|
|
|
+ this.$router.push({ path: '/hospital-search'});
|
|
|
+ } else {
|
|
|
+ this.$router.push(this.redirect || '/');
|
|
|
+ }
|
|
|
}).catch(() => {
|
|
|
this.$message.error('获取导航菜单失败!');
|
|
|
})
|