Parcourir la source

修改OCR拍摄识别文件大小限制

zhouguangyuan il y a 2 semaines
Parent
commit
4ca41411f3
1 fichiers modifiés avec 6 ajouts et 6 suppressions
  1. 6 6
      src/views/inbound/photoOCR/index.vue

+ 6 - 6
src/views/inbound/photoOCR/index.vue

@@ -118,9 +118,9 @@ const autoUploadImage = async (file, barcode = null) => {
     return
   }
 
-  // 检查图片大小是否超过2MB
-  if (file.size > 2 * 1024 * 1024) {
-    showFailToast('图片大小不能超过2MB')
+  // 检查图片大小是否超过4MB
+  if (file.size > 4 * 1024 * 1024) {
+    showFailToast('图片大小不能超过4MB')
     return
   }
 
@@ -367,10 +367,10 @@ const submitOCR = async () => {
     return
   }
 
-  // 检查图片大小是否超过2MB
+  // 检查图片大小是否超过4MB
   const image = uploadImages.value[0]
-  if (image.file.size > 2 * 1024 * 1024) {
-    showFailToast('图片大小不能超过2MB')
+  if (image.file.size > 4 * 1024 * 1024) {
+    showFailToast('图片大小不能超过4MB')
     return
   }