LAPTOP-UBJMM5MG\user 1 рік тому
батько
коміт
713f117723
1 змінених файлів з 9 додано та 6 видалено
  1. 9 6
      src/views/zhaoshang/index.vue

+ 9 - 6
src/views/zhaoshang/index.vue

@@ -29,15 +29,15 @@
               </div>
               <div class="zs-wrap">
                 <div class="device-title" @click="detail(item.eventIndex)">
-                  <img :src="item.img" alt="">
+                  <img :src="item.img?item.img:'@/assets/images/zs1.png'" alt="">
                 </div>
                 <div class="zc-content">
                   <div>
                     <!--                    <p>对符合以下要求的项目准许入园并给予扶持:</p>-->
                     <div>
                       <h3>{{ item.title }}</h3>
-<!--                      <p>{{ item.detail }}</p>-->
-                      <p v-html="item.detail"></p>
+                      <!--                      <p>{{ item.detail }}</p>-->
+                      <p v-html="item.detail" />
                     </div>
                   </div>
                   <!--                  <div v-else-if="item.eventIndex==2">-->
@@ -109,10 +109,13 @@ export default {
                 this.zsList = []
                 if (res.data) {
                     res.data.forEach((item, index) => {
-                        console.log('ccc', JSON.parse(item.fileUrl))
-                        const image = JSON.parse(item.fileUrl)[0].url
+                        // console.log('ccc', JSON.parse(item.fileUrl))
+                        // let image = ''
+                        // if (item.fileUrl.length) {
+                        //     image = JSON.parse(item.fileUrl)[0].url
+                        // }
                         this.zsList.push({
-                            img: image,
+                            img: (index + 1) % 3 === 0 ? require('../../assets/images/zs1.png') : (index + 1) % 2 === 0 ? require('../../assets/images/zs2.png') : require('../../assets/images/zs3.png'),
                             name: item.policyBig,
                             title: item.title,
                             eventIndex: index,