yanlu

desc:刷新问题

@@ -68,6 +68,7 @@ export struct PeopleShipHomeArticleListComponent { @@ -68,6 +68,7 @@ export struct PeopleShipHomeArticleListComponent {
68 } 68 }
69 if(!this.isLoading && this.hasMore){ 69 if(!this.isLoading && this.hasMore){
70 //加载分页数据 70 //加载分页数据
  71 + this.currentPage++;
71 this.getPeopleShipPageArticleList(resolve) 72 this.getPeopleShipPageArticleList(resolve)
72 }else { 73 }else {
73 if(resolve) { 74 if(resolve) {
@@ -132,7 +133,7 @@ export struct PeopleShipHomeArticleListComponent { @@ -132,7 +133,7 @@ export struct PeopleShipHomeArticleListComponent {
132 } 133 }
133 134
134 onChange() { 135 onChange() {
135 - if (this.currentIndex == this.currentTopSelectedIndex) { 136 + if (this.currentIndex == this.currentTopSelectedIndex && this.arr.length == 0) {
136 this.currentPage = 1 137 this.currentPage = 1
137 this.getPeopleShipPageArticleList() 138 this.getPeopleShipPageArticleList()
138 } 139 }
@@ -163,7 +164,6 @@ export struct PeopleShipHomeArticleListComponent { @@ -163,7 +164,6 @@ export struct PeopleShipHomeArticleListComponent {
163 if (listData && listData.list && listData.list.length > 0) { 164 if (listData && listData.list && listData.list.length > 0) {
164 this.viewType = 3; 165 this.viewType = 3;
165 if (listData.list.length === 20) { 166 if (listData.list.length === 20) {
166 - this.currentPage++;  
167 this.hasMore = true; 167 this.hasMore = true;
168 } else { 168 } else {
169 this.hasMore = false; 169 this.hasMore = false;
@@ -211,6 +211,9 @@ export struct PeopleShipHomeArticleListComponent { @@ -211,6 +211,9 @@ export struct PeopleShipHomeArticleListComponent {
211 private articleListDTOChangeContentDTO(listData: ArticleListData, listCom: InteractDataDTO[]) { 211 private articleListDTOChangeContentDTO(listData: ArticleListData, listCom: InteractDataDTO[]) {
212 this.isLoading = false 212 this.isLoading = false
213 if (listData.list.length) { 213 if (listData.list.length) {
  214 + if (this.currentPage == 1) {
  215 + this.arr = []
  216 + }
214 for (const element of listData.list) { 217 for (const element of listData.list) {
215 let contentDTO = {} as ContentDTO 218 let contentDTO = {} as ContentDTO
216 contentDTO.appStyle = this.changeCommon(element.appStyle) 219 contentDTO.appStyle = this.changeCommon(element.appStyle)