Refactor(AI智能):采取分包

This commit is contained in:
lifizer
2025-04-01 14:13:57 +08:00
parent 68cfae2893
commit 84562cf6f1
26 changed files with 22 additions and 19 deletions
@@ -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 = {
+2 -4
View File
@@ -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({
@@ -216,16 +216,18 @@
</template>
<script>
import { chatMixins } from '@/mixins/chatMixins.js'
import { chatMixins } from '../mixins/chatMixins.js'
import {
getAiSystemInfoSetting,
getAiSystemInfoTopic
} from '@/api/public'
import AiHistoryList from './components/historyList'
import AiHistoryList from '../components/historyList'
import BottomSend from '../components/bottomSend.vue'
export default {
name: 'AiChatIndexPage',
components: {
AiHistoryList
AiHistoryList,
BottomSend
},
mixins: [chatMixins],
data() {
+1 -1
View File
@@ -36,7 +36,7 @@ export default {
},
enterAiChat() {
uni.navigateTo({
url: '/pages/aiChat/index'
url: '/aiChat/views/index'
})
}
}
-2
View File
@@ -17,11 +17,9 @@ import {
import uView from "uview-ui";
import GooSkeleton from '@/components/GooSkeleton/index.vue'
import { pageToWatchData } from '@/config/page'
import BottomSend from '@/components/aiChat/bottomSend.vue'
Vue.use(uView)
Vue.component('GooSkeleton', GooSkeleton)
Vue.component('BottomSend', BottomSend)
Vue.mixin(mixin)
// 注册全局组件
+13 -8
View File
@@ -36,14 +36,6 @@
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/aiChat/index",
"style": {
"navigationBarTitleText": "云灵AI智能助手",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/home/landMark",
"style": {
@@ -850,6 +842,19 @@
}
]
},
{
"root": "aiChat",
"pages": [
{
"path": "views/index",
"style": {
"navigationBarTitleText": "云灵AI智能助手",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
}
]
},
{
"root": "v4",
"pages": [
Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 891 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB