张善主

Merge remote-tracking branch 'origin/main'

... ... @@ -77,6 +77,7 @@ export interface ContentDTO {
newTags: string;
titleShow?: number;
isSearch?: boolean; // 是否是搜索的结果,区分搜索和主页的数据
isCollection?: boolean; // 是否是收藏的结果,区分搜索和主页的数据
commentInfo?: commentInfo
//底部导航栏 id(用于频道跳转)
bottomNavId:string;
... ...
... ... @@ -28,7 +28,7 @@ export struct CardSourceInfo {
.textOverflow({ overflow: TextOverflow.Ellipsis })
}
// 新闻tab下的卡片,2天之前的不显示时间。但是如果是搜索情况下展示的卡片,显示时间
if (this.contentDTO.isSearch || !this.contentDTO.isSearch && DateTimeUtils.getCommentTime
if (this.contentDTO.isSearch || this.contentDTO.isCollection || !this.contentDTO.isSearch && DateTimeUtils.getCommentTime
(Number
.parseFloat(this
.contentDTO.publishTime))
... ...
... ... @@ -128,7 +128,8 @@ struct EditUserInfoPage {
onAccept:(value:DatePickerResult) => {
let mon = value.month as number + 1
let monStr = mon < 10? '0'+mon.toString():mon.toString();
this.currentUserInfo.userExtend.birthday = value.year+'-'+monStr+'-'+value.day;
let dayStr = value.day as number < 10? '0'+value.day:value.day;
this.currentUserInfo.userExtend.birthday = value.year+'-'+monStr+'-'+dayStr;
this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_birthday
this.updateEditModel()
}
... ...
... ... @@ -47,6 +47,7 @@ struct MyCollectionListPage {
CustomPullToRefresh({
alldata:this.allDatas,
scroller:this.scroller,
hasMore:this.browSingModel.hasMore,
customList:()=>{
this.ListLayout()
},
... ... @@ -122,10 +123,14 @@ struct MyCollectionListPage {
if (collectionItem && collectionItem.list && collectionItem.list.length > 0) {
if (this.currentPage === 1) {
this.allDatas = []
this.allDatas.push(...collectionItem.list)
}else {
this.allDatas = this.allDatas.concat(...collectionItem.list)
}
for (let index = 0; index < collectionItem.list.length; index++) {
const compDTO = collectionItem.list[index];
compDTO.isCollection = true ///用于时间展示
this.allDatas.push(compDTO)
}
if (collectionItem.hasNext === 0) {
this.browSingModel.hasMore = false;
} else {
... ... @@ -188,8 +193,17 @@ struct MyCollectionListPage {
})
//重置删除状态
this.updataUIState()
}
updataUIState(){
this.isEditState = false
this.isAllSelect = false
if (this.allDatas.length === 0) {
this.browSingModel.viewType = ViewType.EMPTY;
this.browSingModel.hasMore === true
}
}
}
\ No newline at end of file
... ...