feat 项目中心

This commit is contained in:
Ironsp
2026-10-09 11:11:10 +08:00
parent bb897ccc94
commit 1bbbe50bd9
4 changed files with 22 additions and 12 deletions

View File

@@ -22,21 +22,21 @@ export function getSubmissionBizTypes(): Promise<SubmissionBizTypeVo[]> {
export function getOssUrls(ids: (string | number)[]): Promise<OssUrlVo[]> {
return request<OssUrlVo[]>({
url: `/resource/oss/listByIds/${ids.join(',')}`,
url: `/web/resource/oss/listByIds/${ids.join(',')}`,
method: 'get',
})
}
export function getBizTypeDict(): Promise<DictOption[]> {
return request<DictOption[]>({
url: `/system/dict/data/type/${BIZ_TYPE_DICT}`,
url: `/web/system/dict/data/type/${BIZ_TYPE_DICT}`,
method: 'get',
})
}
export function getBudgetRangeDict(): Promise<DictOption[]> {
return request<DictOption[]>({
url: `/system/dict/data/type/${BUDGET_RANGE_DICT}`,
url: `/web/system/dict/data/type/${BUDGET_RANGE_DICT}`,
method: 'get',
})
}
@@ -57,7 +57,8 @@ function toBoPayload(demand: Demand): Record<string, unknown> {
userPhone: demand.userPhone,
bizType: demand.bizType,
budgetRange: demand.budgetRange,
developmentCycle: demand.developmentCycle === '' ? null : demand.developmentCycle,
developmentCycle:
demand.developmentCycle === '' ? null : demand.developmentCycle,
supplementaryRemarks: demand.supplementaryRemarks,
projectName: demand.projectName,
requirementDesc: demand.requirementDesc,

View File

@@ -24,7 +24,9 @@ export function getServiceTypeList(): Promise<ProjectSubmissionVo[]> {
})
}
export function getServiceTypeDetail(id: number | string): Promise<ProjectSubmissionInfo> {
export function getServiceTypeDetail(
id: number | string,
): Promise<ProjectSubmissionInfo> {
return request<ProjectSubmissionInfo>({
url: `/web/home-page/service-type-detail/${id}`,
method: 'get',
@@ -54,14 +56,17 @@ export function getContactInfo(): Promise<AgreementFormVo> {
export function getPortalEntryList(): Promise<PortalEntryVo[]> {
return request<PortalEntryVo[]>({
url: '/vermins/portalEntryUser/list',
url: '/web/vermins/portalEntryUser/list',
method: 'get',
})
}
export function switchPortalEntryGroup(id: number, type: PortalEntryGroup): Promise<void> {
export function switchPortalEntryGroup(
id: number,
type: PortalEntryGroup,
): Promise<void> {
return request<void>({
url: '/vermins/portalEntryUser/add',
url: '/web/vermins/portalEntryUser/add',
method: 'post',
params: { id, type },
})

View File

@@ -3,7 +3,7 @@ import type { UserProfileVo } from '@/types/business/user'
export async function getUserProfile(): Promise<UserProfileVo> {
const data = await request<{ user: UserProfileVo }>({
url: '/system/user/profile',
url: '/web/system/user/profile',
method: 'get',
})
return data.user

View File

@@ -5,7 +5,7 @@ import { storage } from '@/utils/storage'
const SUCCESS_CODE = 200
export const CLIENT_ID = 'e5cd7e4891bf95d1d19206ce24a7b32e'
export const CLIENT_ID = '9f2c4e7a1b3d5c8e2f6a0b4d7c1e9f3a'
const service = axios.create({
baseURL: import.meta.env.VITE_API_BASE_URL,
@@ -36,12 +36,16 @@ export function serializeQuery(params: Record<string, unknown>): string {
return
}
if (typeof value === 'object') {
for (const [subKey, subValue] of Object.entries(value as Record<string, unknown>)) {
for (const [subKey, subValue] of Object.entries(
value as Record<string, unknown>,
)) {
append(`${key}.${subKey}`, subValue)
}
return
}
parts.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`)
parts.push(
`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`,
)
}
for (const [key, value] of Object.entries(params)) append(key, value)