分页的评论列表错误

问题描述:

第一页的评论列表是正确的,之后每一页评论列表都是错的。

解决方法:

在每次请求时,要把数组清空。

this.showdelete=[];
for (var i = 0; i < result.data.commentList.length; i++) {
    if (result.data.commentList[i].USER_ID == this.userid) {
                this.showdelete.push(true);
      } else {
                this.showdelete.push(false);
    }
}

猜你喜欢

转载自blog.csdn.net/weixin_43837268/article/details/85257875