From fe132b480f077e1be68bc57520de49dc34dc440a Mon Sep 17 00:00:00 2001 From: dkp Date: Thu, 19 Jun 2025 16:29:41 +0800 Subject: [PATCH] =?UTF-8?q?feat(personal-info):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加修改手机号功能 - 实现头像上传和裁剪 - 优化用户信息编辑界面 - 增加表单验证和错误提示 - 实现验证码发送和倒计时功能 --- src/api/all/index.ts | 26 +- .../components/management/person/index.vue | 240 +++++++++++++++++- 2 files changed, 252 insertions(+), 14 deletions(-) diff --git a/src/api/all/index.ts b/src/api/all/index.ts index 1b487ff..b00f92e 100644 --- a/src/api/all/index.ts +++ b/src/api/all/index.ts @@ -50,7 +50,6 @@ export const fetchNewKeywordDetail = (params: any) => { // 使用Http.get方法,发送GET请求,获取行业话题列表 return Http.get('/v1/industry-new-keywords/' + params, {}); }; -fetchIndustryTopicDetail; // 导出一个函数fetchUserPainPointsList,用于获取用户痛点列表 export const fetchUserPainPointsList = (params: any) => { @@ -116,3 +115,28 @@ export const trialProduct = (id: number) => { export const updateEnterpriseName = (data: any) => { return Http.patch(`/v1/enterprises/name`, data, { headers: { 'enterprise-id': 1 } }); }; + +// 发送修改手机号验证码 +export const sendUpdateMobileCaptcha = (data: any) => { + return Http.post(`/v1/sms/update-mobile-captcha`, data); +}; + +// 修改绑定的手机号 +export const updateMobile = (data: any) => { + return Http.post(`/v1/me/mobile`, data); +}; + +// 修改我的信息 +export const updateMyInfo = (data: any) => { + return Http.put(`/v1/me`, data); +}; + +// 获取企业账号分页 +export const fetchSubAccountPage = (params: any) => { + return Http.get(`/v1/enterprises/users`, params, { headers: { 'enterprise-id': 1 } }); +}; + +// 获取企业账号分页 +export const fetchImageUploadFile = (params: any) => { + return Http.get(`/v1/oss/image-pre-signed-url`, params); +}; diff --git a/src/views/components/management/person/index.vue b/src/views/components/management/person/index.vue index 58636fd..5957f4c 100644 --- a/src/views/components/management/person/index.vue +++ b/src/views/components/management/person/index.vue @@ -8,32 +8,73 @@ - - + + - - - 上传新头像 +
+ + + + 上传新头像 + +
- +
+ + + + + + + + + + + + + -