瀏覽代碼

系统公告点击图片可放大查看

347617796@qq.com 4 年之前
父節點
當前提交
999fdb5bc1

+ 1 - 0
Component/aParse/aParse.acss

@@ -84,6 +84,7 @@ view{
 .aParse-img{
     /*background-color: #efefef;*/
     overflow: hidden;
+    background-position:top !important;
 }
 
 .aParse-blockquote {

+ 1 - 1
Component/aParse/aParse.axml

@@ -7,7 +7,7 @@
   </view>
 </template>
 <template name="aParseImg">
-  <image class="{{item.classStr}} aParse-{{item.tag}}" data-from="{{item.from}}" data-src="{{item.attr.src}}" data-idx="{{item.imgIndex}}" src="{{item.attr.src}}" mode="aspectFit" bindload="aParseImgLoad" bindtap="aParseImgTap" mode="widthFix" style="width:{{item.width}}px;" />
+  <image class="{{item.classStr}} aParse-{{item.tag}}" data-from="{{item.from}}" data-src="{{item.attr.src}}" data-idx="{{item.imgIndex}}" src="{{item.attr.src}}" mode="aspectFit" bindload="aParseImgLoad" catchTap="aParseImgTap" mode="widthFix" style="width:{{item.width}}px;" />
 </template>
 <template name="AEmojiView">
   <view class="AEmojiView aParse-inline" style="{{item.styleStr}}">

+ 2 - 1
Component/aParse/aParse.js

@@ -43,8 +43,9 @@ function aParse(bindName = 'aParseData', type = 'html', data = '<div class="colo
 }
 // 图片点击事件
 function aParseImgTap(e) {
+  console.log(e);
   var that = this;
-  var nowImgUrl = e.target.dataset.src;
+  var nowImgUrl = e.target.dataset.idx;
   var tagFrom = e.target.dataset.from;
   if (typeof (tagFrom) != 'undefined' && tagFrom.length > 0) {
     dd.previewImage({

+ 2 - 0
Component/aParse/html2json.js

@@ -51,10 +51,12 @@ function trimHtml(html) {
 
 
 function html2json(html, bindName) {
+    
     //处理字符串
     html = removeDOCTYPE(html);
     html = trimHtml(html);
     html = aDiscode.strDiscode(html);
+    // console.log(html)
     //生成node节点
     var bufArray = [];
     var results = {

+ 1 - 1
pages/deploy/upgrade/upgrade.axml

@@ -9,7 +9,7 @@
     <scroll-view scroll-y="{{true}}" class="scroll" a:if="{{list.length>0}}" onScrollToLower="onScrollToLower">
       <view class="li" a:for="{{list}}" catchTap="openDetail" data-id="{{item.id}}">
         <view class="font-flex-word">{{item.title}}</view>
-        <view class="fontColorT">发布时间:{{item.create_time}}</view>
+        <view class="fontColorT">发布时间:{{item.publish_time}}</view>
       </view>
     </scroll-view>
     <no-data a:if="{{list.length==0}}"></no-data>