+ 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 @@