feat 项目中心
This commit is contained in:
@@ -22,21 +22,21 @@ export function getSubmissionBizTypes(): Promise<SubmissionBizTypeVo[]> {
|
|||||||
|
|
||||||
export function getOssUrls(ids: (string | number)[]): Promise<OssUrlVo[]> {
|
export function getOssUrls(ids: (string | number)[]): Promise<OssUrlVo[]> {
|
||||||
return request<OssUrlVo[]>({
|
return request<OssUrlVo[]>({
|
||||||
url: `/resource/oss/listByIds/${ids.join(',')}`,
|
url: `/web/resource/oss/listByIds/${ids.join(',')}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getBizTypeDict(): Promise<DictOption[]> {
|
export function getBizTypeDict(): Promise<DictOption[]> {
|
||||||
return request<DictOption[]>({
|
return request<DictOption[]>({
|
||||||
url: `/system/dict/data/type/${BIZ_TYPE_DICT}`,
|
url: `/web/system/dict/data/type/${BIZ_TYPE_DICT}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getBudgetRangeDict(): Promise<DictOption[]> {
|
export function getBudgetRangeDict(): Promise<DictOption[]> {
|
||||||
return request<DictOption[]>({
|
return request<DictOption[]>({
|
||||||
url: `/system/dict/data/type/${BUDGET_RANGE_DICT}`,
|
url: `/web/system/dict/data/type/${BUDGET_RANGE_DICT}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -57,7 +57,8 @@ function toBoPayload(demand: Demand): Record<string, unknown> {
|
|||||||
userPhone: demand.userPhone,
|
userPhone: demand.userPhone,
|
||||||
bizType: demand.bizType,
|
bizType: demand.bizType,
|
||||||
budgetRange: demand.budgetRange,
|
budgetRange: demand.budgetRange,
|
||||||
developmentCycle: demand.developmentCycle === '' ? null : demand.developmentCycle,
|
developmentCycle:
|
||||||
|
demand.developmentCycle === '' ? null : demand.developmentCycle,
|
||||||
supplementaryRemarks: demand.supplementaryRemarks,
|
supplementaryRemarks: demand.supplementaryRemarks,
|
||||||
projectName: demand.projectName,
|
projectName: demand.projectName,
|
||||||
requirementDesc: demand.requirementDesc,
|
requirementDesc: demand.requirementDesc,
|
||||||
|
|||||||
@@ -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>({
|
return request<ProjectSubmissionInfo>({
|
||||||
url: `/web/home-page/service-type-detail/${id}`,
|
url: `/web/home-page/service-type-detail/${id}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
@@ -54,14 +56,17 @@ export function getContactInfo(): Promise<AgreementFormVo> {
|
|||||||
|
|
||||||
export function getPortalEntryList(): Promise<PortalEntryVo[]> {
|
export function getPortalEntryList(): Promise<PortalEntryVo[]> {
|
||||||
return request<PortalEntryVo[]>({
|
return request<PortalEntryVo[]>({
|
||||||
url: '/vermins/portalEntryUser/list',
|
url: '/web/vermins/portalEntryUser/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function switchPortalEntryGroup(id: number, type: PortalEntryGroup): Promise<void> {
|
export function switchPortalEntryGroup(
|
||||||
|
id: number,
|
||||||
|
type: PortalEntryGroup,
|
||||||
|
): Promise<void> {
|
||||||
return request<void>({
|
return request<void>({
|
||||||
url: '/vermins/portalEntryUser/add',
|
url: '/web/vermins/portalEntryUser/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: { id, type },
|
params: { id, type },
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import type { UserProfileVo } from '@/types/business/user'
|
|||||||
|
|
||||||
export async function getUserProfile(): Promise<UserProfileVo> {
|
export async function getUserProfile(): Promise<UserProfileVo> {
|
||||||
const data = await request<{ user: UserProfileVo }>({
|
const data = await request<{ user: UserProfileVo }>({
|
||||||
url: '/system/user/profile',
|
url: '/web/system/user/profile',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
return data.user
|
return data.user
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { storage } from '@/utils/storage'
|
|||||||
|
|
||||||
const SUCCESS_CODE = 200
|
const SUCCESS_CODE = 200
|
||||||
|
|
||||||
export const CLIENT_ID = 'e5cd7e4891bf95d1d19206ce24a7b32e'
|
export const CLIENT_ID = '9f2c4e7a1b3d5c8e2f6a0b4d7c1e9f3a'
|
||||||
|
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: import.meta.env.VITE_API_BASE_URL,
|
baseURL: import.meta.env.VITE_API_BASE_URL,
|
||||||
@@ -36,12 +36,16 @@ export function serializeQuery(params: Record<string, unknown>): string {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (typeof value === 'object') {
|
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)
|
append(`${key}.${subKey}`, subValue)
|
||||||
}
|
}
|
||||||
return
|
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)
|
for (const [key, value] of Object.entries(params)) append(key, value)
|
||||||
|
|||||||
Reference in New Issue
Block a user