wangliang_wd

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)一多适配--折叠屏,电子报-选择日期弹窗不需要放大
... ... @@ -2,8 +2,8 @@
"app": {
"bundleName": "com.peopledailychina.hosactivity",
"vendor": "$string:app_vendor",
"versionCode": 7390,
"versionName": "7.3.9.0",
"versionCode": 7391,
"versionName": "7.3.9.1",
"icon": "$media:app_icon",
"label": "$string:app_name"
}
... ...
... ... @@ -176,6 +176,8 @@ export struct ENewspaperPageComponent {
resizeWindow() {
this.windowClass?.on('windowSizeChange', () => {
this.resize()
this.getNewspaperList()
this.swiperController.changeIndex(this.swiperIndex)
});
}
... ...
import { RMCalendarBean } from './RMCalendarBean'
import { RMCalenderCell } from './RMCalendarCell'
import { ToastUtils, NetworkUtil } from 'wdKit/Index';
import { ToastUtils, NetworkUtil, WindowModel } from 'wdKit/Index';
import { window } from '@kit.ArkUI';
@Component
export struct RMCalendar {
private windowClass?: window.Window;
@State selectItem: RMCalendarBean = new RMCalendarBean()
//选中的日期
private selectDay: Date = new Date()
... ... @@ -70,6 +72,7 @@ export struct RMCalendar {
onMonthChange?: (after: Date, befor: Date) => void
// 不可选中项的点击事件
disableCellClick?: (item: RMCalendarBean) => void
@State isZD: boolean = false // 存储是否折叠屏
@Builder
createWeekTitle(item: string) {
... ... @@ -165,6 +168,24 @@ export struct RMCalendar {
temp.time = this.selectDay.getTime()
this.selectItem = temp
this.calcData()
this.windowClass = WindowModel.shared.getWindowClass(); // 获取应用主窗口
let screenWidth = this.windowClass?.getWindowProperties()?.windowRect.width
// 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件
this.isZD = screenWidth > 2000 ? true : false
this.resizeWindow()
}
aboutToDisappear() {
this.windowClass?.off('windowSizeChange');
}
resizeWindow() {
this.windowClass?.on('windowSizeChange', () => {
this.windowClass = WindowModel.shared.getWindowClass(); // 获取应用主窗口
let screenWidth = this.windowClass?.getWindowProperties()?.windowRect.width
// 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件
this.isZD = screenWidth > 2000 ? true : false
});
}
/**
... ... @@ -343,6 +364,7 @@ export struct RMCalendar {
{ bottom: 20 })
.border({ radius: 4 })
}
.width(this.isZD ? "50%" : "100%")
}
getMonthStr(month?: number): string {
... ...
... ... @@ -118,8 +118,13 @@ export struct newsSkeleton {
left: 15
})
if (this.showBottom) {
Column().backgroundColor('#CBCBCB').height(5).width(339)
Column().backgroundColor('#909090').height(5).width(326)
// Column().backgroundColor('#CBCBCB').height(5).width(339)
// Column().backgroundColor('#909090').height(5).width(336)
Image($r('app.media.newspaper_shadow'))
.height($r('app.float.vp_12'))
.width("97%")
.objectFit(ImageFit.Contain)
.margin({ top: -1 })
}
}
.width('100%')
... ...
... ... @@ -146,8 +146,12 @@ export struct ENewspaperListDialog {
Image($r('app.media.line'))
.width('100%')
.height(6)
.margin({ top: 20, left: 16, right: 16 })
.objectFit(ImageFit.Contain)
.margin({ top: 20 })
.padding({
left: 16,
right: 16
})
.objectFit(ImageFit.Fill)
}
.width('100%')
.gesture(
... ...