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