mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-14 20:41:15 +08:00
Merge branch 'feature/v1.2' into 'main'
frontend: update See merge request apipark/APIPark!22
This commit is contained in:
@@ -17,7 +17,7 @@ export type ServiceBasicInfoType = {
|
||||
logo?:string
|
||||
invokeAddress:string
|
||||
approvalType:'auto'|'manual'
|
||||
serviceType:'ai'|'rest'
|
||||
serviceKind:'ai'|'rest'
|
||||
}
|
||||
|
||||
export type ServiceDetailType = {
|
||||
|
||||
@@ -35,7 +35,7 @@ const ServiceHubDetail = ()=>{
|
||||
const navigate = useNavigate();
|
||||
|
||||
const getServiceBasicInfo = ()=>{
|
||||
fetchData<BasicResponse<{service:ServiceDetailType}>>('catalogue/service',{method:'GET',eoParams:{service:serviceId}, eoTransformKeys:['app_num','api_num','update_time','api_doc','invoke_address','approval_type','service_type']}).then(response=>{
|
||||
fetchData<BasicResponse<{service:ServiceDetailType}>>('catalogue/service',{method:'GET',eoParams:{service:serviceId}, eoTransformKeys:['app_num','api_num','update_time','api_doc','invoke_address','approval_type','service_kind']}).then(response=>{
|
||||
const {code,data,msg} = response
|
||||
if(code === STATUS_CODE.SUCCESS){
|
||||
setService(data.service)
|
||||
@@ -113,7 +113,7 @@ const ServiceHubDetail = ()=>{
|
||||
{
|
||||
key: 'api-document',
|
||||
label: $t('API 文档'),
|
||||
children: <div className={`p-btnbase ${serviceBasicInfo?.serviceType?.toLocaleLowerCase() === 'ai' ? 'ai-service-api-preview' : ''}`}><ServiceHubApiDocument service={service!} /></div>,
|
||||
children: <div className={`p-btnbase ${serviceBasicInfo?.serviceKind?.toLocaleLowerCase() === 'ai' ? 'ai-service-api-preview' : ''}`}><ServiceHubApiDocument service={service!} /></div>,
|
||||
icon: <ApiFilled />
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user