|
|
|
@ -320,6 +320,10 @@
|
|
|
|
|
};
|
|
|
|
|
const handleSendImage = async (e) => {
|
|
|
|
|
const file = e.target.files[0];
|
|
|
|
|
if (!file.type.includes('image')) {
|
|
|
|
|
proxy.$message.warning('只能发送图片哦~');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
e.target.value = null;
|
|
|
|
|
let url = await upload('mall-product', 'im/', file);
|
|
|
|
|
const curService = store.state.chat.curCustomerService;
|
|
|
|
@ -342,6 +346,10 @@
|
|
|
|
|
};
|
|
|
|
|
const handleSendVideo = async (e) => {
|
|
|
|
|
const file = e.target.files[0];
|
|
|
|
|
if (!file.type.includes('video')) {
|
|
|
|
|
proxy.$message.warning('只能发送视频哦~');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
e.target.value = null;
|
|
|
|
|
let url = await upload('mall-product', 'im/', file);
|
|
|
|
|
// store.dispatch('chat/submitVideo', { url });
|
|
|
|
|