Преглед на файлове

修改服务支撑的背景图片

zs преди 6 месеца
родител
ревизия
a0e92c7707
променени са 3 файла, в които са добавени 12 реда и са изтрити 2 реда
  1. BIN
      public/images/service.png
  2. 6 1
      src/views/detail/serviceDetail.vue
  3. 6 1
      src/views/seven/index.vue

BIN
public/images/service.png


+ 6 - 1
src/views/detail/serviceDetail.vue

@@ -8,7 +8,11 @@
             <div class="info_left">
               <el-carousel height="260px">
                 <el-carousel-item v-for="(item, index) in info.file" :key="index">
-                  <el-image class="image" :src="getUrl(item.uri)" fit="fill" />
+                  <el-image class="image" :src="getUrl(item.uri)" fit="fill">
+                    <template v-slot:error>
+                      <el-image class="image" :src="service" fit="fill" />
+                    </template>
+                  </el-image>
                 </el-carousel-item>
               </el-carousel>
             </div>
@@ -79,6 +83,7 @@
 </template>
 
 <script setup>
+import service from '/images/service.png'
 // 接口
 import { SupportStore } from '@/store/api/platform/support'
 const store = SupportStore()

+ 6 - 1
src/views/seven/index.vue

@@ -9,7 +9,11 @@
           <el-row :gutter="16">
             <el-col :span="6" v-for="(item, index) in list" :key="index" @click="toView(item)">
               <div class="list">
-                <el-image class="image" :src="getUrl(item.file)" fit="cover"> </el-image>
+                <el-image class="image" :src="getUrl(item.file)" fit="cover">
+                  <template v-slot:error>
+                    <el-image class="image" :src="service" fit="fill" />
+                  </template>
+                </el-image>
                 <el-col :span="24" class="name textOne">
                   <el-tooltip effect="dark" :content="item.name" placement="top">
                     {{ item.name || '暂无名称' }}
@@ -36,6 +40,7 @@
 </template>
 
 <script setup>
+import service from '/images/service.png'
 import { onBeforeRouteLeave } from 'vue-router'
 // 接口
 import { SupportStore } from '@/store/api/platform/support'