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
liyubing
2024-06-20 17:56:36 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f553f8ea46d6b83319ca9e4e4a76c86ea5822504
f553f8ea
1 parent
120bc2ef
fix:1)电子报-电子报最后一版进入读报纸列表后_未展示该版内容
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/dialog/ENewspaperListDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
View file @
f553f8e
...
...
@@ -60,10 +60,11 @@ export struct ENewspaperPageComponent {
//watch监听报纸页码回调
onCurrentPageNumUpdated(): void {
console.log("ENewspaperPageComponent-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum)
let _swiperIndex = Number.parseInt(this.currentPageNum)
console.log("ENewspaperPageComponent-onCurrentPageNumUpdated", "_swiperIndex:", _swiperIndex)
this.swiperIndex = _swiperIndex > 0 ? _swiperIndex - 1 : _swiperIndex
// let _swiperIndex = Number.parseInt(this.currentPageNum)
// console.log("ENewspaperPageComponent-onCurrentPageNumUpdated", "_swiperIndex:", _swiperIndex)
// this.swiperIndex = _swiperIndex > 0 ? _swiperIndex - 1 : _swiperIndex
this.swiperIndex = this.newspaperListBean?.list.findIndex(_item => _item?.pageNum === this.currentPageNum)
//电子报--版面序号选择点击
TrackingContent.clickWithEvent('panel_number_selection_click', TrackConstants.PageName.NewsPaperPage,
TrackConstants.PageName.NewsPaperPage
...
...
@@ -140,7 +141,8 @@ export struct ENewspaperPageComponent {
let screenHeight = this.displayTool.height;
// 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)
let height =
screenHeight - this.bottomSafeHeight - this.topSafeHeight - vp2px(44) - vp2px(60) - vp2px(49) - vp2px(59)
this.picHeight = height
let ratio = this.ratio == '100%' ? 1 : 0.5
...
...
@@ -176,6 +178,7 @@ export struct ENewspaperPageComponent {
this.resize()
});
}
resize() {
this.screenWidth = this.windowClass?.getWindowProperties()?.windowRect.width || this.displayTool.width
// 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件
...
...
sight_harmony/features/wdComponent/src/main/ets/dialog/ENewspaperListDialog.ets
View file @
f553f8e
...
...
@@ -48,6 +48,9 @@ export struct ENewspaperListDialog {
@State topHeight: number = 124
private deviceHeight: number = 0
selectPageNum : boolean = true
//watch监听报纸页码回调
onCurrentPageNumUpdated(): void {
// console.log(TAG, "onCurrentPageNumUpdated currentPageNum:", this.currentPageNum)
...
...
@@ -56,6 +59,8 @@ export struct ENewspaperListDialog {
// let scrollIndexEnd = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex
if (this.newspaperListBean != undefined) {
this.selectPageNum = false
// 从业务数据中找到编号
let scrollIndexEnd = this.newspaperListBean?.list.findIndex(_item => _item?.pageNum === this.currentPageNum)
...
...
@@ -82,10 +87,12 @@ export struct ENewspaperListDialog {
this.isCurrentViewOpen = true
console.log(TAG, "aboutToAppear currentPageNum:", this.currentPageNum)
let _scrollIndex = Number.parseInt(this.currentPageNum)
console.log(TAG, "aboutToAppear _scrollIndex:", _scrollIndex)
this.scrollIndex = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex
// let _scrollIndex = Number.parseInt(this.currentPageNum)
// console.log(TAG, "aboutToAppear _scrollIndex:", _scrollIndex)
// this.scrollIndex = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex
// this.listScroller.scrollToIndex(this.scrollIndex)
this.scrollIndex = this.newspaperListBean?.list.findIndex(_item => _item?.pageNum === this.currentPageNum)
}
aboutToDisappear() {
...
...
@@ -292,9 +299,14 @@ export struct ENewspaperListDialog {
// this.currentPageNum = `${firstIndex < 9 ? '0' + (firstIndex + 1) : firstIndex + 1}`
if(this.selectPageNum){
if (this.newspaperListBean != undefined) {
this.currentPageNum = this.newspaperListBean?.list[lastIndex].pageNum
}
}else {
this.selectPageNum = true
}
})
}
...
...
Please
register
or
login
to post a comment