Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main
* 'main' of http://192.168.1.42/developOne/harmonyPool: 修改版本号 电子报一多优化 fix:1)电子报-日历选择 一多适配-电子报>选择日期弹窗过大;2)一多适配--折叠屏,电子报-选择日期弹窗不需要放大
Showing
5 changed files
with
40 additions
and
7 deletions
| @@ -2,8 +2,8 @@ | @@ -2,8 +2,8 @@ | ||
| 2 | "app": { | 2 | "app": { |
| 3 | "bundleName": "com.peopledailychina.hosactivity", | 3 | "bundleName": "com.peopledailychina.hosactivity", |
| 4 | "vendor": "$string:app_vendor", | 4 | "vendor": "$string:app_vendor", |
| 5 | - "versionCode": 7390, | ||
| 6 | - "versionName": "7.3.9.0", | 5 | + "versionCode": 7391, |
| 6 | + "versionName": "7.3.9.1", | ||
| 7 | "icon": "$media:app_icon", | 7 | "icon": "$media:app_icon", |
| 8 | "label": "$string:app_name" | 8 | "label": "$string:app_name" |
| 9 | } | 9 | } |
| @@ -176,6 +176,8 @@ export struct ENewspaperPageComponent { | @@ -176,6 +176,8 @@ export struct ENewspaperPageComponent { | ||
| 176 | resizeWindow() { | 176 | resizeWindow() { |
| 177 | this.windowClass?.on('windowSizeChange', () => { | 177 | this.windowClass?.on('windowSizeChange', () => { |
| 178 | this.resize() | 178 | this.resize() |
| 179 | + this.getNewspaperList() | ||
| 180 | + this.swiperController.changeIndex(this.swiperIndex) | ||
| 179 | }); | 181 | }); |
| 180 | } | 182 | } |
| 181 | 183 |
| 1 | import { RMCalendarBean } from './RMCalendarBean' | 1 | import { RMCalendarBean } from './RMCalendarBean' |
| 2 | import { RMCalenderCell } from './RMCalendarCell' | 2 | import { RMCalenderCell } from './RMCalendarCell' |
| 3 | -import { ToastUtils, NetworkUtil } from 'wdKit/Index'; | 3 | +import { ToastUtils, NetworkUtil, WindowModel } from 'wdKit/Index'; |
| 4 | +import { window } from '@kit.ArkUI'; | ||
| 4 | 5 | ||
| 5 | @Component | 6 | @Component |
| 6 | export struct RMCalendar { | 7 | export struct RMCalendar { |
| 8 | + private windowClass?: window.Window; | ||
| 7 | @State selectItem: RMCalendarBean = new RMCalendarBean() | 9 | @State selectItem: RMCalendarBean = new RMCalendarBean() |
| 8 | //选中的日期 | 10 | //选中的日期 |
| 9 | private selectDay: Date = new Date() | 11 | private selectDay: Date = new Date() |
| @@ -70,6 +72,7 @@ export struct RMCalendar { | @@ -70,6 +72,7 @@ export struct RMCalendar { | ||
| 70 | onMonthChange?: (after: Date, befor: Date) => void | 72 | onMonthChange?: (after: Date, befor: Date) => void |
| 71 | // 不可选中项的点击事件 | 73 | // 不可选中项的点击事件 |
| 72 | disableCellClick?: (item: RMCalendarBean) => void | 74 | disableCellClick?: (item: RMCalendarBean) => void |
| 75 | + @State isZD: boolean = false // 存储是否折叠屏 | ||
| 73 | 76 | ||
| 74 | @Builder | 77 | @Builder |
| 75 | createWeekTitle(item: string) { | 78 | createWeekTitle(item: string) { |
| @@ -165,6 +168,24 @@ export struct RMCalendar { | @@ -165,6 +168,24 @@ export struct RMCalendar { | ||
| 165 | temp.time = this.selectDay.getTime() | 168 | temp.time = this.selectDay.getTime() |
| 166 | this.selectItem = temp | 169 | this.selectItem = temp |
| 167 | this.calcData() | 170 | this.calcData() |
| 171 | + this.windowClass = WindowModel.shared.getWindowClass(); // 获取应用主窗口 | ||
| 172 | + let screenWidth = this.windowClass?.getWindowProperties()?.windowRect.width | ||
| 173 | + // 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件 | ||
| 174 | + this.isZD = screenWidth > 2000 ? true : false | ||
| 175 | + this.resizeWindow() | ||
| 176 | + } | ||
| 177 | + | ||
| 178 | + aboutToDisappear() { | ||
| 179 | + this.windowClass?.off('windowSizeChange'); | ||
| 180 | + } | ||
| 181 | + | ||
| 182 | + resizeWindow() { | ||
| 183 | + this.windowClass?.on('windowSizeChange', () => { | ||
| 184 | + this.windowClass = WindowModel.shared.getWindowClass(); // 获取应用主窗口 | ||
| 185 | + let screenWidth = this.windowClass?.getWindowProperties()?.windowRect.width | ||
| 186 | + // 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件 | ||
| 187 | + this.isZD = screenWidth > 2000 ? true : false | ||
| 188 | + }); | ||
| 168 | } | 189 | } |
| 169 | 190 | ||
| 170 | /** | 191 | /** |
| @@ -343,6 +364,7 @@ export struct RMCalendar { | @@ -343,6 +364,7 @@ export struct RMCalendar { | ||
| 343 | { bottom: 20 }) | 364 | { bottom: 20 }) |
| 344 | .border({ radius: 4 }) | 365 | .border({ radius: 4 }) |
| 345 | } | 366 | } |
| 367 | + .width(this.isZD ? "50%" : "100%") | ||
| 346 | } | 368 | } |
| 347 | 369 | ||
| 348 | getMonthStr(month?: number): string { | 370 | getMonthStr(month?: number): string { |
| @@ -118,8 +118,13 @@ export struct newsSkeleton { | @@ -118,8 +118,13 @@ export struct newsSkeleton { | ||
| 118 | left: 15 | 118 | left: 15 |
| 119 | }) | 119 | }) |
| 120 | if (this.showBottom) { | 120 | if (this.showBottom) { |
| 121 | - Column().backgroundColor('#CBCBCB').height(5).width(339) | ||
| 122 | - Column().backgroundColor('#909090').height(5).width(326) | 121 | + // Column().backgroundColor('#CBCBCB').height(5).width(339) |
| 122 | + // Column().backgroundColor('#909090').height(5).width(336) | ||
| 123 | + Image($r('app.media.newspaper_shadow')) | ||
| 124 | + .height($r('app.float.vp_12')) | ||
| 125 | + .width("97%") | ||
| 126 | + .objectFit(ImageFit.Contain) | ||
| 127 | + .margin({ top: -1 }) | ||
| 123 | } | 128 | } |
| 124 | } | 129 | } |
| 125 | .width('100%') | 130 | .width('100%') |
| @@ -146,8 +146,12 @@ export struct ENewspaperListDialog { | @@ -146,8 +146,12 @@ export struct ENewspaperListDialog { | ||
| 146 | Image($r('app.media.line')) | 146 | Image($r('app.media.line')) |
| 147 | .width('100%') | 147 | .width('100%') |
| 148 | .height(6) | 148 | .height(6) |
| 149 | - .margin({ top: 20, left: 16, right: 16 }) | ||
| 150 | - .objectFit(ImageFit.Contain) | 149 | + .margin({ top: 20 }) |
| 150 | + .padding({ | ||
| 151 | + left: 16, | ||
| 152 | + right: 16 | ||
| 153 | + }) | ||
| 154 | + .objectFit(ImageFit.Fill) | ||
| 151 | } | 155 | } |
| 152 | .width('100%') | 156 | .width('100%') |
| 153 | .gesture( | 157 | .gesture( |
-
Please register or login to post a comment