From f888312037d79b34e3562fa1a9e24a7c56031c2e Mon Sep 17 00:00:00 2001 From: wujingling0908 <2.com> Date: Sun, 20 Sep 2026 18:45:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=8A=E5=A4=A9=E7=83=AD=E7=82=B9=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E5=86=85=E5=AE=B9=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/chat-content.vue | 8 +- src/components/chat-new.vue | 7 +- src/components/hot-question-new.vue | 27 +++- src/components/hot-question.vue | 26 +++- src/main.js | 2 + src/store/app.js | 207 +++++++++++++++++----------- src/utils/api.js | 1 + 7 files changed, 185 insertions(+), 93 deletions(-) diff --git a/src/components/chat-content.vue b/src/components/chat-content.vue index ae38688..a514378 100644 --- a/src/components/chat-content.vue +++ b/src/components/chat-content.vue @@ -544,7 +544,7 @@
+ v-if="((item.reqAndResType == '01' || item.reqAndResType == '1') && (item.msgType == '01' || item.msgType == '1')) && item.cmd !== 'CPZX'">
@@ -702,7 +702,7 @@
+ v-if="item.reqAndResType == '05' && item.msgType == '01' && !(item.cmd || '').includes('CPLB')">
@@ -1181,6 +1181,7 @@ import Audio from './Audio.vue'; import ProductCardList from "@/components/product-card-list.vue"; import policyFormTable from "@/components/policy-form-table.vue"; import DynamicImage from '@/components/common/DynamicImage.vue'; +import imageService from '@/utils/imageService'; import wx from 'weixin-js-sdk'; export default { props: ["historylist", "tokenExist", "lostChatInfoNum"], @@ -1876,7 +1877,8 @@ export default { }, async ImagePreviewBox(src) { src = src || ""; - const imageUrl = await this.$getImageUrl(src) + const imageUrl = await imageService.getImageByKey(src) + if (!imageUrl) return // var timestamp = event.currentTarget.dataset.timestamp; // var currentIndex = this.timestampList.indexOf(timestamp); diff --git a/src/components/chat-new.vue b/src/components/chat-new.vue index ffedc39..15c23b5 100644 --- a/src/components/chat-new.vue +++ b/src/components/chat-new.vue @@ -241,8 +241,11 @@ const getChatHistory = async () => { } } - // 设置列表数据 - store.chatArr = dataList.concat(store.chatArr) + // 设置列表数据(历史消息也走同一套字段归一,保证 msgType=01 卡片能显示) + const normalizedList = store.normalizeHistoryMessages + ? store.normalizeHistoryMessages(dataList) + : dataList + store.chatArr = normalizedList.concat(store.chatArr) _.map(store.chatArr, (item) => { // 历史记录不展示数据互联 if (SJHLCmdList.includes(item.cmd) && !_.isEmpty(item.VIEW_ID)) { diff --git a/src/components/hot-question-new.vue b/src/components/hot-question-new.vue index ca114db..9b36147 100644 --- a/src/components/hot-question-new.vue +++ b/src/components/hot-question-new.vue @@ -46,12 +46,31 @@ const initHotQuestion = async () => { console.log(error); }); } -const handleAskClick=(record)=>{ +const manualService = inject('manualService', ref('1')) +const isItemsubmit = ref(true) + +const handleAskClick = (record) => { const text = record?.name if (!text) return - messageSend(text).catch((err) => { - console.log(err) - }) + if (String(manualService.value) === '2') return + if (!isItemsubmit.value) return + + isItemsubmit.value = false + const sendParmas = { + reqAndResType: '1', + msgText: text, + msgSource: manualService.value ?? store?.manualService, + questionType: 2, + } + + const request = store?.sendingRobot?.(sendParmas) || messageSend(text, { questionType: 2 }) + Promise.resolve(request) + .catch((err) => { + console.log(err) + }) + .finally(() => { + isItemsubmit.value = true + }) } onMounted(async () => { await initHotQuestion() diff --git a/src/components/hot-question.vue b/src/components/hot-question.vue index b5a7d2b..8d438f8 100644 --- a/src/components/hot-question.vue +++ b/src/components/hot-question.vue @@ -152,14 +152,17 @@