From f205ae98e265b07bd12f47e8f562247f2fc7dc25 Mon Sep 17 00:00:00 2001 From: "SD-20230427NBFT\\Administrator" <609306725@qq.com> Date: Wed, 31 Jul 2024 15:54:52 +0800 Subject: [PATCH] no message --- pagesA/merge/face_1.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pagesA/merge/face_1.vue b/pagesA/merge/face_1.vue index ac876d3..04d9761 100644 --- a/pagesA/merge/face_1.vue +++ b/pagesA/merge/face_1.vue @@ -242,6 +242,11 @@ let filePath = edetail; let _date = new Date(); let ext_name = filePath.substr(filePath.lastIndexOf('.')); + if (ext_name !== 'png' && ext_name !== 'jpg' && ext_name !== 'jpeg') { + _this.$com.showError('请上传 png / jpg / jpeg 格式的图片'); + return false; + } + let address = _date.getFullYear() + '' + (_date.getMonth() + 1) + '' + _date.getDate(); let fileName = address + _date.getTime() + ext_name; const img_info = await unit.getImgInfo(filePath);