diff --git a/api/aiChat/ai_index.js b/api/aiChat/ai_index.js new file mode 100644 index 0000000..9a813c5 --- /dev/null +++ b/api/aiChat/ai_index.js @@ -0,0 +1,38 @@ +// src/api/index.js +// import request from '@/utils/ai_request.js' +import request from "../../utils/ai_request"; + +// 获取历史 +export const getHistory = ({ + conversationId, + user, + limit = 20 +}) => { + return request({ + url: '/aitutor/aichat/getMessagesToUser', + method: 'get', + params: { + conversationId, + user, + limit + } + // headers: { + // Authorization: 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjBmMTY3NmY2LTgwOGMtNGUwMC04NDJjLWIwNmY1ZTM5NzJlNCJ9.VVc6OwQ-Xn9pxzYbPhlCpvDp6TwESS00gJi9IXUEIbFw4RFACZDmYCYjQ7voTM4fppy9SAMJCWT-L7Uy-K1eqw' + // } + }); +}; + +// 点赞/点踩 action: 1 点赞 0 点踩 +export const sendFeedback = ({ + messageId, + action +}) => { + return request({ + url: '/api/chat/feedback', + method: 'post', + data: { + messageId, + action + } + }); +}; \ No newline at end of file diff --git a/components/aiChat/HistoryDrawer.vue b/components/aiChat/HistoryDrawer.vue new file mode 100644 index 0000000..d8bd244 --- /dev/null +++ b/components/aiChat/HistoryDrawer.vue @@ -0,0 +1,411 @@ + + + + + + \ No newline at end of file diff --git a/config.js b/config.js index 06259eb..86209fd 100644 --- a/config.js +++ b/config.js @@ -3,7 +3,7 @@ module.exports = { //baseUrl: 'http://zhxg.gxsdxy.cn/prod_api', // baseUrl: 'http://172.16.96.111:8085', // baseUrl: 'http://192.168.211.22:8085', - baseUrl: 'http://localhost:8085', + baseUrl: 'http://localhost:8088', // 应用信息 appInfo: { // 应用名称 @@ -28,7 +28,7 @@ module.exports = { /** * 开启cas */ - casEnable: true, + casEnable: false, /** * 单点登录url diff --git a/package.json b/package.json index dbcd9a3..de63eeb 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,18 @@ "@types/uni-app": "^1.4.8" }, "dependencies": { + "@dcloudio/uni-app-plus": "^2.0.2-4070520250711001", + "@dcloudio/uni-cli-i18n": "^2.0.2-4070520250711001", + "@dcloudio/uni-cli-shared": "^2.0.2-4070520250711001", + "@dcloudio/uni-helper-json": "^1.0.13", + "@dcloudio/uni-migration": "^2.0.2-4070520250711001", + "@dcloudio/uni-stat": "^2.0.2-4070520250711001", + "@dcloudio/vue-cli-plugin-uni": "^2.0.2-4070520250711001", + "@vue/cli-service": "^5.0.8", "@wecom/jssdk": "^2.3.1", + "axios": "^1.11.0", + "dompurify": "^3.2.6", + "markdown-it": "^14.1.0", "weixin-js-sdk": "^1.6.5" } } diff --git a/pages.json b/pages.json index ccad9a0..21f623a 100644 --- a/pages.json +++ b/pages.json @@ -1148,14 +1148,19 @@ } }, { - "path" : "pages/sub/StudoEdit", - "style" : - { - "navigationBarTitleText" : "离校留校申请", + "path": "pages/sub/StudoEdit", + "style": { + "navigationBarTitleText": "离校留校申请", "enablePullDownRefresh": false, "navigationBarBackgroundColor": "#1890FF", "navigationBarTextStyle": "white" } + }, + { + "path": "pages/aiChat/ai_index", + "style": { + "navigationBarTitleText": "AI辅导员" + } } ], "globalStyle": { diff --git a/pages/Login/Login.vue b/pages/Login/Login.vue index 8fea1ee..b3b4b98 100644 --- a/pages/Login/Login.vue +++ b/pages/Login/Login.vue @@ -1,3 +1,4 @@ +