yuminge-app/yun-min-program-plugin-master/packageA/member/article/articleContent/articleContent.wxml

175 lines
7.7 KiB
Plaintext

<!--pages/member/article/articleContent/articleContent.wxml-->
<!-- <import src="../../../../wxParse/wxParse.wxml" /> -->
<view id='article'>
<view class='head-title'>{{articleData.title}}</view>
<view class='title'>
<text class='time text-padding' wx:if="{{articleData.virtual_at}}">
{{articleData.virtual_at}}
</text>
<text class='time text-padding' wx:if="{{!articleData.virtual_at}}">
{{articleData.created_at}}
</text>
<text class='author'>{{articleData.author}}</text>
</view>
<view class='content'>
<!-- <block wx:if="{{article.nodes}}">
<template is="wxParse" data="{{wxParseData:article.nodes}}" />
</block>
<rich-text wx:if="{{!article.nodes}}" nodes="{{article_content}}"></rich-text> -->
<mp-html content="{{article_content}}" />
</view>
<view class='article' wx:if="{{articleData.advs_type !=0}}" bindtap='toAdv'>
<view>
<text class='head-title'>{{articleData.advs_title}}</text>
</view>
<view wx:if="{{articleData.advs_img}}">
<image class='thumb' src="{{articleData.advs_img}}" mode="widthFix"></image>
</view>
<view>
<text class='info'>{{articleData.advs_title_footer}}</text>
</view>
</view>
<view class="foot">
<view class="read-content">
<text class="text-padding">阅读 {{read_num}}</text>
<text class="text-padding" bindtap='clickLike' wx:if="{{is_liked !=0}}">已点赞 {{like_num}}</text>
<text bindtap='clickLike' wx:if="{{is_liked ==0}}">点赞 {{like_num}}</text>
<!-- <text style="padding-left: 20rpx;" wx:if="{{comment}}">评论({{commentNum}})</text> -->
<text wx:if="{{comment}}">评论({{commentNum}})</text>
</view>
<view class="report">
<text bindtap='toReport' class='text-padding' wx:if="{{articleData.report_enabled !=0}}">举报</text>
<text bindtap='toLink' wx:if="{{articleData.small_link}}" data-link="{{articleData.small_link}}">阅读原文</text>
</view>
</view>
<view class="qrCode" wx:if="{{qr == 0}}">
<text class='qr'>【二维码】</text>
<view class="code-content ">
<!-- <view>长按保存二维码</view> -->
<view>
<image class='codeUrl' src="{{miQrCodeUrl}}" data-src='{{miQrCodeUrl}}' bindtap='previewImage' mode="scaleToFill "></image>
</view>
</view>
</view>
</view>
<view class="comment" wx:if="{{comment}}">
<view style="width: 100%; height: 0.31rem; background: #f2f2f2;"></view>
<view class="title">评论详情</view>
<view class="commentList">
<view class="firstComment" wx:for="{{commentList}}" wx:key="ind" wx:for-index="ind"
catchtap="delComment" data-item="{{item}}" data-ind="{{ind}}">
<view class="userTop">
<view class="image">
<image src="{{item.head_image}}" alt=""></image>
</view>
<view class="user">
<view class="userName">{{item.nick_name}}</view>
<view class="dateDay">{{item.created_at}}</view>
<view class="contenBox">
<view class="txt">{{item.content}}</view>
<view class="contenImg" wx:if="{{item.comment_images.length > 0}}" catchtap="watchImg" data-item="{{item.comment_images}}">
<image src="{{item.comment_images}}" alt=""></image>
</view>
</view>
</view>
<view class="reply" catchtap="replyBtn" data-item="{{item}}" data-kind="{{ind}}">回复</view>
</view>
<!-- 回复的评论 -->
<view class="commentLis" wx:if="{{item.child}}" wx:for="{{item.child}}" wx:key="index"
wx:for-item="info" catchtap="delComment" data-item="{{info}}" data-ind="{{ind}}" data-index="{{index}}">
<view class="userTop">
<view class="image">
<image src="{{info.head_image}}" alt="" wx:if="{{info.head_image}}"></image>
<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/photo-mr.jpg" wx:else></image>
</view>
<view class="user">
<view class="userName">{{info.nick_name}}</view>
<view class="dateDay">{{info.created_at}}</view>
<view class="contenBox">
<view class="txt">
<view wx:if="{{info.reply_id != '0' || info.reply_name}}">
回复{{info.reply_name}}:
</view>
{{info.content}}
</view>
<view class="contenImg" wx:if="{{info.comment_images.length > 0}}" catchtap="watchImg" data-item="{{info.comment_images}}">
<image src="{{info.comment_images}}" alt=""></image>
</view>
</view>
</view>
<view class="reply" catchtap="replyBtn" data-item="{{info}}" data-kind="{{ind}}">回复</view>
</view>
</view>
<!-- 加在更多评论 -->
<view class="commentLis" wx:if="{{item.reply_num > 0 && item.commentShow}}">
<view class="commentMore" catchtap="moreCommentLis" data-item="{{item}}" data-ind="{{ind}}">
显示展开{{item.reply_num}}条回复
<van-icon name="arrow-down" />
</view>
</view>
</view>
<view class="commentMore" wx:if="{{commentPage < last_page}}" catchtap="getMore">
展开更多的评论
<van-icon name="arrow-down" />
</view>
</view>
<!-- 回复输入框 -->
<view class="replyInp">
<view class="userImg">
<image src="{{commenMember.avatar_image}}" alt=""></image>
</view>
<view class="inpNav" catchtap="subMainCommentBtn">
<input disabled type="text" placeholder="来都来了,留下点什么吧" />
</view>
</view>
</view>
<!-- 评论弹窗 -->
<van-popup show="{{mainCommentShow}}" position="bottom" overlay="{{true}}" bind:close="mainCommentShowClose">
<view class="replyMainComment">
<view class="left">
<textarea value="{{maincomment}}" auto-height placeholder="请留下你的精彩评论吧" bindinput="maincommentinp" />
<view class="comment-img replyMainComment-img" wx:if="{{imgList.length > 0}}">
<view class="comment-img-child" wx:for-item="commentImg" wx:for="{{imgList}}" catchtap="openImgPreview" data-activeImg="{{commentImg}}" data-imgs="{{imgList}}">
<image src="{{commentImg}}" alt="" mode='widthFix' />
<icon class="iconfont icon-guanbi" data-index="{{index}}" catchtap="delCommentIMg"></icon>
</view>
</view>
</view>
<view class="right" catchtap="subMainBtn" data-type="main">发送</view>
</view>
<view class="operate-boxs">
<view class="operate-btn" catchtap="uploaderFun">
<icon class="iconfont icon-ht_basis_singlepic"></icon>
</view>
</view>
</van-popup>
<!-- 回复弹窗 -->
<van-popup show="{{replyshow}}" position="bottom" overlay="{{true}}" bind:close="replyshowClose">
<view class="replyComment">
<view class="top">
<view class="left">
回复
<span class="selcolor">@{{ replyName }}</span>
</view>
</view>
<view class="replyMainComment">
<view class="left">
<textarea value="{{replyContent}}" auto-height placeholder="请输入你的回复吧" bindinput="replyContentinp" />
<view class="comment-img replyMainComment-img" wx:if="{{imgList.length > 0}}">
<view class="comment-img-child" wx:for-item="commentImg" wx:for="{{imgList}}" catchtap="openImgPreview" data-activeImg="{{commentImg}}" data-imgs="{{imgList}}">
<image src="{{commentImg}}" alt="" mode='widthFix' />
<icon class="iconfont icon-guanbi" data-index="{{index}}" catchtap="delCommentIMg"></icon>
</view>
</view>
</view>
<view class="right" catchtap="subMainBtn" data-type="reply">发送</view>
</view>
<view class="operate-boxs">
<view class="operate-btn" catchtap="uploaderFun">
<icon class="iconfont icon-ht_basis_singlepic"></icon>
</view>
</view>
</view>
</van-popup>