Ver Fonte

fix: 3467 3466

sgc há 4 semanas atrás
pai
commit
7030283416

+ 3 - 1
src/components/Upload/Imgs.vue

@@ -271,9 +271,11 @@ const uploadSuccess = (response: { fileUrl: string } | string | string[] | undef
   // 当所有文件上传完成时,显示成功提示(只显示一次)
   if (uploadingFiles.size === 0 && !hasShownSuccessNotification) {
     hasShownSuccessNotification = true;
+    // 判断是否为视频文件,显示相应的提示语
+    const isVideo = isVideoFile(uploadFile);
     ElNotification({
       title: "温馨提示",
-      message: "图片上传成功!",
+      message: isVideo ? "视频上传成功!" : "图片上传成功!",
       type: "success"
     });
   }

+ 3 - 45
src/views/licenseManagement/entertainmentLicense.vue

@@ -92,7 +92,7 @@
                   fit="cover"
                   class="record-image"
                   :preview-src-list="changeRecordList.map(record => record.imgUrl)"
-                  :initial-index="index"
+                  :initial-index="Number(index)"
                 >
                   <template #error>
                     <div class="image-slot">
@@ -128,8 +128,7 @@ import {
   uploadContractImage,
   submitEntertainmentLicenseReview,
   getEntertainmentChangeRecords,
-  getStoreEntertainmentLicenceStatus,
-  ocrRequestUrl
+  getStoreEntertainmentLicenceStatus
 } from "@/api/modules/licenseManagement";
 import { localGet } from "@/utils";
 
@@ -435,47 +434,6 @@ const uploadSingleFile = async (file: UploadFile) => {
       if (!imageUrlList.value.includes(imageUrl)) {
         imageUrlList.value.push(imageUrl);
       }
-
-      // 图片上传成功后调用 OCR 接口进行识别校验(其他资质证明)
-      try {
-        const params = {
-          imageUrls: imageUrl,
-          ocrType: "BUSINESS_LICENSE",
-          storeId: userInfo.storeId,
-          storeUserId: userInfo.id
-        };
-        const res: any = await ocrRequestUrl(params);
-        if (res.code == 200) {
-          ElMessage.success("识别成功");
-        } else {
-          // OCR 识别失败:提示并删除当前图片
-          ElMessage.error(res?.msg || "识别失败,请重试");
-          const index = fileList.value.findIndex((f: any) => f.uid === file.uid);
-          if (index > -1) {
-            fileList.value.splice(index, 1);
-          }
-          const urlIndex = imageUrlList.value.indexOf(imageUrl);
-          if (urlIndex > -1) {
-            imageUrlList.value.splice(urlIndex, 1);
-          }
-          if (file.url && file.url.startsWith("blob:")) {
-            URL.revokeObjectURL(file.url);
-          }
-        }
-      } catch (error) {
-        // 调用接口异常时:提示并删除当前图片
-        const index = fileList.value.findIndex((f: any) => f.uid === file.uid);
-        if (index > -1) {
-          fileList.value.splice(index, 1);
-        }
-        const urlIndex = imageUrlList.value.indexOf(imageUrl);
-        if (urlIndex > -1) {
-          imageUrlList.value.splice(urlIndex, 1);
-        }
-        if (file.url && file.url.startsWith("blob:")) {
-          URL.revokeObjectURL(file.url);
-        }
-      }
     } else {
       throw new Error(result?.msg || "图片上传失败");
     }
@@ -620,7 +578,7 @@ const handleSubmitReplace = async () => {
     uploading.value = false;
     await initData();
   } catch (error) {
-    ElMessage.error("提交审核失败");
+    // ElMessage.error("提交审核失败");
   }
 };
 

Diff do ficheiro suprimidas por serem muito extensas
+ 662 - 92
src/views/storeDecoration/officialPhotoAlbum/index.vue


Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff