guhongwei 4 éve
szülő
commit
2d7a730a3f
2 módosított fájl, 15 hozzáadás és 4 törlés
  1. 2 2
      src/views/service/parts/info.vue
  2. 13 2
      src/views/service/parts/list.vue

+ 2 - 2
src/views/service/parts/info.vue

@@ -99,12 +99,12 @@ export default {
     margin: 0 0 5px 0;
     .el-image {
       width: 100%;
-      height: 200px;
+      height: 100%;
       margin: 0 0 5px 0;
     }
     /deep/.image-slot img {
       width: 100%;
-      height: 200px;
+      height: 100%;
       vertical-align: top;
     }
   }

+ 13 - 2
src/views/service/parts/list.vue

@@ -59,10 +59,12 @@
                 controlsList="nodownload"
                 :src="item.fileUrl[0].url"
                 loop="loop"
+                v-if="item.fileUrl.length > 0"
               >
                 <source src="movie.ogg" type="video/ogg" />
                 <source src="movie.mp4" type="video/mp4" />
               </video>
+              <p v-else>暂无视频</p>
             </el-col>
             <el-col :span="24" class="other">
               <el-col :span="20" class="left">{{ item.origin || '系统管理员' }}{{ item.create_time || item.renew_time || '暂无时间' }}</el-col>
@@ -75,7 +77,7 @@
             <el-col :span="24" class="title">
               {{ item.title }}
             </el-col>
-            <el-col :span="24" class="video" v-if="item.fileUrl.length > 0">
+            <el-col :span="24" class="video">
               <video
                 controls="controls"
                 preload="meta"
@@ -85,12 +87,14 @@
                 x5-video-player-type="h5"
                 x5-video-player-fullscreen="true"
                 controlsList="nodownload"
-                :src="item.fileUrl && item.fileUrl[0].url"
+                :src="item.fileUrl[0].url"
                 loop="loop"
+                v-if="item.fileUrl.length > 0"
               >
                 <source src="movie.ogg" type="video/ogg" />
                 <source src="movie.mp4" type="video/mp4" />
               </video>
+              <p v-else>暂无视频</p>
             </el-col>
             <el-col :span="24" class="other">
               <el-col :span="20" class="left">{{ item.origin || '系统管理员' }}{{ item.create_time || item.renew_time || '暂无时间' }}</el-col>
@@ -248,6 +252,13 @@ export default {
           width: 100%;
           height: 100%;
         }
+        p {
+          text-align: center;
+          height: 200px;
+          line-height: 200px;
+          font-size: 20px;
+          font-weight: bold;
+        }
       }
       .other {
         font-size: 14px;