|
@@ -50,7 +50,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { wxUploadFile, wxMakePhoneCall } from '@/utils/wxRequest.js'
|
|
|
-import { sendMsg, getOrderConversationInfo, getListConversationInfo, setRead, getHistoryMsg } from '@/api/conversation.js';
|
|
|
+import { sendMsg, getOrderConversationInfo, getListConversationInfo, setRead, getHistoryMsg,getHelpConversation } from '@/api/conversation.js';
|
|
|
import { onMounted } from "vue";
|
|
|
import dayjs from 'dayjs/esm/index'
|
|
|
import store from "@/store";
|
|
@@ -82,6 +82,7 @@ export default {
|
|
|
conversationRecordId: null,//会话id
|
|
|
storeUser: store.state.user,
|
|
|
store: store,
|
|
|
+ isKg:false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -107,6 +108,11 @@ export default {
|
|
|
}
|
|
|
//1用户2志愿者3后台
|
|
|
this.system = this.userType === 1 ? '1' : '2';
|
|
|
+ //客服
|
|
|
+ if(options.customerService){
|
|
|
+ this.system = 3;
|
|
|
+ }
|
|
|
+
|
|
|
// #ifdef H5
|
|
|
this.scrollView.safeAreaHeight = uni.getSystemInfoSync().safeArea.height;
|
|
|
// #endif
|
|
@@ -192,7 +198,7 @@ export default {
|
|
|
const parmas = {
|
|
|
system: this.system
|
|
|
}
|
|
|
- const apiFun = this.orderId ? getOrderConversationInfo : getListConversationInfo
|
|
|
+ const apiFun = this.orderId ? getOrderConversationInfo : (this.system === 3?getHelpConversation:getListConversationInfo)
|
|
|
if (this.orderId) {
|
|
|
parmas.mainOrderId = this.orderId
|
|
|
}
|
|
@@ -200,11 +206,11 @@ export default {
|
|
|
parmas.conversationRecordId = this.conversationRecordId
|
|
|
}
|
|
|
|
|
|
- await setRead(parmas); //设置已读
|
|
|
+
|
|
|
|
|
|
const res = await apiFun(parmas);
|
|
|
console.log("TCL: getOrder -> res", res)
|
|
|
-
|
|
|
+ await setRead({...parmas,conversationRecordId: res.data.conversationRecordId}); //设置已读
|
|
|
if (res.code === 200) {
|
|
|
const data = res.data.vos;
|
|
|
// 获取待滚动元素选择器,解决插入数据后,滚动条定位时使用。取当前消息数据的第一条信息元素
|