Commit 865701c1b1c6414af52fdb7b689e242590cf4891
Merge branch 'perf/plateadmin/06-05' into 'main_dev'
perf: 角色为平台管理员,则不调用退出登录接口 See merge request yunteng/thingskit-front!1368
Showing
1 changed file
with
5 additions
and
1 deletions
| ... | ... | @@ -28,6 +28,7 @@ import { RouteRecordRaw } from 'vue-router'; | 
| 28 | 28 | import { PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic'; | 
| 29 | 29 | import { createLocalStorage } from '/@/utils/cache/index'; | 
| 30 | 30 | import { getEntitiesId } from '/@/api/dashboard/index'; | 
| 31 | +import { useRole } from '/@/hooks/business/useRole'; | |
| 31 | 32 | |
| 32 | 33 | interface PlatInfoType { | 
| 33 | 34 | id: string; | 
| ... | ... | @@ -283,7 +284,10 @@ export const useUserStore = defineStore({ | 
| 283 | 284 | title: t('sys.app.logoutTip'), | 
| 284 | 285 | content: t('sys.app.logoutMessage'), | 
| 285 | 286 | onOk: async () => { | 
| 286 | - await logoutApi(null, 'modal'); //新增退出登录接口 | |
| 287 | + const { isPlatformAdmin } = useRole(); | |
| 288 | + if (!isPlatformAdmin.value) { | |
| 289 | + await logoutApi(null, 'modal'); //新增退出登录接口 | |
| 290 | + } | |
| 287 | 291 | await this.logout(true); | 
| 288 | 292 | }, | 
| 289 | 293 | }); | ... | ... |