Showing
4 changed files
with
21 additions
and
5 deletions
| @@ -77,6 +77,7 @@ export interface ContentDTO { | @@ -77,6 +77,7 @@ export interface ContentDTO { | ||
| 77 | newTags: string; | 77 | newTags: string; |
| 78 | titleShow?: number; | 78 | titleShow?: number; |
| 79 | isSearch?: boolean; // 是否是搜索的结果,区分搜索和主页的数据 | 79 | isSearch?: boolean; // 是否是搜索的结果,区分搜索和主页的数据 |
| 80 | + isCollection?: boolean; // 是否是收藏的结果,区分搜索和主页的数据 | ||
| 80 | commentInfo?: commentInfo | 81 | commentInfo?: commentInfo |
| 81 | //底部导航栏 id(用于频道跳转) | 82 | //底部导航栏 id(用于频道跳转) |
| 82 | bottomNavId:string; | 83 | bottomNavId:string; |
| @@ -28,7 +28,7 @@ export struct CardSourceInfo { | @@ -28,7 +28,7 @@ export struct CardSourceInfo { | ||
| 28 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 28 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 29 | } | 29 | } |
| 30 | // 新闻tab下的卡片,2天之前的不显示时间。但是如果是搜索情况下展示的卡片,显示时间 | 30 | // 新闻tab下的卡片,2天之前的不显示时间。但是如果是搜索情况下展示的卡片,显示时间 |
| 31 | - if (this.contentDTO.isSearch || !this.contentDTO.isSearch && DateTimeUtils.getCommentTime | 31 | + if (this.contentDTO.isSearch || this.contentDTO.isCollection || !this.contentDTO.isSearch && DateTimeUtils.getCommentTime |
| 32 | (Number | 32 | (Number |
| 33 | .parseFloat(this | 33 | .parseFloat(this |
| 34 | .contentDTO.publishTime)) | 34 | .contentDTO.publishTime)) |
| @@ -128,7 +128,8 @@ struct EditUserInfoPage { | @@ -128,7 +128,8 @@ struct EditUserInfoPage { | ||
| 128 | onAccept:(value:DatePickerResult) => { | 128 | onAccept:(value:DatePickerResult) => { |
| 129 | let mon = value.month as number + 1 | 129 | let mon = value.month as number + 1 |
| 130 | let monStr = mon < 10? '0'+mon.toString():mon.toString(); | 130 | let monStr = mon < 10? '0'+mon.toString():mon.toString(); |
| 131 | - this.currentUserInfo.userExtend.birthday = value.year+'-'+monStr+'-'+value.day; | 131 | + let dayStr = value.day as number < 10? '0'+value.day:value.day; |
| 132 | + this.currentUserInfo.userExtend.birthday = value.year+'-'+monStr+'-'+dayStr; | ||
| 132 | this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_birthday | 133 | this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_birthday |
| 133 | this.updateEditModel() | 134 | this.updateEditModel() |
| 134 | } | 135 | } |
| @@ -47,6 +47,7 @@ struct MyCollectionListPage { | @@ -47,6 +47,7 @@ struct MyCollectionListPage { | ||
| 47 | CustomPullToRefresh({ | 47 | CustomPullToRefresh({ |
| 48 | alldata:this.allDatas, | 48 | alldata:this.allDatas, |
| 49 | scroller:this.scroller, | 49 | scroller:this.scroller, |
| 50 | + hasMore:this.browSingModel.hasMore, | ||
| 50 | customList:()=>{ | 51 | customList:()=>{ |
| 51 | this.ListLayout() | 52 | this.ListLayout() |
| 52 | }, | 53 | }, |
| @@ -122,10 +123,14 @@ struct MyCollectionListPage { | @@ -122,10 +123,14 @@ struct MyCollectionListPage { | ||
| 122 | if (collectionItem && collectionItem.list && collectionItem.list.length > 0) { | 123 | if (collectionItem && collectionItem.list && collectionItem.list.length > 0) { |
| 123 | if (this.currentPage === 1) { | 124 | if (this.currentPage === 1) { |
| 124 | this.allDatas = [] | 125 | this.allDatas = [] |
| 125 | - this.allDatas.push(...collectionItem.list) | ||
| 126 | - }else { | ||
| 127 | - this.allDatas = this.allDatas.concat(...collectionItem.list) | ||
| 128 | } | 126 | } |
| 127 | + | ||
| 128 | + for (let index = 0; index < collectionItem.list.length; index++) { | ||
| 129 | + const compDTO = collectionItem.list[index]; | ||
| 130 | + compDTO.isCollection = true ///用于时间展示 | ||
| 131 | + this.allDatas.push(compDTO) | ||
| 132 | + } | ||
| 133 | + | ||
| 129 | if (collectionItem.hasNext === 0) { | 134 | if (collectionItem.hasNext === 0) { |
| 130 | this.browSingModel.hasMore = false; | 135 | this.browSingModel.hasMore = false; |
| 131 | } else { | 136 | } else { |
| @@ -188,8 +193,17 @@ struct MyCollectionListPage { | @@ -188,8 +193,17 @@ struct MyCollectionListPage { | ||
| 188 | }) | 193 | }) |
| 189 | 194 | ||
| 190 | //重置删除状态 | 195 | //重置删除状态 |
| 196 | + this.updataUIState() | ||
| 197 | + } | ||
| 198 | + | ||
| 199 | + updataUIState(){ | ||
| 191 | this.isEditState = false | 200 | this.isEditState = false |
| 192 | this.isAllSelect = false | 201 | this.isAllSelect = false |
| 202 | + | ||
| 203 | + if (this.allDatas.length === 0) { | ||
| 204 | + this.browSingModel.viewType = ViewType.EMPTY; | ||
| 205 | + this.browSingModel.hasMore === true | ||
| 206 | + } | ||
| 193 | } | 207 | } |
| 194 | 208 | ||
| 195 | } | 209 | } |
-
Please register or login to post a comment