|
1 | | -<view class="topic-container fadein-init {{bIsReady ? 'fadein' : ''}}"> |
2 | | - <view class="topic-main"> |
3 | | - <!-- 标题 --> |
4 | | - <h3 class="fw-500">{{oTopicDetail.title}}</h3> |
5 | | - <!-- 基本信息 --> |
6 | | - <view class="topic-info vh-parent"> |
7 | | - <navigator class="topic-info-left fl-left rounded-p50" url="/pages/user/user?name={{oTopicDetail.loginname}}"> |
8 | | - <image class="w-p100 h-p100 rounded-p50" src="{{oTopicDetail.avatar_url}}" /> |
9 | | - </navigator> |
10 | | - <view class="topic-info-center"> |
11 | | - <view style="margin-bottom: 15rpx;"> |
12 | | - <topic-tag type="{{oTopicDetail.tab}}" style="margin-right: 15rpx;"></topic-tag> |
13 | | - <text>{{oTopicDetail.loginname}}</text> |
14 | | - </view> |
15 | | - <view class="color-grey" style="font-size: 28rpx;"> |
16 | | - <text>{{oTopicDetail.create_at}}创建</text> |
17 | | - <text style="padding: 0 5rpx;">·</text> |
18 | | - <text>{{oTopicDetail.visit_count}}次浏览</text> |
19 | | - </view> |
20 | | - </view> |
21 | | - <i |
22 | | - class="v icon icon-collect {{oTopicDetail.is_collect ? 'color-green' : 'color-grey'}}" |
23 | | - style="right: 10rpx;font-size: 50rpx;" |
24 | | - bindtap="fnTapSwitchTopicCollectStatus"> |
25 | | - </i> |
26 | | - </view> |
27 | | - <!-- 内容 --> |
28 | | - <view class="topic-content"> |
29 | | - <wemark type="wemark" md="{{oTopicDetail.content}}" highlight link></wemark> |
30 | | - </view> |
| 1 | +<view class="topic-page-container"> |
| 2 | + <!-- 页面首次加载时的loading --> |
| 3 | + <view wx:if="{{!bIsReady}}" class="h-vh100 vh-parent fs-28 color-grey"> |
| 4 | + <text class="vh">加载中...</text> |
31 | 5 | </view> |
32 | | - <!-- 评论列表 --> |
33 | | - <view class="topic-comment-list"> |
34 | | - <view class="topic-comment-list-header">{{oTopicDetail.replies.length}}条评论</view> |
35 | | - <view class="topic-comment-item" wx:for="{{oTopicDetail.replies}}" wx:key="{{index}}"> |
36 | | - <view class="vh-parent clf"> |
37 | | - <!-- 评论者信息 --> |
38 | | - <navigator class="topic-comment-left fl-left rounded-p50" url="/pages/user/user?name={{item.loginname}}"> |
39 | | - <image class="w-p100 h-p100 rounded-p50" src="{{item.avatar_url}}" /> |
| 6 | + <view class="fadein-init {{bIsReady ? 'fadein' : ''}}"> |
| 7 | + <view class="topic-main"> |
| 8 | + <!-- 标题 --> |
| 9 | + <h3 class="fw-500">{{oTopicDetail.title}}</h3> |
| 10 | + <!-- 基本信息 --> |
| 11 | + <view class="topic-info vh-parent"> |
| 12 | + <navigator class="topic-info-left fl-left rounded-p50" url="/pages/user/user?name={{oTopicDetail.loginname}}"> |
| 13 | + <image class="w-p100 h-p100 rounded-p50" src="{{oTopicDetail.avatar_url}}" /> |
40 | 14 | </navigator> |
41 | | - <view class="topic-comment-center"> |
42 | | - <view style="margin-bottom: 15rpx;">{{item.loginname}}</view> |
| 15 | + <view class="topic-info-center"> |
| 16 | + <view style="margin-bottom: 15rpx;"> |
| 17 | + <topic-tag type="{{oTopicDetail.tab}}" style="margin-right: 15rpx;"></topic-tag> |
| 18 | + <text>{{oTopicDetail.loginname}}</text> |
| 19 | + </view> |
43 | 20 | <view class="color-grey" style="font-size: 28rpx;"> |
44 | | - <text class="color-green">{{index + 1}}楼</text> |
| 21 | + <text>{{oTopicDetail.create_at}}创建</text> |
45 | 22 | <text style="padding: 0 5rpx;">·</text> |
46 | | - <text>{{item.create_at}}</text> |
| 23 | + <text>{{oTopicDetail.visit_count}}次浏览</text> |
47 | 24 | </view> |
48 | 25 | </view> |
49 | | - <!-- 点赞icon和点赞数 --> |
50 | | - <view |
51 | | - class="v" |
52 | | - style="color: #757575;right: 10rpx;font-size: 24rpx;" |
53 | | - data-id="{{item.id}}" |
54 | | - data-index="{{index}}" |
55 | | - bindtap="fnTapLikeCommentOrDislike" |
56 | | - > |
57 | | - <i class="icon icon-up {{item.is_uped ? 'color-green' : ''}}" style="font-size: 50rpx;margin-right: 10rpx;"></i> |
58 | | - <text class="inbl vtal-top" style="height: 50rpx;line-height: 60rpx;">{{item.ups.length}}</text> |
59 | | - </view> |
| 26 | + <i |
| 27 | + class="v icon icon-collect {{oTopicDetail.is_collect ? 'color-green' : 'color-grey'}}" |
| 28 | + style="right: 10rpx;font-size: 50rpx;" |
| 29 | + bindtap="fnTapSwitchTopicCollectStatus"> |
| 30 | + </i> |
60 | 31 | </view> |
61 | | - <!-- 评论内容 --> |
62 | | - <view class="topic-comment-content"> |
63 | | - <wemark type="wemark" md="{{item.content}}" highlight link></wemark> |
| 32 | + <!-- 内容 --> |
| 33 | + <view class="topic-content"> |
| 34 | + <wemark type="wemark" md="{{oTopicDetail.content}}" highlight link></wemark> |
| 35 | + </view> |
| 36 | + </view> |
| 37 | + <!-- 评论列表 --> |
| 38 | + <view class="topic-comment-list"> |
| 39 | + <view class="topic-comment-list-header">{{oTopicDetail.replies.length}}条评论</view> |
| 40 | + <view class="topic-comment-item" wx:for="{{oTopicDetail.replies}}" wx:key="{{index}}"> |
| 41 | + <view class="vh-parent clf"> |
| 42 | + <!-- 评论者信息 --> |
| 43 | + <navigator class="topic-comment-left fl-left rounded-p50" url="/pages/user/user?name={{item.loginname}}"> |
| 44 | + <image class="w-p100 h-p100 rounded-p50" src="{{item.avatar_url}}" /> |
| 45 | + </navigator> |
| 46 | + <view class="topic-comment-center"> |
| 47 | + <view style="margin-bottom: 15rpx;">{{item.loginname}}</view> |
| 48 | + <view class="color-grey" style="font-size: 28rpx;"> |
| 49 | + <text class="color-green">{{index + 1}}楼</text> |
| 50 | + <text style="padding: 0 5rpx;">·</text> |
| 51 | + <text>{{item.create_at}}</text> |
| 52 | + </view> |
| 53 | + </view> |
| 54 | + <!-- 点赞icon和点赞数 --> |
| 55 | + <view |
| 56 | + class="v" |
| 57 | + style="color: #757575;right: 10rpx;font-size: 24rpx;" |
| 58 | + data-id="{{item.id}}" |
| 59 | + data-index="{{index}}" |
| 60 | + bindtap="fnTapLikeCommentOrDislike" |
| 61 | + > |
| 62 | + <i class="icon icon-up {{item.is_uped ? 'color-green' : ''}}" style="font-size: 50rpx;margin-right: 10rpx;"></i> |
| 63 | + <text class="inbl vtal-top" style="height: 50rpx;line-height: 60rpx;">{{item.ups.length}}</text> |
| 64 | + </view> |
| 65 | + </view> |
| 66 | + <!-- 评论内容 --> |
| 67 | + <view class="topic-comment-content"> |
| 68 | + <wemark type="wemark" md="{{item.content}}" highlight link></wemark> |
| 69 | + </view> |
64 | 70 | </view> |
65 | 71 | </view> |
66 | 72 | </view> |
|
0 commit comments