From a5eb8bfb3869b0cec349ed795670d355675abd6b Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期四, 14 十二月 2023 21:14:19 +0800
Subject: [PATCH] bug修改

---
 src/components/filePictrue/index.vue |   38 ++++++++++++++++++++++++--------------
 1 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/src/components/filePictrue/index.vue b/src/components/filePictrue/index.vue
index d9062b9..d2c5c55 100644
--- a/src/components/filePictrue/index.vue
+++ b/src/components/filePictrue/index.vue
@@ -46,14 +46,19 @@
 
     let pic = this.filesPictureVo.imageResources;
     pic.forEach((item) => {
-      let urls = item.url.split(",");
-      item.url = [];
-      urls.forEach((o) => {
-        o = o.replace("[", "").replace("]", "");
-        item.url.push(`${FILE_ORIGINAL_URL}sccg/API/img?fileUrl=${o}`);
-      });
+      if (item.url) {
+        if (typeof item.url == "string") {
+          let urls = item.url.split(",");
+          item.url = [];
+          urls.forEach((o) => {
+            o = o.replace("[", "").replace("]", "");
+            item.url.push(`${FILE_ORIGINAL_URL}sccg/API/img?fileUrl=${o}`);
+          });
+        }
+      } else {
+        item.url = [];
+      }
     });
-    debugger;
     this.imgSource = pic;
     // this.getEventInfo(this.mycode);
   },
@@ -80,14 +85,19 @@
         this.dialogView = true;
         let pic = res.data.filesPictureVo.imageResources;
         pic.forEach((item) => {
-          let urls = item.url.split(",");
-          item.url = [];
-          urls.forEach((o) => {
-            o = o.replace("[", "").replace("]", "");
-            item.url.push(`${FILE_ORIGINAL_URL}sccg/API/img?fileUrl=${o}`);
-          });
+          if (item.url) {
+            if (typeof item.url == "string") {
+              let urls = item.url.split(",");
+              item.url = [];
+              urls.forEach((o) => {
+                o = o.replace("[", "").replace("]", "");
+                item.url.push(`${FILE_ORIGINAL_URL}sccg/API/img?fileUrl=${o}`);
+              });
+            }
+          } else {
+            item.url = [];
+          }
         });
-        debugger;
         this.imgSource = pic;
       });
     },

--
Gitblit v1.8.0