From 2c2dad24d59b37df254d1c003d6c3e1119b51d6c Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期三, 11 八月 2021 14:28:05 +0800
Subject: [PATCH] update 更新 阿里云 maven源 新地址

---
 ruoyi-ui/src/views/system/oss/index.vue |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ruoyi-ui/src/views/system/oss/index.vue b/ruoyi-ui/src/views/system/oss/index.vue
index 724a6cc..a183938 100644
--- a/ruoyi-ui/src/views/system/oss/index.vue
+++ b/ruoyi-ui/src/views/system/oss/index.vue
@@ -109,12 +109,12 @@
       <el-table-column label="鏂囦欢灞曠ず" align="center" prop="url">
         <template slot-scope="scope">
           <el-image
-            v-if="previewListResource && scope.row.fileSuffix.indexOf('png','jpg','jpeg') > 0"
+            v-if="previewListResource && checkFileSuffix(scope.row.fileSuffix)"
             style="width: 100px; height: 100px;"
             :src="scope.row.url"
             :preview-src-list="[scope.row.url]"/>
           <span v-text="scope.row.url"
-                v-if="scope.row.fileSuffix.indexOf('png','jpg','jpeg') < 0 || !previewListResource"/>
+                v-if="!checkFileSuffix(scope.row.fileSuffix) || !previewListResource"/>
         </template>
       </el-table-column>
       <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180">
@@ -170,7 +170,7 @@
 
 <script>
 import { listOss, delOss } from "@/api/system/oss";
-import { downLoadOss } from "@/utils/zipdownload";
+import { downLoadOss } from "@/utils/download";
 
 export default {
   name: "Oss",
@@ -247,6 +247,12 @@
         this.loading = false;
       });
     },
+    checkFileSuffix(fileSuffix) {
+      let arr = ["png", "jpg", "jpeg"];
+      return arr.some(type => {
+        return fileSuffix.indexOf(type) > -1;
+      });
+    },
     // 鍙栨秷鎸夐挳
     cancel() {
       this.open = false;

--
Gitblit v1.9.3