tangning 5 달 전
부모
커밋
606a47c848
2개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 0
      src/util/index.ts
  2. 6 4
      src/view/case/help.ts

+ 1 - 0
src/util/index.ts

@@ -220,6 +220,7 @@ export const urlToBlob = async (url: string) => {
     console.log('urlToBlob', blob);
     if(blob.type == 'text/html'){
       throw "暂未获取到平面图,请前往三维场景制作";
+      return
     }
     return blob;
   } catch (error) {

+ 6 - 4
src/view/case/help.ts

@@ -203,10 +203,12 @@ export const getFuseImage = async (
         newUrl = `/oss/scene_view_data/${num}/user/cad-style-3-${typeMap.sdk.Scene.floorId}.jpg`
        // /oss/scene_view_data/YZL-jm-3EOpLfZxim9/user/cad-style-3.jpg
        let newBlob = await urlToBlob(newUrl)
-       blob = await imageCropper({
-        img: newBlob,
-        fixed: [width, height]
-       })
+       if(newBlob.type != 'text/html'){
+        blob = await imageCropper({
+          img: newBlob,
+          fixed: [width, height]
+         })
+       }
        console.error("截图尺寸2", blob);
       } else {
         alert("暂未获取到平面图,请前往三维场景制作");