Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
陈剑华
2024-08-23 14:47:29 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
060e9cbec7ae789270f2101259802f8451b04ad8
060e9cbe
2 parents
f9a900d0
9accf5df
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
11 deletions
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/RmhTitle.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PeopleShipHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/pages/SearchPage.ets
sight_harmony/products/phone/src/main/ets/pages/MainPage.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
View file @
060e9cb
...
...
@@ -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
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
060e9cb
...
...
@@ -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,
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/RmhTitle.ets
View file @
060e9cb
...
...
@@ -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(); // 今天日期的时间戳
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/PeopleShipHomePage.ets
View file @
060e9cb
...
...
@@ -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'];
// 页面详情数据
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/SearchPage.ets
View file @
060e9cb
...
...
@@ -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({
...
...
sight_harmony/products/phone/src/main/ets/pages/MainPage.ets
View file @
060e9cb
...
...
@@ -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)
// 处理国殇模式数据
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
View file @
060e9cb
...
...
@@ -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();
}
});
});
...
...
Please
register
or
login
to post a comment