From 1bbbe50bd928af49bd8ff78ee604de2fac6a6655 Mon Sep 17 00:00:00 2001 From: Ironsp <1522278303@qq.com> Date: Fri, 9 Oct 2026 11:11:10 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E9=A1=B9=E7=9B=AE=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/demand.ts | 9 +++++---- src/api/home.ts | 13 +++++++++---- src/api/user.ts | 2 +- src/utils/request.ts | 10 +++++++--- 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/api/demand.ts b/src/api/demand.ts index 4561635..ab3534c 100644 --- a/src/api/demand.ts +++ b/src/api/demand.ts @@ -22,21 +22,21 @@ export function getSubmissionBizTypes(): Promise { export function getOssUrls(ids: (string | number)[]): Promise { return request({ - url: `/resource/oss/listByIds/${ids.join(',')}`, + url: `/web/resource/oss/listByIds/${ids.join(',')}`, method: 'get', }) } export function getBizTypeDict(): Promise { return request({ - url: `/system/dict/data/type/${BIZ_TYPE_DICT}`, + url: `/web/system/dict/data/type/${BIZ_TYPE_DICT}`, method: 'get', }) } export function getBudgetRangeDict(): Promise { return request({ - 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 { 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, diff --git a/src/api/home.ts b/src/api/home.ts index 236c091..5b5bb8d 100644 --- a/src/api/home.ts +++ b/src/api/home.ts @@ -24,7 +24,9 @@ export function getServiceTypeList(): Promise { }) } -export function getServiceTypeDetail(id: number | string): Promise { +export function getServiceTypeDetail( + id: number | string, +): Promise { return request({ url: `/web/home-page/service-type-detail/${id}`, method: 'get', @@ -54,14 +56,17 @@ export function getContactInfo(): Promise { export function getPortalEntryList(): Promise { return request({ - url: '/vermins/portalEntryUser/list', + url: '/web/vermins/portalEntryUser/list', method: 'get', }) } -export function switchPortalEntryGroup(id: number, type: PortalEntryGroup): Promise { +export function switchPortalEntryGroup( + id: number, + type: PortalEntryGroup, +): Promise { return request({ - url: '/vermins/portalEntryUser/add', + url: '/web/vermins/portalEntryUser/add', method: 'post', params: { id, type }, }) diff --git a/src/api/user.ts b/src/api/user.ts index 1ca857e..3c863b4 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -3,7 +3,7 @@ import type { UserProfileVo } from '@/types/business/user' export async function getUserProfile(): Promise { const data = await request<{ user: UserProfileVo }>({ - url: '/system/user/profile', + url: '/web/system/user/profile', method: 'get', }) return data.user diff --git a/src/utils/request.ts b/src/utils/request.ts index 0de54c5..13d304d 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -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 { return } if (typeof value === 'object') { - for (const [subKey, subValue] of Object.entries(value as Record)) { + for (const [subKey, subValue] of Object.entries( + value as Record, + )) { 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)