Merge branch 'feature/v1.2' into 'main'

fix: Modify service inside access

See merge request apipark/APIPark!81
This commit is contained in:
杨梦洁
2024-11-04 10:46:21 +08:00
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])