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
王士厅
2024-06-19 18:48:55 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
14e1fae9597e178f2d337d74a339d5798c357808
14e1fae9
2 parents
ba716502
757cb0f8
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
19 deletions
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/PaperTitleComponent.ets
sight_harmony/products/phone/src/main/ets/pages/ENewspaper.ets
sight_harmony/products/phone/src/main/resources/base/profile/insight_intent.json
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
14e1fae
...
...
@@ -237,14 +237,13 @@ export struct MorningEveningPaperComponent {
if (imageSource) {
const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource);
effectKit.createColorPicker(pixelMap, (err, colorPicker) => {
let color = colorPicker.get
LargestProportionColor
();
let color = colorPicker.get
MainColorSync
();
console.log(TAG, "compInfoBean compStyle = " + color)
// color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha})
// 将取色器选取的color示例转换为十六进制颜色代码
this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16);
console.log(TAG, "compInfoBean compStyle = " + this.mixedBgColor)
});
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/PaperTitleComponent.ets
View file @
14e1fae
...
...
@@ -98,18 +98,18 @@ export struct PaperTitleComponent {
})
.margin({ right: 16 })
Image($r('app.media.icon_share'))
.height($r('app.float.top_arrow_size'))
.width($r('app.float.top_arrow_size'))
.alignRules({
right: { anchor: "img_close", align: HorizontalAlign.Start },
center: { anchor: "__container__", align: VerticalAlign.Center }
})
.id('img_share')
.margin({ right: 16 })
.onClick(() => {
this.share()
})
// Image($r('app.media.icon_share'))
// .height($r('app.float.top_arrow_size'))
// .width($r('app.float.top_arrow_size'))
// .alignRules({
// right: { anchor: "img_close", align: HorizontalAlign.Start },
// center: { anchor: "__container__", align: VerticalAlign.Center }
// })
// .id('img_share')
// .margin({ right: 16 })
// .onClick(() => {
// this.share()
// })
}
// .margin({ left: 14, right: 14 })
.height($r('app.float.top_bar_height'))
...
...
sight_harmony/products/phone/src/main/ets/pages/ENewspaper.ets
View file @
14e1fae
...
...
@@ -2,14 +2,15 @@ import { ENewspaperPageComponent } from 'wdComponent';
import { DateTimeUtils, Logger } from 'wdKit';
import common from '@ohos.app.ability.common';
import window from '@ohos.window';
import { TrackingPageBrowse
,TrackConstants
} from 'wdTracking/Index';
import { TrackingPageBrowse
, TrackConstants
} from 'wdTracking/Index';
const TAG = 'ENewspaper';
//电子报主页面
@Entry
@Component
struct ENewspaper {
pageShowTime:number = 0;
pageShowTime:
number = 0;
// 获取UIAbility上下文
context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext
...
...
@@ -49,15 +50,16 @@ struct ENewspaper {
onPageShow() {
this.pageShowTime = DateTimeUtils.getTimeStamp()
this.setSystemBar('#
80000000','#8
0000000', '#FFFFFFFF')
this.setSystemBar('#
00000000', '#0
0000000', '#FFFFFFFF')
Logger.info(TAG, 'onPageShow');
}
onPageHide() {
this.setSystemBar('#FFFFFFFF','#00000000', '#000000')
this.setSystemBar('#FFFFFFFF',
'#00000000', '#000000')
Logger.info(TAG, 'onPageHide');
//页面浏览
TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000))
TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.NewsPaperPage,
TrackConstants.PageName.NewsPaperPage, Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime) / 1000))
}
onBackPress() {
...
...
sight_harmony/products/phone/src/main/resources/base/profile/insight_intent.json
View file @
14e1fae
...
...
@@ -14,6 +14,19 @@
}
},
{
"intentName"
:
"ViewColumn"
,
"domain"
:
""
,
"intentVersion"
:
"1.0.1"
,
"srcEntry"
:
"./ets/utils/InsightIntentExecutorImpl.ets"
,
"uiAbility"
:
{
"ability"
:
"EntryAbility"
,
"executeMode"
:
[
"background"
,
"foreground"
]
}
},
{
"intentName"
:
"ViewColumnUpdate"
,
"domain"
:
""
,
"intentVersion"
:
"1.0.1"
,
...
...
Please
register
or
login
to post a comment