Explorar el Código

长图文添加富文本类型

xiaohaizhao hace 1 año
padre
commit
cd74abb014
Se han modificado 2 ficheros con 15 adiciones y 7 borrados
  1. 10 4
      packageA/advertising/modules/page.vue
  2. 5 3
      pages/index/index/index.vue

+ 10 - 4
packageA/advertising/modules/page.vue

@@ -1,8 +1,11 @@
 <template>
     <view>
-        <image v-for="(item, index) in detail.attinfos_pic" :key="item.attachmentid" class="image"
-            :src="item.attinfos[0].url" mode="widthFix" hover-class="navigator-hover" lazy-load="true"
-            @click="onClick(item, index)" />
+        <block v-if="detail.type == 1">
+            <image v-for="(item, index) in detail.attinfos_pic" :key="item.attachmentid" class="image"
+                :src="item.attinfos[0].url" mode="widthFix" hover-class="navigator-hover" lazy-load="true"
+                @click="onClick(item, index)" />
+        </block>
+        <u-parse v-else-if="detail.type == 3" :content="detail.content" />
 
         <bottom1 v-if="detail.sharepagecontrol.style_bottom == '默认黑色预约报名样式'" />
         <view v-else style="height: 10px;" />
@@ -17,7 +20,10 @@ export default {
     components: { bottom1 },
     data() {
         return {
-            detail: {},
+            detail: {
+                type: 1,//1图片 2视频 3图文
+                content: ""
+            },
         }
     },
     methods: {

+ 5 - 3
pages/index/index/index.vue

@@ -125,7 +125,8 @@ export default {
                         "id": 20240416153202,
                         "content": {
                             "longitude": s.longitude,
-                            "latitude": s.latitude
+                            "latitude": s.latitude,
+                            date: Date.now()
                         }
                     }).then(res => {
                         this.getLocationLoading = false;
@@ -321,10 +322,11 @@ export default {
     overflow: hidden;
 
     .popup-row {
+        display: flex;
+        align-items: center;
+        justify-content: center;
         width: 100vw;
         height: 50px;
-        line-height: 50px;
-        text-align: center;
         background: #FFFFFF;
         box-shadow: inset 0px -1px 0px 1px #DDDDDD;
         font-family: Source Han Sans SC, Source Han Sans SC;