articleDetail.wxml
3.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!--pages/attract/articleDetail/articleDetail.wxml-->
<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='3'></text>
<text class='iconfont icon-zan icon' wx:else style='font-size: 48rpx;' catchtap='zan' id='{{detail.id}}' data-type='3'></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>