From 0389c8b7fe76ffafb676270df6250f727a71ed8f Mon Sep 17 00:00:00 2001 From: Miao_Spring <539943419@qq.com> Date: Wed, 3 Apr 2024 12:45:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=86=E8=8A=82=E8=A1=A8?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/chatui.vue | 3 ++- src/views/chat.vue | 2 +- vite.config.js | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/chatui.vue b/src/components/chatui.vue index e1ef0b1..71b1049 100644 --- a/src/components/chatui.vue +++ b/src/components/chatui.vue @@ -95,6 +95,7 @@ async function getFileInfo(code) { async function downloadFile(code) { if (fileInfoCache.value[code].status === 'waittingDownload') { + fileInfoCache.value[code].status = `downloading`; return new Promise((resolve, reject) => { let id = code.substring(0, 8); let key = code.substring(8); @@ -227,7 +228,7 @@ const fileInfoCache = ref({}) const fileStatus2String = ref({ waittingDownload: '点击下载', downloading: '下载中', - finish: '点击获取', + finish: '下载完成', Unknow: '获取文件信息中', error: '出错' }) diff --git a/src/views/chat.vue b/src/views/chat.vue index 2f909c9..449af50 100644 --- a/src/views/chat.vue +++ b/src/views/chat.vue @@ -283,7 +283,7 @@ function joinGroup_Verify(gID) { } function sendMsg(gID, msg) { - if(msg === '' || activeGID.value === null)return + if(msg === '' || msg === null || activeGID.value === null)return let key = gID2key[gID].key msg = encryptString(key, msg, setting) socket.send(JSON.stringify({ type: 'message',type1:'text', msg, gID })) diff --git a/vite.config.js b/vite.config.js index f6ff2bf..4953b3a 100644 --- a/vite.config.js +++ b/vite.config.js @@ -18,4 +18,7 @@ export default defineConfig({ port:'17058', open:true, }, + esbuild: { + drop: ['console', 'debugger'], + }, }) \ No newline at end of file