dangjiandetail.wxml 3.0 KB
<view class='title margin_set'>{{detail.title}}</view>
<view class='content margin_set'>
  <view class='article'>
    <view class='from' hidden='{{!detail.source}}'>来源:{{detail.source}}</view>
    <view class='time ar-time'>{{detail.create_time_text}}</view>
  </view>
  <import src="/wxParse/wxParse.wxml" />
  <template is="wxParse" data="{{wxParseData:contentHtml.nodes}}" />
</view>

<view class='comment_box' >
  <view class='comment_title' hidden='{{total==0}}'>评论</view>
  <view class='null_box' hidden='{{total>0}}'>暂无相关评论</view>
  <view class='comment_item' wx:for='{{comments}}' wx:key=''>
    <view class='left_box'>
      <image class='head_img' src='{{item.avatar}}'></image>
    </view>
    <view class='comment_content_box' bindtap='parentSet' id='{{item.id}}'>
      <view class='comment_name'>{{item.nickname}}</view>
      <view class='comment_content'>{{item.content}}</view>
      <view class='list_state_box'>
        <view class='time'>{{item.create_time_text}}</view>
        <view class='list_icon'>
          <view catchtap='zan' class='zan_box' data-indx="{{index}}" id='{{item.id}}' data-type='2'>
            <text class='time'>{{item.likes}}</text>
            <text class='iconfont icon-zan zan active' wx:if="{{item.is_like}}"></text>
            <text class='iconfont icon-zan zan' wx:else></text>
          </view>
        </view>
      </view>
    </view>
    <view class='sec_comments' wx:if="{{item.child.length>0}}">
      <view class='sec_comment' wx:for='{{item.child}}' wx:for-item='sec' wx:key=''>
        <view class='text_bottom'>
          <text class='color_blue'>{{sec.nickname}}:</text>{{sec.content}}
        </view>
      </view>
      <view class='underline'></view>
    </view>
  </view>
</view>


<view class='bottom_box' hidden='{{startComment}}'>
  <view class="label_item" bindtap='comment'>
    <text class='iconfont icon-bianji1 icon'></text>
    <view>{{content||"写评论"}}</view>
  </view>
  <view class='label_icon_box'>
    <view class='iconfont icon-pinglun icon pinglun'>
      <text class='count' hidden='{{total==0}}'>{{total}}</text>
    </view>
    <view class='iconfont icon-fenxiang icon fenxiang'>
      <button open-type='share'></button>
    </view>
    <text class='iconfont icon-zan icon active' style='font-size: 48rpx;' wx:if="{{detail.is_like}}" catchtap='zan' id='{{detail.id}}' data-type='4'></text>
    <text class='iconfont icon-zan icon' wx:else style='font-size: 48rpx;' catchtap='zan' id='{{detail.id}}' data-type='4'></text>
  </view>
</view>

<view class='bottom_box' hidden='{{!startComment}}'>
  <view class='bottom_box_input'>
    <input placeholder='发表评论...' value='{{content}}' focus='{{startComment}}' bindinput='subComments' bindblur='outFocus' cursor-spacing='10' class='comments' />
    <!-- <view class='sub_box comments' bindtap='comment' hidden='{{startComment}}'>{{content||"发表评论..."}}</view> -->
  </view>
  <view class='bottom_box_text' bindtap='s'>
    发表
  </view>
</view>