| | |
| | | GetMenu({ commit, dispatch }, tenantId) { |
| | | const errLogOut = () => { |
| | | dispatch('LogOut').then(()=>{ |
| | | const env = import.meta.env.VITE_APP_ENV |
| | | const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL |
| | | env === 'development' |
| | | ? window.location.href = "/manage/login" |
| | | : window.location.replace(`${adminUrl}#/login`) |
| | | window.location.href = "/drone-command/login" |
| | | // env === 'development' |
| | | // ? window.location.href = "/drone-command/login" |
| | | // : window.location.replace(`${adminUrl}#/login`) |
| | | }) |
| | | } |
| | | return new Promise(resolve => { |
| | |
| | | const data = res.data.data; |
| | | let menu = deepClone(data); |
| | | if (!res.data?.data?.length){ |
| | | ElMessage.warning('当前角色没有配置菜单,请联系管理员配置') |
| | | errLogOut() |
| | | return |
| | | } |