"data": [
{
"id": 4,
"dynamicId": 1,
"userDTO": {
"openid": "1",
"nickName": "我是名字",
"avatarUrl": "https://img01.yzcdn.cn/vant/cat.jpeg",
"intro": null,
"member": 0,
"luyeLeaf": null,
"status": null
},
"rootId": 4,
"content": "哈哈",
"type": 0,
"signDate": "2024-01-15T04:03:01",
"discussionAnswerDTOList": [
]
},
{
"id": 1,
"dynamicId": 1,
"userDTO": {
"openid": "1",
"nickName": "我是名字",
"avatarUrl": "https://img01.yzcdn.cn/vant/cat.jpeg",
"intro": null,
"member": 0,
"luyeLeaf": null,
"status": null
},
"rootId": 1,
"content": "同时一如既往的帅",
"type": 0,
"signDate": "2024-01-15T02:42:03",
"discussionAnswerDTOList": [
{
"id": 2,
"dynamicId": 1,
"userDTO": {
"openid": "3",
"nickName": "我是名字",
"avatarUrl": "https://img01.yzcdn.cn/vant/cat.jpeg",
"intro": null,
"member": 1,
"luyeLeaf": null,
"status": null
},
"userAnswerDTO": null,
"rootId": 1,
"content": "还是同时一如既往的帅",
"type": 1,
"signDate": "2024-01-15T02:42:06"
},
{
"id": 3,
"dynamicId": 1,
"userDTO": {
"openid": "2",
"nickName": "我是名字",
"avatarUrl": "https://img01.yzcdn.cn/vant/cat.jpeg",
"intro": null,
"member": 1,
"luyeLeaf": null,
"status": null
},
"userAnswerDTO": null,
"rootId": 1,
"content": "哈哈哈哈哈哈哈哈哈爱好",
"type": 1,
"signDate": "2024-01-15T03:57:07"
}
]
}
]
<view class="comment">
<view wx:for="{{dynamicReviewList}}" wx:for-item="outerItem" wx:key="outerIndex">
<view>
<image src="{{outerItem.userDTO.avatarUrl}}" mode="aspectFill" />
</view>
<view>
<view>{{outerItem.userDTO.nickName}}</view>
<view>
{{outerItem.content}}
<text class="comment-time"> {{outerItem.signDate}}</text>
<text class="comment-reply"> 回复</text>
</view>
</view>
<view wx:for="{{outerItem.discussionAnswerDTOList}}" wx:for-item="innerItem" wx:key="innerIndex">
<view>
<image src="{{innerIndex.userDTO.avatarUrl}}" mode="aspectFill" />
</view>
<view>
<view>{{innerIndex.userDTO.nickName}}</view>
<view>
{{innerIndex.content}}
<text class="comment-time">2023-10-25</text>
<text class="comment-reply">回复</text>
</view>
</view>
</view>
</view>
</view>
上面是数据格式,下面是页面,然后数据里面还有个discussionAnswerDTOList数组,然后就是我这个数组为什么在页面循环不出来数据?
谢谢,已解决!