fix: Modify service inside access

This commit is contained in:
maggieyyy
2024-11-04 10:44:30 +08:00
parent c9ae05b22e
commit b216556867
2 changed files with 3 additions and 2 deletions
@@ -42,6 +42,7 @@ const AiServiceInsidePage:FC = ()=> {
const getApiDefine = ()=>{
console.log('@@@@@@@')
setApiPrefix('')
setPrefixForce(false)
fetchData<BasicResponse<{ prefix:string, force:boolean }>>('service/router/define',{method:'GET',eoParams:{service:serviceId,team:teamId}}).then(response=>{
@@ -119,7 +120,7 @@ const AiServiceInsidePage:FC = ()=> {
}, [currentUrl]);
useEffect(()=>{
if(accessData && accessData.get('team') && accessData.get('team')?.indexOf('team.service.router.view') !== -1){
if(accessData && checkPermission('team.service.router.view')){
getApiDefine()
}
},[accessData])
@@ -117,7 +117,7 @@ const SystemInsidePage:FC = ()=> {
}, [currentUrl]);
useEffect(()=>{
if(accessData && accessData.get('team') && accessData.get('team')?.indexOf('team.service.router.view') !== -1){
if(accessData && checkPermission('team.service.router.view')){
getApiDefine()
}
},[accessData])