客服:完善图片消息发送

pull/56/head
puhui999 2024-07-02 17:32:36 +08:00
parent 166030e3b8
commit d9efd4e2e6
1 changed files with 4 additions and 2 deletions

View File

@ -109,8 +109,7 @@
}
async function onSelect({ type, data }) {
let msg = '';
// TODO puhui999:
let msg;
switch (type) {
case 'image':
const res = await FileApi.uploadFile(data.tempFiles[0].path);
@ -119,6 +118,7 @@
content: res.data,
};
break;
// TODO puhui999:
case 'goods':
msg = {
contentType: KeFuMessageContentTypeEnum.PRODUCT,
@ -157,6 +157,8 @@
if (msg) {
//
// scrollBottom();
await KeFuApi.sendKefuMessage(msg);
await getMessageList()
chat.showTools = false;
chat.showSelect = false;
chat.selectMode = '';