fix: 文件格式二次校验

feat-im-0607-ch
ch 2 years ago
parent d269b48e60
commit 97639e7964

@ -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 });

Loading…
Cancel
Save