陈剑华

Merge remote-tracking branch 'origin/main'

... ... @@ -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
... ...
... ... @@ -520,6 +520,11 @@ export struct ImageAndTextPageComponent {
this.lastTimeoutId = setTimeout(() => {
let offSetY = this.info?.globalPosition.y as number
Logger.debug(TAG, "即将滚动至yOffset: " + (offSetY - 100))
if (offSetY >= (this.screenHeight-this.bottomHeight) ) {
this.showMainText = true
}else {
this.showMainText = false
}
//头部距离48
this.scroller.scrollTo({
yOffset: offSetY - 100,
... ...
... ... @@ -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'];
// 页面详情数据
... ...
... ... @@ -6,6 +6,9 @@ import { router } from '@kit.ArkUI';
@Entry
@Component
struct SearchPage {
//RmhTitle组件刷新需要设置
@Provide pageShow: number = -1
@State params:Record<string, string> = router.getParams() as Record<string, string>;
@State fromTabName: string = 'NEWS';
pageShowTime:number = 0;
... ... @@ -14,6 +17,7 @@ struct SearchPage {
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
onPageShow() {
this.pageShow = Math.random()
this.fromTabName = this.params?.['tabName'];
this.pageShowTime = DateTimeUtils.getTimeStamp()
WindowModel.shared.setWindowSystemBarProperties({
... ...
... ... @@ -47,13 +47,6 @@ struct MainPage {
})
let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string
if (!dataModelStr) {
//请求启动页相关接口数据并保存
let launchPageModel = new LaunchPageModel()
launchPageModel.getLaunchPageData()
dataModelStr = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string
}
let dataModel : LaunchDataModel = JSON.parse(dataModelStr)
console.log(dataModelStr)
// 处理国殇模式数据
... ...
... ... @@ -105,6 +105,7 @@ struct LaunchPage {
let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string
if (!dataModelStr) {
this.requestLaunchPageData()
//直接跳转首页
WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
return
... ... @@ -112,6 +113,8 @@ struct LaunchPage {
let dataModel : LaunchDataModel = JSON.parse(dataModelStr)
console.log(dataModelStr)
//同意隐私协议后每次启动app请求启动页相关数据,并更新数据
this.requestLaunchPageData();
if (dataModel.launchPageInfo || dataModel.launchAdInfo.length) {
//跳转广告页
... ... @@ -123,8 +126,6 @@ struct LaunchPage {
//直接跳转首页
WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
}
//同意隐私协议后每次启动app请求启动页相关数据,并更新数据
this.requestLaunchPageData();
}
});
});
... ...