From a70cd94176a22d0616789629c790069d737b36a9 Mon Sep 17 00:00:00 2001 From: dkp Date: Wed, 18 Jun 2025 11:38:23 +0800 Subject: [PATCH 01/19] =?UTF-8?q?refactor(components):=20=E5=B0=86?= =?UTF-8?q?=E5=AE=B9=E5=99=A8=E7=BB=84=E4=BB=B6=E4=BB=8E=20workplace=20?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E4=B8=AD=E7=8B=AC=E7=AB=8B=E5=87=BA=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 从 workplace/modules 目录中移除 container.vue 文件- 在根 components 目录下创建新的 container.vue 文件 - 更新 workplace/index.vue 中的 Container 组件引用 - 调整 container.vue 中的样式,增加 border-radius 属性 - 修改 workplace/index.vue 中的 body 样式,使用 !important 优先级 --- .../components/workplace/modules => components}/container.vue | 4 +++- src/views/components/workplace/index.vue | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) rename src/{views/components/workplace/modules => components}/container.vue (92%) diff --git a/src/views/components/workplace/modules/container.vue b/src/components/container.vue similarity index 92% rename from src/views/components/workplace/modules/container.vue rename to src/components/container.vue index 40de2d5..a3cb0d7 100644 --- a/src/views/components/workplace/modules/container.vue +++ b/src/components/container.vue @@ -17,6 +17,7 @@ const props = defineProps<{ border: 1px solid var(--BG-300, rgba(230, 230, 232, 1)); background: var(--BG-white, rgba(255, 255, 255, 1)); padding: 16px 24px 20px 24px; + border-radius: 8px; } .title { font-family: Alibaba PuHuiTi, serif; @@ -24,6 +25,7 @@ const props = defineProps<{ font-size: 18px; line-height: 24px; vertical-align: middle; - margin-bottom: 0px; + margin: 0; + padding: 0; } diff --git a/src/views/components/workplace/index.vue b/src/views/components/workplace/index.vue index 8845741..3492935 100644 --- a/src/views/components/workplace/index.vue +++ b/src/views/components/workplace/index.vue @@ -21,7 +21,7 @@ + diff --git a/src/views/components/workplace/modules/product.vue b/src/views/components/workplace/modules/product.vue index c9b0115..4123de3 100644 --- a/src/views/components/workplace/modules/product.vue +++ b/src/views/components/workplace/modules/product.vue @@ -65,14 +65,7 @@ - - -
- -
-
+ @@ -80,6 +73,8 @@ import { now } from '@vueuse/core'; import { trialProduct } from '@/api/all'; import { useRouter } from 'vue-router'; +import CustomerServiceModal from '@/components/customer-service-modal.vue'; + const props = defineProps<{ product: Product; }>(); From 9de7565b2d9daa884f7e01b789344dcaabd34b60 Mon Sep 17 00:00:00 2001 From: dkp Date: Wed, 18 Jun 2025 18:00:33 +0800 Subject: [PATCH 04/19] =?UTF-8?q?feat(enterprise):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=81=E4=B8=9A=E5=90=8D=E7=A7=B0=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 API 中新增 updateEnterpriseName 方法,用于更新企业名称 - 在路由中添加企业信息管理相关路径 - 实现企业信息页面,包括展示企业和修改企业名称的功能 - 新增 Modal组件用于弹窗展示 --- src/api/all/index.ts | 5 + src/api/index.ts | 4 + src/components/modal.vue | 38 +++++ src/router/index.ts | 15 ++ .../management/enterprise/index.vue | 139 ++++++++++++++++++ 5 files changed, 201 insertions(+) create mode 100644 src/components/modal.vue create mode 100644 src/views/components/management/enterprise/index.vue diff --git a/src/api/all/index.ts b/src/api/all/index.ts index 771d941..1b487ff 100644 --- a/src/api/all/index.ts +++ b/src/api/all/index.ts @@ -111,3 +111,8 @@ export const fetchSuccessCaseList = () => { export const trialProduct = (id: number) => { return Http.post(`/v1/products/${id}/try`, {}, { headers: { 'enterprise-id': 1 } }); }; + +// 修改企业名称 +export const updateEnterpriseName = (data: any) => { + return Http.patch(`/v1/enterprises/name`, data, { headers: { 'enterprise-id': 1 } }); +}; diff --git a/src/api/index.ts b/src/api/index.ts index be83e51..2fe5ed6 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -77,6 +77,10 @@ export class Request { public delete(url: string, config?: AxiosRequestConfig): Promise { return this.instance.delete(url, config); } + + public patch(url: string, data?: any, config?: AxiosRequestConfig): Promise { + return this.instance.patch(url, data, config); + } } //* 默认导出Request实例 diff --git a/src/components/modal.vue b/src/components/modal.vue new file mode 100644 index 0000000..aa7d8b9 --- /dev/null +++ b/src/components/modal.vue @@ -0,0 +1,38 @@ + + + diff --git a/src/router/index.ts b/src/router/index.ts index 9356416..45d6557 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -50,6 +50,21 @@ const router = createRouter({ name: 'auth', component: () => import('@/views/components/permission/auth.vue'), }, + { + path: '/management/person', + name: 'person', + component: () => import('@/views/components/management/person'), + }, + { + path: '/management/enterprise', + name: 'enterprise', + component: () => import('@/views/components/management/enterprise'), + }, + { + path: '/management/account', + name: 'account', + component: () => import('@/views/components/management/account'), + }, ], scrollBehavior() { return { top: 0 }; diff --git a/src/views/components/management/enterprise/index.vue b/src/views/components/management/enterprise/index.vue new file mode 100644 index 0000000..1940730 --- /dev/null +++ b/src/views/components/management/enterprise/index.vue @@ -0,0 +1,139 @@ + + + + From cd0073a023760e878947b77912adb12d077fd6ef Mon Sep 17 00:00:00 2001 From: dkp Date: Wed, 18 Jun 2025 18:00:51 +0800 Subject: [PATCH 05/19] =?UTF-8?q?feat(views):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF=E7=AE=A1=E7=90=86=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增个人信息管理页面,包括用户信息展示和编辑功能- 添加头像上传和裁剪功能 - 引入 vue-cropper 组件用于头像裁剪 --- package-lock.json | 7 ++ package.json | 3 +- .../components/management/person/index.vue | 80 +++++++++++++++++++ 3 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 src/views/components/management/person/index.vue diff --git a/package-lock.json b/package-lock.json index 739795d..d972c82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,7 @@ "sass": "^1.89.2", "swiper": "^11.2.8", "vue": "^3.2.45", + "vue-cropper": "^1.1.4", "vue-echarts": "^7.0.3", "vue-router": "^4.1.6" }, @@ -8945,6 +8946,12 @@ "@vue/shared": "3.2.47" } }, + "node_modules/vue-cropper": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/vue-cropper/-/vue-cropper-1.1.4.tgz", + "integrity": "sha512-5m98vBsCEI9rbS4JxELxXidtAui3qNyTHLHg67Qbn7g8cg+E6LcnC+hh3SM/p94x6mFh6KRxT1ttnta+wCYqWA==", + "license": "ISC" + }, "node_modules/vue-demi": { "version": "0.13.11", "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.13.11.tgz", diff --git a/package.json b/package.json index 184c6ae..b46c95a 100644 --- a/package.json +++ b/package.json @@ -24,11 +24,10 @@ "mitt": "^3.0.0", "normalize.css": "^8.0.1", "pinia": "^2.0.29", - "sass": "^1.89.2", - "swiper": "^11.2.8", "vue": "^3.2.45", + "vue-cropper": "^1.1.4", "vue-echarts": "^7.0.3", "vue-router": "^4.1.6" }, diff --git a/src/views/components/management/person/index.vue b/src/views/components/management/person/index.vue new file mode 100644 index 0000000..58636fd --- /dev/null +++ b/src/views/components/management/person/index.vue @@ -0,0 +1,80 @@ + + + + From fe19d3ff34de95c6b80fe0b96a6bcadbd339d5db Mon Sep 17 00:00:00 2001 From: dkp Date: Thu, 19 Jun 2025 09:20:54 +0800 Subject: [PATCH 06/19] =?UTF-8?q?style:=E4=BC=98=E5=8C=96=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=92=8C=20Modal=20=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -调整企业信息表格的修改按钮样式 - 优化企业信息修改 Modal 的布局结构 -移除 Modal body 的上下内边距 --- src/components/modal.vue | 4 ++-- src/views/components/management/enterprise/index.vue | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/components/modal.vue b/src/components/modal.vue index aa7d8b9..6d905bd 100644 --- a/src/components/modal.vue +++ b/src/components/modal.vue @@ -32,7 +32,7 @@ } } .body { - padding-top: 0px; - padding-bottom: 0px; + padding-top: 0; + padding-bottom: 0; } diff --git a/src/views/components/management/enterprise/index.vue b/src/views/components/management/enterprise/index.vue index 1940730..f1dd93b 100644 --- a/src/views/components/management/enterprise/index.vue +++ b/src/views/components/management/enterprise/index.vue @@ -5,7 +5,7 @@ {{ record.name }} @@ -14,9 +14,15 @@ >(剩余{{ enterpriseInfo.update_name_quota - enterpriseInfo.used_update_name_count }}次)

- + - +
From f3d21e1f39714d0728d5b72d6b006c63f6c118cc Mon Sep 17 00:00:00 2001 From: dkp Date: Thu, 19 Jun 2025 09:22:37 +0800 Subject: [PATCH 07/19] =?UTF-8?q?style(enterprise):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=BC=81=E4=B8=9A=E4=BF=A1=E6=81=AF=E5=8D=A1=E7=89=87=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为字体添加 serif 备选,提高文本可读性 - 统一表单标签、输入框和按钮的样式 - 调整部分样式属性,如移除多余的 margin --- src/views/components/management/enterprise/index.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/components/management/enterprise/index.vue b/src/views/components/management/enterprise/index.vue index f1dd93b..e59a3dc 100644 --- a/src/views/components/management/enterprise/index.vue +++ b/src/views/components/management/enterprise/index.vue @@ -104,19 +104,19 @@ async function handleOk() { } .form { :deep(.arco-form-item-label) { - font-family: Alibaba PuHuiTi; + font-family: Alibaba PuHuiTi, serif; font-weight: 400; font-size: 14px; - margin: 0px; + margin: 0; } :deep(.arco-input-wrapper) { background: white; border: 1px solid var(--Brand-Brand-6, rgba(109, 76, 254, 1)); - font-family: Alibaba PuHuiTi; + font-family: Alibaba PuHuiTi, serif; font-weight: 400; font-size: 14px; input::placeholder { - font-family: Alibaba PuHuiTi; + font-family: Alibaba PuHuiTi, serif; font-weight: 400; font-size: 14px; color: var(--Text-4, rgba(147, 148, 153, 1)); @@ -126,7 +126,7 @@ async function handleOk() { background: var(--BG-200, rgba(242, 243, 245, 1)); border: 1px solid var(--BG-400, rgba(215, 215, 217, 1)); .arco-input:disabled { - font-family: Alibaba PuHuiTi; + font-family: Alibaba PuHuiTi, serif; font-weight: 400; font-size: 14px; } @@ -137,7 +137,7 @@ async function handleOk() { border: 1px solid rgba(109, 76, 254, 1); border-radius: 4px; padding: 2px 12px; - font-family: Alibaba PuHuiTi; + font-family: Alibaba PuHuiTi, serif; font-weight: 400; font-size: 12px; color: rgba(109, 76, 254, 1); From d19861d976f9d5710ab45988a4d8872b0b46579e Mon Sep 17 00:00:00 2001 From: dkp Date: Thu, 19 Jun 2025 09:25:49 +0800 Subject: [PATCH 08/19] =?UTF-8?q?refactor(components):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=AE=A2=E6=88=B7=E6=9C=8D=E5=8A=A1=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 使用自定义 Modal组件替换 a-modal - 调整内容布局,增加上下边距 - 简化模板结构,提高可读性 --- src/components/customer-service-modal.vue | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/components/customer-service-modal.vue b/src/components/customer-service-modal.vue index 1ce6743..24cc2f4 100644 --- a/src/components/customer-service-modal.vue +++ b/src/components/customer-service-modal.vue @@ -1,15 +1,12 @@ From 33d1be159dee6e6d8b1438f66379475e98e29c00 Mon Sep 17 00:00:00 2001 From: dkp Date: Thu, 19 Jun 2025 09:36:41 +0800 Subject: [PATCH 09/19] =?UTF-8?q?style(enterprise):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=BC=81=E4=B8=9A=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改企业名称更新计数为 1- 更新输入框未选中状态的样式 - 添加输入框选中状态的样式 --- src/views/components/management/enterprise/index.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/components/management/enterprise/index.vue b/src/views/components/management/enterprise/index.vue index e59a3dc..7aa5c5c 100644 --- a/src/views/components/management/enterprise/index.vue +++ b/src/views/components/management/enterprise/index.vue @@ -43,7 +43,7 @@ const form = reactive({ const enterpriseInfo = reactive({ name: '123321', update_name_quota: 2, - used_update_name_count: 2, + used_update_name_count: 1, }); const columns = [ @@ -111,7 +111,7 @@ async function handleOk() { } :deep(.arco-input-wrapper) { background: white; - border: 1px solid var(--Brand-Brand-6, rgba(109, 76, 254, 1)); + border: 1px solid var(--BG-400, rgba(215, 215, 217, 1)); font-family: Alibaba PuHuiTi, serif; font-weight: 400; font-size: 14px; @@ -131,6 +131,9 @@ async function handleOk() { font-size: 14px; } } + :deep(.arco-input-focus) { + border: 1px solid var(--Brand-Brand-6, rgba(109, 76, 254, 1)); + } } .edit-button { margin: 12px 0; From cfefa7d5626aa26d93d658f063359672a425e350 Mon Sep 17 00:00:00 2001 From: dkp Date: Thu, 19 Jun 2025 11:22:53 +0800 Subject: [PATCH 10/19] =?UTF-8?q?style(enterprise):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E8=81=9A=E7=84=A6=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在企业管理系统组件中的输入框聚焦状态添加阴影效果 - 增加 box-shadow 属性以提升视觉反馈和用户体验 --- src/views/components/management/enterprise/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/components/management/enterprise/index.vue b/src/views/components/management/enterprise/index.vue index 7aa5c5c..64924e2 100644 --- a/src/views/components/management/enterprise/index.vue +++ b/src/views/components/management/enterprise/index.vue @@ -133,6 +133,7 @@ async function handleOk() { } :deep(.arco-input-focus) { border: 1px solid var(--Brand-Brand-6, rgba(109, 76, 254, 1)); + box-shadow: 0 2px 4px 0 rgba(109, 76, 254, 0.2); } } .edit-button { From fe132b480f077e1be68bc57520de49dc34dc440a Mon Sep 17 00:00:00 2001 From: dkp Date: Thu, 19 Jun 2025 16:29:41 +0800 Subject: [PATCH 11/19] =?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 @@ - - + + - - - 上传新头像 +
+ + + + 上传新头像 + +
- +
+ + + + + + + + + + + + + - From 7969167c7002a1d0737ad56baf335a6f0071605e Mon Sep 17 00:00:00 2001 From: dkp Date: Fri, 20 Jun 2025 11:22:52 +0800 Subject: [PATCH 12/19] =?UTF-8?q?feat(container):=20=E5=9C=A8=E5=AE=B9?= =?UTF-8?q?=E5=99=A8=E7=BB=84=E4=BB=B6=E4=B8=AD=E6=B7=BB=E5=8A=A0=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E5=8F=B3=E4=BE=A7=E6=8F=92=E6=A7=BD=E5=B9=B6=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E6=A0=B7=E5=BC=8F-=20=E5=9C=A8=20container.vue=20?= =?UTF-8?q?=E4=B8=AD=E6=B7=BB=E5=8A=A0=E4=BA=86=20header=20=E6=8F=92?= =?UTF-8?q?=E6=A7=BD=EF=BC=8C=E7=94=A8=E4=BA=8E=E5=9C=A8=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E5=8F=B3=E4=BE=A7=E6=94=BE=E7=BD=AE=E5=86=85=E5=AE=B9=20-=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BA=86=20container.vue=20=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E6=A0=87=E9=A2=98=E5=B8=83=E5=B1=80=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E5=85=B6=E4=B8=8E=E6=96=B0=E5=A2=9E=E6=8F=92=E6=A7=BD=E5=AF=B9?= =?UTF-8?q?=E9=BD=90-=20=E6=9B=B4=E6=96=B0=E4=BA=86=20workplace/index.vue?= =?UTF-8?q?=20=E4=B8=AD=E7=9A=84=E6=A0=B7=E5=BC=8F=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=99=A8=EF=BC=8C=E4=BB=A5=E9=80=82=E5=BA=94=E6=96=B0=E7=9A=84?= =?UTF-8?q?=20DOM=20=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/container.vue | 5 ++++- src/views/components/workplace/index.vue | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/container.vue b/src/components/container.vue index a3cb0d7..e63e4e9 100644 --- a/src/components/container.vue +++ b/src/components/container.vue @@ -1,6 +1,9 @@