Pārlūkot izejas kodu

Merge branch 'master' of http://192.168.0.115:3000/chenzhiguang/new_era

xzw 3 gadi atpakaļ
vecāks
revīzija
c8c9de2317

+ 5 - 5
src/components/hotspot/image.vue

@@ -4,7 +4,7 @@
     <div class="vhotspotcon">
       <div class="vtitle" v-if="hotspot.title" v-html="hotspot.title"></div>
       <div class="hotspotcon" :class="{hotconfull:!hotspot.title&&!(hotspot.title||hotspot.imagesDesc[active])}">
-        <div class="img-con"  :class="{ bigImg: !hotspot.imagesDesc[active] }">
+        <div class="img-con"  :class="{ bigImg: !hotspot.imagesDesc[active] || !hotspot.contents[active] }">
           <div class="imgmain">
             <img id="map" :src="g_fixUrl(hotspot.images[active])" alt="" />
           </div>
@@ -15,14 +15,14 @@
         </div>
         </div>
         
-        <div class="desc" v-html="handleContent(hotspot.imagesDesc[active])"></div>
+        <div class="desc" v-html="handleContent(hotspot.imagesDesc[active] || hotspot.contents[active])"></div>
       </div>
     </div>
     <img class="aa" v-if="hotspot.images.length > 1" :src="require('@/assets/images/proj2022/pc/right_1.png')" alt="" @click="handlePage('next')" />
   </div>
 
   <div v-else class="mbhotspot">
-    <div class="mbhcon" :class="{ fullcon: !hotspot.content }">
+    <div class="mbhcon" :class="{ fullcon: !hotspot.content || !hotspot.contents[active] }">
       <div class="img-con">
         <img class="aa" v-if="hotspot.images.length > 1" :src="require('@/assets/images/proj2022/mobile/prev.png')" alt="" @click="handlePage('prev')" />
         <div class="imgmain" >
@@ -30,9 +30,9 @@
         </div>
         <img class="aa"  v-if="hotspot.images.length > 1" :src="require('@/assets/images/proj2022/mobile/next.png')" alt="" @click="handlePage('next')" />
       </div>
-      <div class="desc" v-if="hotspot.imagesDesc[active]">
+      <div class="desc" v-if="hotspot.imagesDesc[active] || hotspot.contents[active]">
         <div class="title" v-html="hotspot.title"></div>
-        <div v-html="handleContent(hotspot.imagesDesc[active], 14)"></div>
+        <div v-html="handleContent(hotspot.imagesDesc[active] || hotspot.contents[active], 14)"></div>
       </div>
     </div>
   </div>

+ 1 - 1
src/components/hotspot/video.vue

@@ -2,7 +2,7 @@
   <div class="hotspot" v-if="!isMobile">
     <div class="vhotspotcon">
       <div class="vtitle" v-if="hotspot.title" v-html="hotspot.title"></div>
-      <div class="hotspotcon" :class="{ hotconfull: !hotspot.title && !(hotspot.title || hotspot.imagesDesc[active]) }">
+      <div class="hotspotcon" :class="{ hotconfull: !hotspot.title && !(hotspot.title || hotspot.contents[active]) }">
         <div class="playerContainer" :id="`container${rand}`"></div>
         <div class="desc" v-html="hotspot.content"></div>
       </div>

+ 1 - 0
src/mixins/index.js

@@ -75,6 +75,7 @@ Vue.mixin({
       if (!content) {
         return "";
       }
+      console.log(1111);
       var reg = new RegExp(" {4}", "g"); //g就是代表全部
       return content.replace(reg, `<span style="display:inline-block;width:${fontsize * 2}px;"></span>`);
     },