yangsunyue_wd

desc:评论相关

  1 +export default class BuildProfile {
  2 + static readonly HAR_VERSION = '1.0.0';
  3 + static readonly BUILD_MODE_NAME = 'debug';
  4 + static readonly DEBUG = true;
  5 +}
@@ -32,6 +32,7 @@ export class commentListModel extends PageModel { @@ -32,6 +32,7 @@ export class commentListModel extends PageModel {
32 pageNum: number = 1 32 pageNum: number = 1
33 pageSize: number = 10 33 pageSize: number = 10
34 totalCount: number = 0 34 totalCount: number = 0
  35 + totalCommentNum: string = '0'
35 hasNext: number = 0 36 hasNext: number = 0
36 list: commentItemModel[] = [] 37 list: commentItemModel[] = []
37 // constructor(pageNum:number, pageSize:number, totalCount: number, hasNext: number, list: commentItemModel[]) { 38 // constructor(pageNum:number, pageSize:number, totalCount: number, hasNext: number, list: commentItemModel[]) {
@@ -177,6 +177,7 @@ export struct CommentComponent { @@ -177,6 +177,7 @@ export struct CommentComponent {
177 async getData() { 177 async getData() {
178 commentViewModel.fetchContentCommentList('1', this.publishCommentModel.targetId, this.publishCommentModel.targetType) 178 commentViewModel.fetchContentCommentList('1', this.publishCommentModel.targetId, this.publishCommentModel.targetType)
179 .then(commentListModel => { 179 .then(commentListModel => {
  180 + this.publishCommentModel.totalCommentNumer = commentListModel.totalCount + ''
180 if (commentListModel && commentListModel.list && commentListModel.list.length > 0) { 181 if (commentListModel && commentListModel.list && commentListModel.list.length > 0) {
181 commentListModel.list.forEach(element => { 182 commentListModel.list.forEach(element => {
182 element.hasMore = Number.parseInt(element.childCommentNum) ? true : false 183 element.hasMore = Number.parseInt(element.childCommentNum) ? true : false
@@ -57,16 +57,16 @@ export struct CommentIconComponent { @@ -57,16 +57,16 @@ export struct CommentIconComponent {
57 /*展示类型*/ 57 /*展示类型*/
58 @State type: number = 1 58 @State type: number = 1
59 59
60 - aboutToAppear(): void {  
61 - setTimeout(() => {  
62 - this.publishCommentModel.totalCommentNumer = '444'  
63 - }, 3000);  
64 -  
65 - setTimeout(() => {  
66 - this.publishCommentModel.totalCommentNumer = '2'  
67 - }, 4000);  
68 -  
69 - } 60 + // aboutToAppear(): void {
  61 + // setTimeout(() => {
  62 + // this.publishCommentModel.totalCommentNumer = '444'
  63 + // }, 3000);
  64 + //
  65 + // setTimeout(() => {
  66 + // this.publishCommentModel.totalCommentNumer = '2'
  67 + // }, 4000);
  68 +
  69 + // }
70 70
71 /*回调方法*/ 71 /*回调方法*/
72 onClickItem: () => void = () => { 72 onClickItem: () => void = () => {