Browse Source

留言互动 详情 评论数

master
chenteng 5 years ago
parent
commit
1bc70697a1
  1. 4
      pages/topics/interactive/topicArticle/index.js
  2. 5
      pages/topics/interactive/topicArticle/index.wxml

4
pages/topics/interactive/topicArticle/index.js

@ -36,6 +36,7 @@ Page({
startX: 0, //开始坐标 startX: 0, //开始坐标
startY: 0, startY: 0,
total:0
}, },
/** /**
@ -86,6 +87,9 @@ Page({
//console.log('议题评论') //console.log('议题评论')
const datas = res.result.list const datas = res.result.list
this.setData({
total: res.result.total
})
let tempDatas = [] let tempDatas = []
datas.forEach(item => { datas.forEach(item => {
tempDatas.push({ tempDatas.push({

5
pages/topics/interactive/topicArticle/index.wxml

@ -40,7 +40,8 @@
<view class="topic_comment"> <view class="topic_comment">
<view class="topic_comment_top"> <view class="topic_comment_top">
<view> <view>
{{'评论 ' + commentList.length}} <!-- 评论数修改 -->
{{'评论 ' + total}}
</view> </view>
<button class="commnetBtn" size="mini" bindtap="onTapComment">评论</button> <button class="commnetBtn" size="mini" bindtap="onTapComment">评论</button>
</view> </view>
@ -67,7 +68,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="del" data-index="{{index}}" data-id="{{item.id}}" catchtap="del">删除</view> <view class="del" data-index="{{index}}" data-id="{{item.id}}" catchtap="del">删除</view>deleteTopic
</view> </view>
</view> </view>
</view> </view>

Loading…
Cancel
Save