yangsunyue_wd

desc:评论相关

export default class BuildProfile {
static readonly HAR_VERSION = '1.0.0';
static readonly BUILD_MODE_NAME = 'debug';
static readonly DEBUG = true;
}
\ No newline at end of file
... ...
... ... @@ -32,6 +32,7 @@ export class commentListModel extends PageModel {
pageNum: number = 1
pageSize: number = 10
totalCount: number = 0
totalCommentNum: string = '0'
hasNext: number = 0
list: commentItemModel[] = []
// constructor(pageNum:number, pageSize:number, totalCount: number, hasNext: number, list: commentItemModel[]) {
... ...
... ... @@ -177,6 +177,7 @@ export struct CommentComponent {
async getData() {
commentViewModel.fetchContentCommentList('1', this.publishCommentModel.targetId, this.publishCommentModel.targetType)
.then(commentListModel => {
this.publishCommentModel.totalCommentNumer = commentListModel.totalCount + ''
if (commentListModel && commentListModel.list && commentListModel.list.length > 0) {
commentListModel.list.forEach(element => {
element.hasMore = Number.parseInt(element.childCommentNum) ? true : false
... ...
... ... @@ -57,16 +57,16 @@ export struct CommentIconComponent {
/*展示类型*/
@State type: number = 1
aboutToAppear(): void {
setTimeout(() => {
this.publishCommentModel.totalCommentNumer = '444'
}, 3000);
setTimeout(() => {
this.publishCommentModel.totalCommentNumer = '2'
}, 4000);
}
// aboutToAppear(): void {
// setTimeout(() => {
// this.publishCommentModel.totalCommentNumer = '444'
// }, 3000);
//
// setTimeout(() => {
// this.publishCommentModel.totalCommentNumer = '2'
// }, 4000);
// }
/*回调方法*/
onClickItem: () => void = () => {
... ...