chore(build): 调整ai-chat-message组件的位置,减少对主包尺寸的影响

This commit is contained in:
2026-01-16 10:34:00 +08:00
parent dd4176998b
commit e40e6e73b2
4 changed files with 570 additions and 559 deletions

View File

@@ -1,6 +0,0 @@
{
"component": true,
"usingComponents": {
"ns-loading": "../ns-loading/ns-loading"
}
}

View File

@@ -109,6 +109,7 @@ export default {
}); });
}, },
methods: { methods: {
/** /**
* 初始化多语言配置 * 初始化多语言配置
*/ */
@@ -130,12 +131,14 @@ export default {
this.currentLangIndex = 0; this.currentLangIndex = 0;
} }
}, },
/** /**
* 电话联系客服 * 电话联系客服
*/ */
call() { call() {
this.customerService.makePhoneCall(this.tel); this.customerService.makePhoneCall(this.tel);
}, },
/** /**
* 切换中英文语言,并刷新当前页面(保留所有参数) * 切换中英文语言,并刷新当前页面(保留所有参数)
*/ */
@@ -153,12 +156,12 @@ export default {
openAIChat() { openAIChat() {
this.$util.redirectTo(this.$util.AI_CHAT_PAGE_URL); this.$util.redirectTo(this.$util.AI_CHAT_PAGE_URL);
}, },
/**
* 打开客服选择对话框
*/
openCustomerSelectPopup() { openCustomerSelectPopup() {
if (this.customerService) { this.customerService.openCustomerSelectPopupDialog();
this.customerService.openCustomerSelectPopupDialog();
} else {
uni.showToast({ title: '客服初始化中,请稍后重试', icon: 'none' });
}
} }
} }
} }

View File

@@ -52,7 +52,12 @@ import { mapGetters, mapMutations } from 'vuex'
import navigationHelper from '@/common/js/navigation'; import navigationHelper from '@/common/js/navigation';
import { EventSafety } from '@/common/js/event-safety'; import { EventSafety } from '@/common/js/event-safety';
import aiChatMessage from './ai-chat-message.vue';
export default { export default {
components: {
aiChatMessage,
},
data() { data() {
return { return {
initialMessages: [ initialMessages: [
@@ -85,8 +90,7 @@ export default {
// 事件处理器引用(用于清理) // 事件处理器引用(用于清理)
safeEventHandlers: new Map() safeEventHandlers: new Map()
} }
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([
'globalAIKefuConfig' 'globalAIKefuConfig'
@@ -142,9 +146,6 @@ export default {
this.cleanup() this.cleanup()
}, },
methods: { methods: {
// ========== 安全事件处理 ========== // ========== 安全事件处理 ==========
setupSafeEventListeners() { setupSafeEventListeners() {