瀏覽代碼

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

zhouguangyuan 2 周之前
父節點
當前提交
4ca41411f3
共有 1 個文件被更改,包括 6 次插入6 次删除
  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
   }