王士厅
... ... @@ -141,7 +141,7 @@ export struct ENewspaperPageComponent {
// bottomSafeHeight 底导高度 topSafeHeight 顶导高度 44 顶部高度 60 底部高度
// newspaper_shadow 49 高度 e_newspaper_content 59 margin top
let height =
// screenHeight - this.bottomSafeHeight - this.topSafeHeight - vp2px(44) - vp2px(60) - vp2px(49) - vp2px(59)
// screenHeight - this.bottomSafeHeight - this.topSafeHeight - vp2px(44) - vp2px(60) - vp2px(49) - vp2px(59
this.picHeight = (this.picWidth * 506)/355
let ratio = this.ratio == '100%' ? 1 : 0.5
... ...
... ... @@ -26,6 +26,7 @@ export struct RmhTitle {
@Prop publishTime: string | undefined
@State loadImg: boolean = false;
isPeopleShipHome: boolean = false;
@Consume @Watch('pageShowForUpdateData') pageShow:number
/**
* 是否需要隐藏发布时间超过2天的时间展示,默认不隐藏
*/
... ... @@ -95,7 +96,11 @@ export struct RmhTitle {
}
async aboutToAppear(): Promise<void> {
this.getBatchAttentionStatus()
//关注查询限制
if (this.rmhInfo?.cnIsAttention) {
this.getBatchAttentionStatus()
}
const curRouter = router.getState().name;
if (curRouter === 'MainPage') {
this.hideTime = true;
... ... @@ -104,6 +109,12 @@ export struct RmhTitle {
this.loadImg = await onlyWifiLoadImg();
}
pageShowForUpdateData(): void {
if (this.rmhInfo?.cnIsAttention) {
this.getBatchAttentionStatus()
}
}
getDaysBetweenDates(date: number) {
const oneDay = 24 * 60 * 60 * 1000; // 一天的毫秒数
const time1 = new Date().getTime(); // 今天日期的时间戳
... ...
... ... @@ -19,6 +19,11 @@ import { CustomTitleUI } from '../reusable/CustomTitleUI'
@Entry
@Component
struct PeopleShipHomePage {
//RmhTitle组件刷新需要设置 该界面为用户主页,所以不需要刷新操作
@Provide pageShow: number = -1
@Provide pageHide: number = -1
// Todo 传入数据 后续在修改
creatorId: string = (router.getParams() as Record<string, string>)['creatorId'];
// 页面详情数据
... ...
... ... @@ -35,12 +35,17 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
.width(14)
.height(14)
}
}.justifyContent(FlexAlign.SpaceBetween)
.visibility(this.showMore() ? Visibility.Visible : Visibility.None)
.onClick(() => {
ProcessUtils.compJumpPage(this.compDTO)
})
}
.justifyContent(FlexAlign.SpaceBetween)
.margin({ top: 8, bottom: 8 })
.width('100%')
Image($r("app.media.setting"))
Image(this.compDTO.operDataList[0].coverUrl)
.aspectRatio(1.5)
.width('100%')
.borderRadius(4)
... ... @@ -73,5 +78,8 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
})
}
showMore() {
return (!!this.compDTO.dataSourceType && this.compDTO.dataSourceType !== 'OBJECT_POS') || !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')
}
}
\ No newline at end of file
... ...