From aef3a3069d76930c405404805abdb935d1791630 Mon Sep 17 00:00:00 2001 From: yangzhe Date: Thu, 10 Jul 2025 16:41:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=81=8A=E5=A4=A9?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E7=BB=84=E4=BB=B6=E5=8F=8A=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BC=98=E5=8C=96=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=8F=91=E9=80=81=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 153 +++++++------- common/http.api.js | 8 +- components/ChatHistory.vue | 210 +++++++++++++++++++ pages/home/index/index.vue | 406 +++++++++++++++++------------------- pages/login/login/index.vue | 38 ++-- static/common/js/config.js | 2 +- static/common/js/router.js | 110 +++++----- 7 files changed, 566 insertions(+), 361 deletions(-) create mode 100644 components/ChatHistory.vue diff --git a/App.vue b/App.vue index 0e94c79..6127a7c 100644 --- a/App.vue +++ b/App.vue @@ -1,31 +1,29 @@ @@ -305,7 +311,7 @@ uni-modal .uni-modal__btn:after { uni-modal .uni-modal__btn_default { background: #e6f6ff; - color: #3CB5FB !important; + color: #3cb5fb !important; margin-right: 20rpx; } @@ -322,7 +328,6 @@ uni-modal .uni-modal__btn_primary { color: #ffffff !important; } - uni-modal .uni-modal { padding: 40rpx; box-sizing: border-box; @@ -357,8 +362,8 @@ uni-page-body { body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", - "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", - "Microsoft Yahei", sans-serif; + "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", + "Microsoft Yahei", sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; // max-width: 1536rpx; diff --git a/common/http.api.js b/common/http.api.js index 3fa268b..b0758b2 100644 --- a/common/http.api.js +++ b/common/http.api.js @@ -93,6 +93,10 @@ const install = (Vue, vm) => { /** 首页ai对话 */ // 发送消息 let SendMessageApi = (params = {}) => vm.$u.post('api/ChatAI/CreateChat', params); + // 获取历史对话列表 + let GetConversationPage = (params = {}) => vm.$u.get('api/ChatAI/GetConversationPage', params); + // 获取对话详情 + let GetConversationDetail = (params = {}) => vm.$u.get('api/ChatAI/GetHistoricalConversations', params); /** 登录 */ // 获取图形验证码 @@ -144,7 +148,9 @@ const install = (Vue, vm) => { SendMessageApi, GetCaptcha, GetStuVerifyCode, - StuLogin + StuLogin, + GetConversationPage, + GetConversationDetail }; } diff --git a/components/ChatHistory.vue b/components/ChatHistory.vue new file mode 100644 index 0000000..c894044 --- /dev/null +++ b/components/ChatHistory.vue @@ -0,0 +1,210 @@ + + + + + diff --git a/pages/home/index/index.vue b/pages/home/index/index.vue index 20164d7..14d7cd1 100644 --- a/pages/home/index/index.vue +++ b/pages/home/index/index.vue @@ -54,7 +54,7 @@ --> -