Showing
2 changed files
with
42 additions
and
0 deletions
| @@ -324,6 +324,27 @@ export struct HomePageBottomComponent{ | @@ -324,6 +324,27 @@ export struct HomePageBottomComponent{ | ||
| 324 | data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,commentContent,item.likeNum,0,item.id,item.targetId,item.targetType,item.targetRelId,item.targetRelObjectId,item.targetRelType,item.targetStatus,item.checkStatus,parentCommentContent,parentCommentUserName)) | 324 | data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,commentContent,item.likeNum,0,item.id,item.targetId,item.targetType,item.targetRelId,item.targetRelObjectId,item.targetRelType,item.targetStatus,item.checkStatus,parentCommentContent,parentCommentUserName)) |
| 325 | }) | 325 | }) |
| 326 | 326 | ||
| 327 | + if(status.commentIdList.length === 0){ | ||
| 328 | + data.forEach((item)=>{ | ||
| 329 | + let publishTime = DateTimeUtils.getCommentTime(DateTimeUtils.parseDate(item.createTime,DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)) | ||
| 330 | + this.data_comment.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,publishTime,item.commentContent,item.likeNum,item.like_status,item.id,item.targetId,item.targetType,item.targetRelId,item.targetRelObjectId,item.targetRelType,item.targetStatus,item.checkStatus,item.parentCommentContent,item.parentCommentUserName)) | ||
| 331 | + }) | ||
| 332 | + | ||
| 333 | + this.data_comment.notifyDataReload() | ||
| 334 | + | ||
| 335 | + this.count = this.data_comment.totalCount() | ||
| 336 | + this.commentNum = value.totalCount | ||
| 337 | + if (this.data_comment.totalCount() < value.totalCount) { | ||
| 338 | + this.curPageNum++ | ||
| 339 | + }else { | ||
| 340 | + this.hasMore = false | ||
| 341 | + } | ||
| 342 | + | ||
| 343 | + this.isLoading = false | ||
| 344 | + this.isGetRequest = true | ||
| 345 | + return | ||
| 346 | + } | ||
| 347 | + | ||
| 327 | MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{ | 348 | MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{ |
| 328 | newValue.forEach((item)=>{ | 349 | newValue.forEach((item)=>{ |
| 329 | data.forEach((list)=>{ | 350 | data.forEach((list)=>{ |
| @@ -139,6 +139,27 @@ export struct OtherHomePageBottomCommentComponent { | @@ -139,6 +139,27 @@ export struct OtherHomePageBottomCommentComponent { | ||
| 139 | data.push(new CommentListItem(item.fromUserHeader, item.fromUserName, item.targetTitle, item.createTime, commentContent, item.likeNum, 0, item.id, item.targetId, item.targetType, item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, parentCommentContent, parentCommentUserName)) | 139 | data.push(new CommentListItem(item.fromUserHeader, item.fromUserName, item.targetTitle, item.createTime, commentContent, item.likeNum, 0, item.id, item.targetId, item.targetType, item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, parentCommentContent, parentCommentUserName)) |
| 140 | }) | 140 | }) |
| 141 | 141 | ||
| 142 | + if(status.commentIdList.length === 0){ | ||
| 143 | + data.forEach((item) => { | ||
| 144 | + this.data_comment.push(new CommentListItem(item.fromUserHeader, item.fromUserName, item.targetTitle, item.createTime, item.commentContent, item.likeNum, item.like_status, item.id, item.targetId, item.targetType, item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, item.parentCommentContent, item.parentCommentUserName)) | ||
| 145 | + }) | ||
| 146 | + | ||
| 147 | + this.data_comment.notifyDataReload() | ||
| 148 | + | ||
| 149 | + this.count = this.data_comment.totalCount() | ||
| 150 | + this.commentNum = value.totalCount | ||
| 151 | + if (this.data_comment.totalCount() < value.totalCount) { | ||
| 152 | + this.curPageNum++ | ||
| 153 | + } else { | ||
| 154 | + this.hasMore = false | ||
| 155 | + } | ||
| 156 | + | ||
| 157 | + this.isLoading = false | ||
| 158 | + this.isGetRequest = true | ||
| 159 | + return | ||
| 160 | + } | ||
| 161 | + | ||
| 162 | + | ||
| 142 | MinePageDatasModel.getOtherUserCommentLikeStatusData(status, getContext(this)).then((newValue) => { | 163 | MinePageDatasModel.getOtherUserCommentLikeStatusData(status, getContext(this)).then((newValue) => { |
| 143 | newValue.forEach((item) => { | 164 | newValue.forEach((item) => { |
| 144 | data.forEach((list) => { | 165 | data.forEach((list) => { |
-
Please register or login to post a comment