Refactor(AI智能):采取分包
@@ -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 = {
|
||||
@@ -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() {
|
||||
@@ -36,7 +36,7 @@ export default {
|
||||
},
|
||||
enterAiChat() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/aiChat/index'
|
||||
url: '/aiChat/views/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
// 注册全局组件
|
||||
|
||||
@@ -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": [
|
||||
|
||||
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 316 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 891 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 671 B |
|
Before Width: | Height: | Size: 722 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |