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
chenquansheng
2024-09-19 10:06:31 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8cc249f7c30282bdaf2374a4a2b0d0dcbc3abc3d
8cc249f7
1 parent
a34562ba
fix |> 返回稿件详情页刷新逻辑优化
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
22 deletions
sight_harmony/commons/wdKit/src/main/ets/utils/EmitterEventId.ts
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
sight_harmony/products/phone/src/main/ets/pages/ImageAndTextDetailPage.ets
sight_harmony/commons/wdKit/src/main/ets/utils/EmitterEventId.ts
View file @
8cc249f
...
...
@@ -49,10 +49,5 @@ export enum EmitterEventId {
// 全屏
FULL_SCREEN
=
14
,
// app页面显示
APP_PAGE_SHOW
=
102
,
// app页面隐藏
APP_PAGE_HIDDEN
=
103
,
}
...
...
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
View file @
8cc249f
...
...
@@ -33,7 +33,6 @@ export struct WdWebLocalComponent {
@State progressOpacity: number = 1
@State durationStringTime: string = '';
private progressTimerNumber: number = 0
private webIsLoaded:boolean = false
@State isPause: boolean = true;
controller: VideoController = new VideoController()
@StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm';
...
...
@@ -41,6 +40,10 @@ export struct WdWebLocalComponent {
@State isFullScreen: boolean = false;
@State isEndPlay: boolean = false;
@State mode: CacheMode = CacheMode.None;
@Consume @Watch('pageShowForUpdateData') pageShow :number
@Consume @Watch('pageHideForUpdateData') pageHide :number
currentChanged(){
///折叠屏转换 暂停播放器
this.controller.pause()
...
...
@@ -51,6 +54,22 @@ export struct WdWebLocalComponent {
this.webviewControl.refresh()
}
pageShowForUpdateData(){
Logger.debug(TAG, 'APP_PAGE_SHOW'+this.isPageEnd);
let params = {'event':NativeCallH5Event.NativeCallH5EventPageWillAppear} as eventParams;
let jsonString = JSON.stringify(params);
if (this.isPageEnd) {
this.webviewControl.callHandle(NativeCallH5Type.jsCall_appNotifyEvent, jsonString, (data: string) => {
Logger.debug(TAG, "from js data = " + data);
})
}
}
pageHideForUpdateData(){
}
build() {
Column() {
Row() {
...
...
@@ -198,8 +217,8 @@ export struct WdWebLocalComponent {
Logger.debug(TAG, 'onPageEnd');
this.onWebPrepared()
this.isPageEnd = true
this.webIsLoaded = true
}
onLoadIntercept: (url?: string) => boolean = () => {
Logger.debug(TAG, 'onLoadIntercept return false');
return false
...
...
@@ -232,20 +251,6 @@ export struct WdWebLocalComponent {
}
}
aboutToAppear(): void {
this.webIsLoaded = false
EmitterUtils.receiveEvent(EmitterEventId.APP_PAGE_SHOW, () => {
let params = {'event':NativeCallH5Event.NativeCallH5EventPageWillAppear} as eventParams;
let jsonString = JSON.stringify(params);
Logger.debug(TAG, 'APP_PAGE_SHOW'+this.webIsLoaded);
// if (this.webIsLoaded) {
// this.webviewControl.callHandle(NativeCallH5Type.jsCall_appNotifyEvent, jsonString, (data: string) => {
// Logger.debug(TAG, "from js data = " + data);
// })
// }
})
}
@Builder
videoComp(){
Video({
...
...
sight_harmony/products/phone/src/main/ets/pages/ImageAndTextDetailPage.ets
View file @
8cc249f
...
...
@@ -47,7 +47,6 @@ struct ImageAndTextDetailPage {
onPageShow() {
this.pageShow = Math.random()
EmitterUtils.sendEmptyEvent(EmitterEventId.APP_PAGE_SHOW)
Logger.info(TAG, 'onPageShow');
}
...
...
Please
register
or
login
to post a comment