tangning 5 months ago
parent
commit
88e3f55449
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/util/index.ts

+ 3 - 0
src/util/index.ts

@@ -218,6 +218,9 @@ export const urlToBlob = async (url: string) => {
     const response = await fetch(url, { mode: 'no-cors' }); // 获取文件内容
     const blob = await response.blob(); // 转成 blob
     console.log('urlToBlob', blob);
+    if(blob.type == 'text/html'){
+      throw "暂未获取到平面图,请前往三维场景制作";
+    }
     return blob;
   } catch (error) {
     // 请求出错,说明图片不存在