Showing
4 changed files
with
38 additions
and
21 deletions
| @@ -224,7 +224,7 @@ export struct MorningEveningPaperComponent { | @@ -224,7 +224,7 @@ export struct MorningEveningPaperComponent { | ||
| 224 | if (imageSource) { | 224 | if (imageSource) { |
| 225 | const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource); | 225 | const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource); |
| 226 | effectKit.createColorPicker(pixelMap, (err, colorPicker) => { | 226 | effectKit.createColorPicker(pixelMap, (err, colorPicker) => { |
| 227 | - let color = colorPicker.getMainColorSync(); | 227 | + let color = colorPicker.getLargestProportionColor(); |
| 228 | Logger.debug(TAG, "compInfoBean compStyle = " + color) | 228 | Logger.debug(TAG, "compInfoBean compStyle = " + color) |
| 229 | // color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha}) | 229 | // color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha}) |
| 230 | // 将取色器选取的color示例转换为十六进制颜色代码 | 230 | // 将取色器选取的color示例转换为十六进制颜色代码 |
| @@ -273,6 +273,7 @@ export struct MorningEveningPaperComponent { | @@ -273,6 +273,7 @@ export struct MorningEveningPaperComponent { | ||
| 273 | } | 273 | } |
| 274 | } | 274 | } |
| 275 | // .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`) | 275 | // .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`) |
| 276 | + .edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果 | ||
| 276 | .scrollBar(BarState.Off) | 277 | .scrollBar(BarState.Off) |
| 277 | .onWillScroll(scrollOffset =>{ | 278 | .onWillScroll(scrollOffset =>{ |
| 278 | this.scrollOffset = this.scrollOffset + scrollOffset as number | 279 | this.scrollOffset = this.scrollOffset + scrollOffset as number |
| @@ -7,8 +7,8 @@ struct GuidePages { | @@ -7,8 +7,8 @@ struct GuidePages { | ||
| 7 | // 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')] | 7 | // 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')] |
| 8 | // 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')] | 8 | // 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')] |
| 9 | // 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')] | 9 | // 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')] |
| 10 | - guideImage = [$r('app.media.guide_Static')] | ||
| 11 | - guideIndex = [$r('app.media.guide_button')] | 10 | + guideImage = [$r('app.media.guide_Static'),''] |
| 11 | + guideIndex = [$r('app.media.guide_button'),''] | ||
| 12 | 12 | ||
| 13 | build() { | 13 | build() { |
| 14 | Column() { | 14 | Column() { |
| @@ -17,10 +17,16 @@ struct GuidePages { | @@ -17,10 +17,16 @@ struct GuidePages { | ||
| 17 | this.ChildItem(index) | 17 | this.ChildItem(index) |
| 18 | 18 | ||
| 19 | }, (item: number) => JSON.stringify(item)) | 19 | }, (item: number) => JSON.stringify(item)) |
| 20 | - }.loop(false).disableSwipe(true) | 20 | + }.loop(false) |
| 21 | .indicator(false) | 21 | .indicator(false) |
| 22 | .width('100%') | 22 | .width('100%') |
| 23 | .height('100%') | 23 | .height('100%') |
| 24 | + .effectMode(EdgeEffect.None) | ||
| 25 | + .onChange(index => { | ||
| 26 | + if (index == 1) { | ||
| 27 | + WDRouterRule.jumpWithReplacePage(WDRouterPage.launchInterestsPage) | ||
| 28 | + } | ||
| 29 | + }) | ||
| 24 | }.width('100%') | 30 | }.width('100%') |
| 25 | .height('100%') | 31 | .height('100%') |
| 26 | 32 |
| @@ -103,8 +103,8 @@ struct LaunchAdvertisingPage { | @@ -103,8 +103,8 @@ struct LaunchAdvertisingPage { | ||
| 103 | .fontSize('24lpx') | 103 | .fontSize('24lpx') |
| 104 | .width('72lpx') | 104 | .width('72lpx') |
| 105 | .height('36lpx') | 105 | .height('36lpx') |
| 106 | - .borderRadius(5) | ||
| 107 | - .margin({top:'10lpx',left:'19lpx'}) | 106 | + .borderRadius(2) |
| 107 | + .margin({top:'15lpx',left:'19lpx'}) | ||
| 108 | .backgroundColor('#80000000') | 108 | .backgroundColor('#80000000') |
| 109 | } | 109 | } |
| 110 | .width('100%') | 110 | .width('100%') |
| @@ -191,7 +191,7 @@ struct LaunchAdvertisingPage { | @@ -191,7 +191,7 @@ struct LaunchAdvertisingPage { | ||
| 191 | this.trackingLaunchClick() | 191 | this.trackingLaunchClick() |
| 192 | 192 | ||
| 193 | if(this.defaultModel.linkUrl.length > 0){ | 193 | if(this.defaultModel.linkUrl.length > 0){ |
| 194 | - if (this.defaultModel.objectType == '2') { | 194 | + if (this.defaultModel.openType == '2') { |
| 195 | //端外打开 | 195 | //端外打开 |
| 196 | ProcessUtils.jumpExternalWebPage(this.defaultModel.linkUrl) | 196 | ProcessUtils.jumpExternalWebPage(this.defaultModel.linkUrl) |
| 197 | }else { | 197 | }else { |
| @@ -3,8 +3,9 @@ import { WDRouterRule } from 'wdRouter'; | @@ -3,8 +3,9 @@ import { WDRouterRule } from 'wdRouter'; | ||
| 3 | import { WDRouterPage } from 'wdRouter'; | 3 | import { WDRouterPage } from 'wdRouter'; |
| 4 | import { SPHelper } from 'wdKit/Index'; | 4 | import { SPHelper } from 'wdKit/Index'; |
| 5 | import { SpConstants } from 'wdConstant/Index'; | 5 | import { SpConstants } from 'wdConstant/Index'; |
| 6 | -import { ButtonOptions, promptAction } from '@kit.ArkUI'; | 6 | +import { ButtonOptions, promptAction, window } from '@kit.ArkUI'; |
| 7 | import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index'; | 7 | import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index'; |
| 8 | +import { ImageKnifeComponent } from '@ohos/imageknife'; | ||
| 8 | 9 | ||
| 9 | @Entry | 10 | @Entry |
| 10 | @Component | 11 | @Component |
| @@ -13,7 +14,6 @@ struct LaunchInterestsHobbiesPage { | @@ -13,7 +14,6 @@ struct LaunchInterestsHobbiesPage { | ||
| 13 | @State selectCount: number = 0 | 14 | @State selectCount: number = 0 |
| 14 | @State interestsArray: InterestsList[] = [] | 15 | @State interestsArray: InterestsList[] = [] |
| 15 | 16 | ||
| 16 | - | ||
| 17 | aboutToAppear(){ | 17 | aboutToAppear(){ |
| 18 | //请求接口,获取兴趣偏好数据 | 18 | //请求接口,获取兴趣偏好数据 |
| 19 | this.requestInterestsData() | 19 | this.requestInterestsData() |
| @@ -21,6 +21,8 @@ struct LaunchInterestsHobbiesPage { | @@ -21,6 +21,8 @@ struct LaunchInterestsHobbiesPage { | ||
| 21 | 21 | ||
| 22 | build() { | 22 | build() { |
| 23 | Column() { | 23 | Column() { |
| 24 | + Stack(){ | ||
| 25 | + Column(){ | ||
| 24 | Row(){ | 26 | Row(){ |
| 25 | Blank() | 27 | Blank() |
| 26 | Text('跳过') | 28 | Text('跳过') |
| @@ -28,7 +30,7 @@ struct LaunchInterestsHobbiesPage { | @@ -28,7 +30,7 @@ struct LaunchInterestsHobbiesPage { | ||
| 28 | .fontColor('#333333') | 30 | .fontColor('#333333') |
| 29 | .width('54lpx') | 31 | .width('54lpx') |
| 30 | .height('35lpx') | 32 | .height('35lpx') |
| 31 | - .margin({top:'27lpx',right:'46lpx'}) | 33 | + .margin({right:'46lpx'}) |
| 32 | .onClick(()=>{ | 34 | .onClick(()=>{ |
| 33 | //直接跳过到首页 | 35 | //直接跳过到首页 |
| 34 | //跳转首页 | 36 | //跳转首页 |
| @@ -60,12 +62,16 @@ struct LaunchInterestsHobbiesPage { | @@ -60,12 +62,16 @@ struct LaunchInterestsHobbiesPage { | ||
| 60 | ForEach(this.interestsArray,(item:InterestsList,index:number)=>{ | 62 | ForEach(this.interestsArray,(item:InterestsList,index:number)=>{ |
| 61 | GridItem(){ | 63 | GridItem(){ |
| 62 | Stack({alignContent:Alignment.TopStart}){ | 64 | Stack({alignContent:Alignment.TopStart}){ |
| 63 | - | ||
| 64 | - Image(item.pic) | 65 | + ImageKnifeComponent({imageKnifeOption:{loadSrc:item.pic}}) |
| 65 | .width('100%') | 66 | .width('100%') |
| 66 | .height('100%') | 67 | .height('100%') |
| 67 | .backgroundColor(Color.White) | 68 | .backgroundColor(Color.White) |
| 68 | .borderRadius(5) | 69 | .borderRadius(5) |
| 70 | + // Image(item.pic) | ||
| 71 | + // .width('100%') | ||
| 72 | + // .height('100%') | ||
| 73 | + // .backgroundColor(Color.White) | ||
| 74 | + // .borderRadius(5) | ||
| 69 | Stack(){ | 75 | Stack(){ |
| 70 | Image('') | 76 | Image('') |
| 71 | .width('100%') | 77 | .width('100%') |
| @@ -74,7 +80,6 @@ struct LaunchInterestsHobbiesPage { | @@ -74,7 +80,6 @@ struct LaunchInterestsHobbiesPage { | ||
| 74 | .opacity(item.choose?0.5:0) | 80 | .opacity(item.choose?0.5:0) |
| 75 | .borderRadius(5) | 81 | .borderRadius(5) |
| 76 | } | 82 | } |
| 77 | - | ||
| 78 | Stack(){ | 83 | Stack(){ |
| 79 | Column({}){ | 84 | Column({}){ |
| 80 | Text(item.name) | 85 | Text(item.name) |
| @@ -111,16 +116,21 @@ struct LaunchInterestsHobbiesPage { | @@ -111,16 +116,21 @@ struct LaunchInterestsHobbiesPage { | ||
| 111 | }) | 116 | }) |
| 112 | 117 | ||
| 113 | }) | 118 | }) |
| 114 | - | ||
| 115 | } | 119 | } |
| 116 | .width('90%') | 120 | .width('90%') |
| 117 | - .height('70%') | ||
| 118 | - .margin({top:'61lpx'}) | 121 | + // .height('70%') |
| 122 | + .margin({top:'61lpx',bottom:'240lpx'}) | ||
| 119 | .columnsTemplate('1fr 1fr 1fr') | 123 | .columnsTemplate('1fr 1fr 1fr') |
| 120 | - // .rowsTemplate('1fr 1fr 1fr 1fr') | ||
| 121 | .columnsGap('23lpx') | 124 | .columnsGap('23lpx') |
| 122 | .rowsGap('23lpx') | 125 | .rowsGap('23lpx') |
| 123 | .scrollBar(BarState.Off) | 126 | .scrollBar(BarState.Off) |
| 127 | + } | ||
| 128 | + .width('100%') | ||
| 129 | + .height('100%') | ||
| 130 | + } | ||
| 131 | + .width('100%') | ||
| 132 | + .height(`calc(100% - ${108 + 'lpx'})`) | ||
| 133 | + // .backgroundColor(Color.Red) | ||
| 124 | 134 | ||
| 125 | Stack({alignContent:Alignment.Center}){ | 135 | Stack({alignContent:Alignment.Center}){ |
| 126 | Button(this.selectCount == 0?'选好了':'选好了(' + this.selectCount + ')') | 136 | Button(this.selectCount == 0?'选好了':'选好了(' + this.selectCount + ')') |
| @@ -131,9 +141,11 @@ struct LaunchInterestsHobbiesPage { | @@ -131,9 +141,11 @@ struct LaunchInterestsHobbiesPage { | ||
| 131 | .borderRadius('10lpx') | 141 | .borderRadius('10lpx') |
| 132 | .width('662lpx') | 142 | .width('662lpx') |
| 133 | .height('84lpx') | 143 | .height('84lpx') |
| 144 | + .margin({top:'10lpx'}) | ||
| 134 | Image('') | 145 | Image('') |
| 135 | .width('662lpx') | 146 | .width('662lpx') |
| 136 | .height('84lpx') | 147 | .height('84lpx') |
| 148 | + .margin({top:'10lpx'}) | ||
| 137 | .backgroundColor(Color.White) | 149 | .backgroundColor(Color.White) |
| 138 | .opacity(this.selectCount == 0 ? 0.6 : 0) | 150 | .opacity(this.selectCount == 0 ? 0.6 : 0) |
| 139 | .borderRadius('10lpx') | 151 | .borderRadius('10lpx') |
| @@ -156,10 +168,8 @@ struct LaunchInterestsHobbiesPage { | @@ -156,10 +168,8 @@ struct LaunchInterestsHobbiesPage { | ||
| 156 | } | 168 | } |
| 157 | .width('100%') | 169 | .width('100%') |
| 158 | .height('108lpx') | 170 | .height('108lpx') |
| 159 | - // .position({y:}) | ||
| 160 | - // .margin({bottom:'1',top:'1'}) | ||
| 161 | - .backgroundColor('#FFFFFF') | ||
| 162 | - | 171 | + .margin({top:0}) |
| 172 | + // .backgroundColor(Color.Orange) | ||
| 163 | } | 173 | } |
| 164 | .width('100%') | 174 | .width('100%') |
| 165 | .height('100%') | 175 | .height('100%') |
-
Please register or login to post a comment