wangliang_wd

feat:优化兴趣选择,优化早晚报代码

... ... @@ -122,12 +122,6 @@ export struct MorningEveningPaperComponent {
}
async aboutToAppear() {
// let windowHight: window.Window = await window.getLastWindow(getContext(this));
// await windowHight.setWindowLayoutFullScreen(true);
// WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
// this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height)
// this.bottomSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height)
const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String
console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId)
const currentTime = new Date().getTime()
... ... @@ -238,12 +232,6 @@ export struct MorningEveningPaperComponent {
private async pickColor(imageSource: image.ImageSource | undefined) {
if (imageSource) {
const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource);
// let allPixels: number[] = await traverseAllPixel(pixelMap);
// let maxPixel: number = findMaxPixel(allPixels);
// let rgb: ColorRgb = ColorUtils.numberToRgb(maxPixel);
// let hsv: ColorHsv = ColorUtils.rgb2hsv(rgb);
// rgb = ColorUtils.hsv2rgb(hsv);
// this.mixedBgColor = "#" + rgb.red.toString(16) + rgb.green.toString(16) + rgb.blue.toString(16);
effectKit.createColorPicker(pixelMap, (err, colorPicker) => {
let color = colorPicker.getLargestProportionColor();
console.log(TAG, "compInfoBean compStyle = " + color)
... ... @@ -256,9 +244,6 @@ export struct MorningEveningPaperComponent {
}
async aboutToDisappear() {
// let windowHight: window.Window = await window.getLastWindow(getContext(this));
// await windowHight.setWindowLayoutFullScreen(false);
// WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
}
onPageHide() {
... ...
... ... @@ -161,11 +161,11 @@ struct LaunchInterestsHobbiesPage {
.backgroundColor('#ED2800')
.type(ButtonType.Normal)
.borderRadius(5)
.width(320)
.width('640lpx')
.height(44)
.margin({top:5})
Image('')
.width(320)
.width('640lpx')
.height(44)
.margin({top:5})
.backgroundColor(Color.White)
... ...