@@ -84,6 +84,7 @@ view{
.aParse-img{
/*background-color: #efefef;*/
overflow: hidden;
+ background-position:top !important;
}
.aParse-blockquote {
@@ -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 name="AEmojiView">
<view class="AEmojiView aParse-inline" style="{{item.styleStr}}">
@@ -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({
@@ -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 = {
@@ -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>
</scroll-view>
<no-data a:if="{{list.length==0}}"></no-data>