修改获取菜单时判断管理员的条件
Showing
2 changed files
with
3 additions
and
3 deletions
| ... | @@ -26,10 +26,10 @@ export const refreshToken = (params) => { | ... | @@ -26,10 +26,10 @@ export const refreshToken = (params) => { |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | /** 获取登录人员的菜单 */ | 28 | /** 获取登录人员的菜单 */ |
| 29 | export const getSystemMenu = (params, isAdmin) => { | 29 | export const getSystemMenu = (params, isAdmin = false) => { |
| 30 | return request({ | 30 | return request({ |
| 31 | url: | 31 | url: |
| 32 | isAdmin == "Y" | 32 | isAdmin |
| 33 | ? `${ | 33 | ? `${ |
| 34 | import.meta.env.VITE_APP_AUTH_URL | 34 | import.meta.env.VITE_APP_AUTH_URL |
| 35 | }/product-menu-permission/tenant/get-product-menu?tenantGuid=${params.tenantGuid}&platformSystemGuid=32774fcfdf5e43e8b866660374d8bced` | 35 | }/product-menu-permission/tenant/get-product-menu?tenantGuid=${params.tenantGuid}&platformSystemGuid=32774fcfdf5e43e8b866660374d8bced` | ... | ... |
| ... | @@ -60,7 +60,7 @@ const useUserStore = defineStore( | ... | @@ -60,7 +60,7 @@ const useUserStore = defineStore( |
| 60 | userName.value = res.data.staffName; | 60 | userName.value = res.data.staffName; |
| 61 | localStorage.setItem('userName', res.data?.staffName); | 61 | localStorage.setItem('userName', res.data?.staffName); |
| 62 | localStorage.setItem('userData', JSON.stringify(res.data)); | 62 | localStorage.setItem('userData', JSON.stringify(res.data)); |
| 63 | return getSystemMenu({ tenantGuid: currentTenantGuid.value }, res.data?.isAdmin).then((info: any) => { //解决页面调用流程接口传递staffGuid,为空的问题 | 63 | return getSystemMenu({ tenantGuid: currentTenantGuid.value }, res.data?.isAdmin == 'Y' && res.data?.superTubeFlag == 'Y').then((info: any) => { //解决页面调用流程接口传递staffGuid,为空的问题 |
| 64 | if (info.code == '00000') { | 64 | if (info.code == '00000') { |
| 65 | localStorage.setItem('userInfoData', JSON.stringify(info.data)); | 65 | localStorage.setItem('userInfoData', JSON.stringify(info.data)); |
| 66 | userInfoData.value = info.data; | 66 | userInfoData.value = info.data; | ... | ... |
-
Please register or sign in to post a comment