74 lines
1.7 KiB
TypeScript
74 lines
1.7 KiB
TypeScript
//
|
|
import { request } from '@/utils/request'
|
|
import type {
|
|
AgreementFormVo,
|
|
BannerVo,
|
|
PortalEntryGroup,
|
|
PortalEntryVo,
|
|
ProjectStatusCount,
|
|
ProjectSubmissionInfo,
|
|
ProjectSubmissionVo,
|
|
} from '@/types/business/home'
|
|
|
|
export function getProjectStatusCount(): Promise<ProjectStatusCount> {
|
|
return request<ProjectStatusCount>({
|
|
url: '/web/home-page/project-status-count',
|
|
method: 'get',
|
|
})
|
|
}
|
|
|
|
export function getServiceTypeList(): Promise<ProjectSubmissionVo[]> {
|
|
return request<ProjectSubmissionVo[]>({
|
|
url: '/web/home-page/service-type-list',
|
|
method: 'get',
|
|
})
|
|
}
|
|
|
|
export function getServiceTypeDetail(
|
|
id: number | string,
|
|
): Promise<ProjectSubmissionInfo> {
|
|
return request<ProjectSubmissionInfo>({
|
|
url: `/web/home-page/service-type-detail/${id}`,
|
|
method: 'get',
|
|
})
|
|
}
|
|
|
|
export function getCarouselList(): Promise<BannerVo[]> {
|
|
return request<BannerVo[]>({
|
|
url: '/web/home-page/carousel-list',
|
|
method: 'get',
|
|
})
|
|
}
|
|
|
|
export function getPlatformIntro(): Promise<AgreementFormVo> {
|
|
return request<AgreementFormVo>({
|
|
url: '/web/home-page/platform-intro',
|
|
method: 'get',
|
|
})
|
|
}
|
|
|
|
export function getContactInfo(): Promise<AgreementFormVo> {
|
|
return request<AgreementFormVo>({
|
|
url: '/web/home-page/contact-info',
|
|
method: 'get',
|
|
})
|
|
}
|
|
|
|
export function getPortalEntryList(): Promise<PortalEntryVo[]> {
|
|
return request<PortalEntryVo[]>({
|
|
url: '/web/vermins/portalEntryUser/list',
|
|
method: 'get',
|
|
})
|
|
}
|
|
|
|
export function switchPortalEntryGroup(
|
|
id: number,
|
|
type: PortalEntryGroup,
|
|
): Promise<void> {
|
|
return request<void>({
|
|
url: '/web/vermins/portalEntryUser/add',
|
|
method: 'post',
|
|
params: { id, type },
|
|
})
|
|
}
|