From d58518c3597f4a1fbb585621ca54cdb3770e5e4f Mon Sep 17 00:00:00 2001 From: AaronWu <2463371514@qq.com> Date: Thu, 17 Apr 2025 13:59:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=9F=A5=E8=AF=86=E5=BA=93=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=98=AF=E5=90=A6=E5=85=AC=E5=BC=80=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/knowledgeBase/model.d.ts | 4 + src/api/login/index.ts | 14 + src/api/login/model.d.ts | 5 + src/views/client/entrance/index.vue | 254 ++++++++++++++++++- src/views/question/knowledge/formSchemas.tsx | 69 +++++ 5 files changed, 345 insertions(+), 1 deletion(-) diff --git a/src/api/knowledgeBase/model.d.ts b/src/api/knowledgeBase/model.d.ts index b46c531..c0da5b5 100644 --- a/src/api/knowledgeBase/model.d.ts +++ b/src/api/knowledgeBase/model.d.ts @@ -24,9 +24,11 @@ declare namespace API { updateUserid?: number; // 更新人ID version?: string; // 版本 fileList?: any[]; // 附件列表 + files?: any[]; // 附件列表 tags?: string[]; // 标签 istop?: number; // 是否置顶 orderNO?: number; // 排序 + isPublic?: number; // 是否公开 }; type CreateKnowledgeBaseParams = { @@ -50,9 +52,11 @@ declare namespace API { updateUserid?: number; // 更新人ID version?: string; // 版本 fileList?: any[]; // 附件列表 + files?: any[]; // 附件列表 tags?: string[]; // 标签 istop?: number; // 是否置顶 orderNO?: number; // 排序 + isPublic?: number; // 是否公开 }; type DeleteKnowledgeBaseParams = { diff --git a/src/api/login/index.ts b/src/api/login/index.ts index c5310fe..15ca29c 100644 --- a/src/api/login/index.ts +++ b/src/api/login/index.ts @@ -35,3 +35,17 @@ export function getUserInfo() { method: 'get', }); } + + +/** + * @description 重置密码 + * @param {ResetPasswordParams} data + * @returns + */ +export function resetPwd(data: API.ResetPasswordParams) { + return request({ + url: 'restPassword', + method: 'post', + data, + }); +} diff --git a/src/api/login/model.d.ts b/src/api/login/model.d.ts index d64c589..de59908 100644 --- a/src/api/login/model.d.ts +++ b/src/api/login/model.d.ts @@ -56,4 +56,9 @@ declare namespace API { img: string; id: string; }; + + type ResetPasswordParams = { + password: string; + newPassword: string; + }; } diff --git a/src/views/client/entrance/index.vue b/src/views/client/entrance/index.vue index 3f2e802..87f39d2 100644 --- a/src/views/client/entrance/index.vue +++ b/src/views/client/entrance/index.vue @@ -18,6 +18,11 @@ {{ userInfo.name }} + + + +
+ +
+
+ + {{ userInfo.name?.charAt(0) }} + +

{{ userInfo.name }}

+
+ + + {{ userInfo.isAdmin === 1 ? '系统管理员' : '普通用户' }} +
+
+
+ + + + + + + {{ userInfo.name }} + + + {{ userInfo.phone || '未设置' }} + + + {{ userInfo.email || '未设置' }} + + + {{ userInfo.createTime }} + + + +
+ + + 修改密码 + +
+
+
+
@@ -123,6 +181,29 @@ + + + + + + + + + + +