From 84562cf6f1bff980768b8756225f6b6ff7c362df Mon Sep 17 00:00:00 2001 From: lifizer <913626195@qq.com> Date: Tue, 1 Apr 2025 14:13:57 +0800 Subject: [PATCH] =?UTF-8?q?Refactor(AI=E6=99=BA=E8=83=BD):=E9=87=87?= =?UTF-8?q?=E5=8F=96=E5=88=86=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components}/bottomSend.vue | 0 .../components/historyList.vue | 0 {mixins => aiChat/mixins}/chatMixins.js | 2 +- {utils => aiChat/utils}/aiChat.js | 6 ++--- .../utils}/highlight/github-dark.min.css | 0 .../utils}/highlight/highlight-uni.min.js | 0 {utils => aiChat/utils}/markdown-it.min.js | 0 {pages/aiChat => aiChat/views}/index.vue | 8 ++++--- components/aiChat/entrance.vue | 2 +- main.js | 2 -- pages.json | 21 +++++++++++------- static/images/aiChat/avatar.png | Bin 17594 -> 0 bytes static/images/aiChat/bg.png | Bin 324011 -> 0 bytes static/images/aiChat/delete.png | Bin 1453 -> 0 bytes static/images/aiChat/down.png | Bin 1822 -> 0 bytes static/images/aiChat/hot.png | Bin 891 -> 0 bytes static/images/aiChat/icon-01.png | Bin 1474 -> 0 bytes static/images/aiChat/icon-02.png | Bin 671 -> 0 bytes static/images/aiChat/icon-03.png | Bin 722 -> 0 bytes static/images/aiChat/icon-04.png | Bin 1636 -> 0 bytes static/images/aiChat/icon-05.png | Bin 1781 -> 0 bytes static/images/aiChat/keyboard.png | Bin 10283 -> 0 bytes static/images/aiChat/logo-01.gif | Bin 2133181 -> 0 bytes static/images/aiChat/microphone-big.png | Bin 2759 -> 0 bytes static/images/aiChat/microphone.png | Bin 1208 -> 0 bytes static/images/aiChat/send.png | Bin 2777 -> 0 bytes 26 files changed, 22 insertions(+), 19 deletions(-) rename {components/aiChat => aiChat/components}/bottomSend.vue (100%) rename {pages/aiChat => aiChat}/components/historyList.vue (100%) rename {mixins => aiChat/mixins}/chatMixins.js (99%) rename {utils => aiChat/utils}/aiChat.js (94%) rename {utils => aiChat/utils}/highlight/github-dark.min.css (100%) rename {utils => aiChat/utils}/highlight/highlight-uni.min.js (100%) rename {utils => aiChat/utils}/markdown-it.min.js (100%) rename {pages/aiChat => aiChat/views}/index.vue (98%) delete mode 100644 static/images/aiChat/avatar.png delete mode 100644 static/images/aiChat/bg.png delete mode 100644 static/images/aiChat/delete.png delete mode 100644 static/images/aiChat/down.png delete mode 100644 static/images/aiChat/hot.png delete mode 100644 static/images/aiChat/icon-01.png delete mode 100644 static/images/aiChat/icon-02.png delete mode 100644 static/images/aiChat/icon-03.png delete mode 100644 static/images/aiChat/icon-04.png delete mode 100644 static/images/aiChat/icon-05.png delete mode 100644 static/images/aiChat/keyboard.png delete mode 100644 static/images/aiChat/logo-01.gif delete mode 100644 static/images/aiChat/microphone-big.png delete mode 100644 static/images/aiChat/microphone.png delete mode 100644 static/images/aiChat/send.png diff --git a/components/aiChat/bottomSend.vue b/aiChat/components/bottomSend.vue similarity index 100% rename from components/aiChat/bottomSend.vue rename to aiChat/components/bottomSend.vue diff --git a/pages/aiChat/components/historyList.vue b/aiChat/components/historyList.vue similarity index 100% rename from pages/aiChat/components/historyList.vue rename to aiChat/components/historyList.vue diff --git a/mixins/chatMixins.js b/aiChat/mixins/chatMixins.js similarity index 99% rename from mixins/chatMixins.js rename to aiChat/mixins/chatMixins.js index 7523d11..d4fec70 100644 --- a/mixins/chatMixins.js +++ b/aiChat/mixins/chatMixins.js @@ -5,7 +5,7 @@ import { } from '@/api/chat/index' import { VUE_APP_API_URL } from '@/config' import settings from '@/config/baseSetting.js' -import { formatAiMsgContent } from '@/utils/aiChat' +import { formatAiMsgContent } from '../utils/aiChat' import cookie from '@/utils/store/cookie' import { handleLoginFailure } from '@/utils' export const chatMixins = { diff --git a/utils/aiChat.js b/aiChat/utils/aiChat.js similarity index 94% rename from utils/aiChat.js rename to aiChat/utils/aiChat.js index d71a565..343e4c5 100644 --- a/utils/aiChat.js +++ b/aiChat/utils/aiChat.js @@ -1,9 +1,7 @@ // 引入markdown-it库 -import MarkdownIt from '@/utils/markdown-it.min.js' +import MarkdownIt from './/markdown-it.min.js' // hljs是由 Highlight.js 经兼容性修改后的文件,请勿直接升级。否则会造成uni-app-vue3-Android下有兼容问题 -import hljs from '@/utils/highlight/highlight-uni.min.js' -// 引入html-parser.js库 -// import parseHtml from '@/utils/html-parser.js' +import hljs from './highlight/highlight-uni.min.js' // 初始化 MarkdownIt库 const markdownIt = MarkdownIt({ diff --git a/utils/highlight/github-dark.min.css b/aiChat/utils/highlight/github-dark.min.css similarity index 100% rename from utils/highlight/github-dark.min.css rename to aiChat/utils/highlight/github-dark.min.css diff --git a/utils/highlight/highlight-uni.min.js b/aiChat/utils/highlight/highlight-uni.min.js similarity index 100% rename from utils/highlight/highlight-uni.min.js rename to aiChat/utils/highlight/highlight-uni.min.js diff --git a/utils/markdown-it.min.js b/aiChat/utils/markdown-it.min.js similarity index 100% rename from utils/markdown-it.min.js rename to aiChat/utils/markdown-it.min.js diff --git a/pages/aiChat/index.vue b/aiChat/views/index.vue similarity index 98% rename from pages/aiChat/index.vue rename to aiChat/views/index.vue index f71325f..6f7a2fc 100644 --- a/pages/aiChat/index.vue +++ b/aiChat/views/index.vue @@ -216,16 +216,18 @@