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
wangliang_wd
2024-05-30 16:03:39 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8bb959fd0be51047bdadf7a37e72fdcd8da0a7c4
8bb959fd
1 parent
860293cc
feat:优化兴趣询问页,优化启动引导
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
125 additions
and
108 deletions
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/features/wdLogin/src/main/ets/pages/guide/GuidePages.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchAdvertisingPage.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchInterestsHobbiesPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
8bb959f
...
...
@@ -224,7 +224,7 @@ export struct MorningEveningPaperComponent {
if (imageSource) {
const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource);
effectKit.createColorPicker(pixelMap, (err, colorPicker) => {
let color = colorPicker.get
MainColorSync
();
let color = colorPicker.get
LargestProportionColor
();
Logger.debug(TAG, "compInfoBean compStyle = " + color)
// color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha})
// 将取色器选取的color示例转换为十六进制颜色代码
...
...
@@ -273,6 +273,7 @@ export struct MorningEveningPaperComponent {
}
}
// .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`)
.edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果
.scrollBar(BarState.Off)
.onWillScroll(scrollOffset =>{
this.scrollOffset = this.scrollOffset + scrollOffset as number
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/guide/GuidePages.ets
View file @
8bb959f
...
...
@@ -7,8 +7,8 @@ struct GuidePages {
// guideImage = [$r('app.media.guide_static1'), $r('app.media.guide_static2'), $r('app.media.guide_static3'), $r('app.media.guide_static4'),$r('app.media.guide_static5')]
// guideTitle = [$r('app.media.guide_title1'), $r('app.media.guide_title2'), $r('app.media.guide_title3'), $r('app.media.guide_title4'),$r('app.media.guide_title5')]
// guideIndex = [$r('app.media.guide_index1'), $r('app.media.guide_index2'), $r('app.media.guide_index3'),$r('app.media.guide_index4'), $r('app.media.guide_button')]
guideImage = [$r('app.media.guide_Static')]
guideIndex = [$r('app.media.guide_button')]
guideImage = [$r('app.media.guide_Static'),'']
guideIndex = [$r('app.media.guide_button'),'']
build() {
Column() {
...
...
@@ -17,10 +17,16 @@ struct GuidePages {
this.ChildItem(index)
}, (item: number) => JSON.stringify(item))
}.loop(false)
.disableSwipe(true)
}.loop(false)
.indicator(false)
.width('100%')
.height('100%')
.effectMode(EdgeEffect.None)
.onChange(index => {
if (index == 1) {
WDRouterRule.jumpWithReplacePage(WDRouterPage.launchInterestsPage)
}
})
}.width('100%')
.height('100%')
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchAdvertisingPage.ets
View file @
8bb959f
...
...
@@ -103,8 +103,8 @@ struct LaunchAdvertisingPage {
.fontSize('24lpx')
.width('72lpx')
.height('36lpx')
.borderRadius(5)
.margin({top:'10lpx',left:'19lpx'})
.borderRadius(2)
.margin({top:'15lpx',left:'19lpx'})
.backgroundColor('#80000000')
}
.width('100%')
...
...
@@ -191,7 +191,7 @@ struct LaunchAdvertisingPage {
this.trackingLaunchClick()
if(this.defaultModel.linkUrl.length > 0){
if (this.defaultModel.o
bject
Type == '2') {
if (this.defaultModel.o
pen
Type == '2') {
//端外打开
ProcessUtils.jumpExternalWebPage(this.defaultModel.linkUrl)
}else {
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchInterestsHobbiesPage.ets
View file @
8bb959f
...
...
@@ -3,8 +3,9 @@ import { WDRouterRule } from 'wdRouter';
import { WDRouterPage } from 'wdRouter';
import { SPHelper } from 'wdKit/Index';
import { SpConstants } from 'wdConstant/Index';
import { ButtonOptions, promptAction } from '@kit.ArkUI';
import { ButtonOptions, promptAction
, window
} from '@kit.ArkUI';
import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index';
import { ImageKnifeComponent } from '@ohos/imageknife';
@Entry
@Component
...
...
@@ -13,7 +14,6 @@ struct LaunchInterestsHobbiesPage {
@State selectCount: number = 0
@State interestsArray: InterestsList[] = []
aboutToAppear(){
//请求接口,获取兴趣偏好数据
this.requestInterestsData()
...
...
@@ -21,106 +21,116 @@ struct LaunchInterestsHobbiesPage {
build() {
Column() {
Row(){
Blank()
Text('跳过')
.fontSize('27lpx')
.fontColor('#333333')
.width('54lpx')
.height('35lpx')
.margin({top:'27lpx',right:'46lpx'})
.onClick(()=>{
//直接跳过到首页
//跳转首页
WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
this.trackingLaunchJumpOver(false)
})
}
.width('100%')
.justifyContent(FlexAlign.End)
Text('选择感兴趣的内容')
.fontSize('46lpx')
.fontWeight(FontWeight.Bold)
.textAlign(TextAlign.Center)
.fontColor('#333333')
.width('100%')
.height('61lpx')
.margin({top:'84lpx'})
Text('完善信息,将为您推荐个性化的内容')
.fontSize('27lpx')
.textAlign(TextAlign.Center)
.fontColor('#9E9E9E')
.width('100%')
.height('35lpx')
.margin({top:'12lpx'})
Grid( ){
ForEach(this.interestsArray,(item:InterestsList,index:number)=>{
GridItem(){
Stack({alignContent:Alignment.TopStart}){
Image(item.pic)
.width('100%')
.height('100%')
.backgroundColor(Color.White)
.borderRadius(5)
Stack(){
Image('')
.width('100%')
.height('100%')
.backgroundColor(Color.Black)
.opacity(item.choose?0.5:0)
.borderRadius(5)
}
Stack(){
Column({}){
Text(item.name)
.fontSize(18)
.fontColor('#FFFFFF')
.margin({top:'21lpx',left:'19lpx'})
.width('100%')
.height('46lpx')
.fontWeight(FontWeight.Bold)
Text(item.title)
.fontSize('23lpx')
.fontColor('#FFFFFF')
.margin({top:'2lpx',left:'19lpx'})
Stack(){
Column(){
Row(){
Blank()
Text('跳过')
.fontSize('27lpx')
.fontColor('#333333')
.width('54lpx')
.height('35lpx')
.margin({right:'46lpx'})
.onClick(()=>{
//直接跳过到首页
//跳转首页
WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
this.trackingLaunchJumpOver(false)
})
}
.width('100%')
.justifyContent(FlexAlign.End)
Text('选择感兴趣的内容')
.fontSize('46lpx')
.fontWeight(FontWeight.Bold)
.textAlign(TextAlign.Center)
.fontColor('#333333')
.width('100%')
.height('61lpx')
.margin({top:'84lpx'})
Text('完善信息,将为您推荐个性化的内容')
.fontSize('27lpx')
.textAlign(TextAlign.Center)
.fontColor('#9E9E9E')
.width('100%')
.height('35lpx')
.margin({top:'12lpx'})
Grid( ){
ForEach(this.interestsArray,(item:InterestsList,index:number)=>{
GridItem(){
Stack({alignContent:Alignment.TopStart}){
ImageKnifeComponent({imageKnifeOption:{loadSrc:item.pic}})
.width('100%')
.height('31lpx')
Image(item.choose ? $r('app.media.interestsSelected') : $r('app.media.interestsSelectNot'))
.height('32lpx')
.width('32lpx')
.margin({top:'80lpx',left:'110lpx'})
}.justifyContent(FlexAlign.Start)
.height('100%')
.backgroundColor(Color.White)
.borderRadius(5)
// Image(item.pic)
// .width('100%')
// .height('100%')
// .backgroundColor(Color.White)
// .borderRadius(5)
Stack(){
Image('')
.width('100%')
.height('100%')
.backgroundColor(Color.Black)
.opacity(item.choose?0.5:0)
.borderRadius(5)
}
Stack(){
Column({}){
Text(item.name)
.fontSize(18)
.fontColor('#FFFFFF')
.margin({top:'21lpx',left:'19lpx'})
.width('100%')
.height('46lpx')
.fontWeight(FontWeight.Bold)
Text(item.title)
.fontSize('23lpx')
.fontColor('#FFFFFF')
.margin({top:'2lpx',left:'19lpx'})
.width('100%')
.height('31lpx')
Image(item.choose ? $r('app.media.interestsSelected') : $r('app.media.interestsSelectNot'))
.height('32lpx')
.width('32lpx')
.margin({top:'80lpx',left:'110lpx'})
}.justifyContent(FlexAlign.Start)
}
}
}
.width('192lpx')
.height('230lpx')
.borderRadius('8lpx')
.onClick(()=>{
//选择后改变已选择属性
item.choose = !item.choose
this.interestsArray.splice(index,1,item)
this.selectCount = this.interestsArray.filter(item => item.choose).length
})
}
}
)
}
.width('192lpx')
.height('230lpx')
.borderRadius('8lpx')
.onClick(()=>{
//选择后改变已选择属性
item.choose = !item.choose
this.interestsArray.splice(index,1,item)
this.selectCount = this.interestsArray.filter(item => item.choose).length
})
})
.width('90%')
// .height('70%')
.margin({top:'61lpx',bottom:'240lpx'})
.columnsTemplate('1fr 1fr 1fr')
.columnsGap('23lpx')
.rowsGap('23lpx')
.scrollBar(BarState.Off)
}
.width('100%')
.height('100%')
}
.width('90%')
.height('70%')
.margin({top:'61lpx'})
.columnsTemplate('1fr 1fr 1fr')
// .rowsTemplate('1fr 1fr 1fr 1fr')
.columnsGap('23lpx')
.rowsGap('23lpx')
.scrollBar(BarState.Off)
.width('100%')
.height(`calc(100% - ${108 + 'lpx'})`)
// .backgroundColor(Color.Red)
Stack({alignContent:Alignment.Center}){
Button(this.selectCount == 0?'选好了':'选好了(' + this.selectCount + ')')
...
...
@@ -131,9 +141,11 @@ struct LaunchInterestsHobbiesPage {
.borderRadius('10lpx')
.width('662lpx')
.height('84lpx')
.margin({top:'10lpx'})
Image('')
.width('662lpx')
.height('84lpx')
.margin({top:'10lpx'})
.backgroundColor(Color.White)
.opacity(this.selectCount == 0 ? 0.6 : 0)
.borderRadius('10lpx')
...
...
@@ -156,10 +168,8 @@ struct LaunchInterestsHobbiesPage {
}
.width('100%')
.height('108lpx')
// .position({y:})
// .margin({bottom:'1',top:'1'})
.backgroundColor('#FFFFFF')
.margin({top:0})
// .backgroundColor(Color.Orange)
}
.width('100%')
.height('100%')
...
...
Please
register
or
login
to post a comment