Showing
7 changed files
with
33 additions
and
12 deletions
| 1 | +import { BottomNavDTO } from 'wdBean/Index' | ||
| 1 | import { WDRouterRule, WDRouterPage } from 'wdRouter' | 2 | import { WDRouterRule, WDRouterPage } from 'wdRouter' |
| 2 | import { TrackConstants } from 'wdTracking/src/main/ets/common/TrackConstants' | 3 | import { TrackConstants } from 'wdTracking/src/main/ets/common/TrackConstants' |
| 3 | import { TrackingButton } from 'wdTracking/src/main/ets/tracking/TrackingButton' | 4 | import { TrackingButton } from 'wdTracking/src/main/ets/tracking/TrackingButton' |
| @@ -12,12 +13,13 @@ export default struct MinePagePersonFunctionUI { | @@ -12,12 +13,13 @@ export default struct MinePagePersonFunctionUI { | ||
| 12 | @Link personalData:MinePagePersonalFunctionsItem[] | 13 | @Link personalData:MinePagePersonalFunctionsItem[] |
| 13 | @Prop isLogin:boolean | 14 | @Prop isLogin:boolean |
| 14 | @Link percent:number | 15 | @Link percent:number |
| 16 | + navItem: BottomNavDTO = {} as BottomNavDTO | ||
| 15 | 17 | ||
| 16 | build() { | 18 | build() { |
| 17 | Grid(){ | 19 | Grid(){ |
| 18 | ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{ | 20 | ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{ |
| 19 | GridItem(){ | 21 | GridItem(){ |
| 20 | - PagePersonFunction({ item: item, noDivider : (index % 5 < 4 && index != this.personalData.length-1) ? false : true,percent:$percent}) | 22 | + PagePersonFunction({ item: item, noDivider : (index % 5 < 4 && index != this.personalData.length-1) ? false : true,percent:$percent,navItem:this.navItem}) |
| 21 | }.onClick(()=>{ | 23 | }.onClick(()=>{ |
| 22 | console.log(index+"") | 24 | console.log(index+"") |
| 23 | switch (item.msg){ | 25 | switch (item.msg){ |
| 1 | +import { BottomNavDTO } from 'wdBean/Index' | ||
| 1 | import { SpConstants } from 'wdConstant/Index' | 2 | import { SpConstants } from 'wdConstant/Index' |
| 2 | import { SPHelper, StringUtils, UserDataLocal } from 'wdKit' | 3 | import { SPHelper, StringUtils, UserDataLocal } from 'wdKit' |
| 3 | import { WDRouterPage, WDRouterRule } from 'wdRouter' | 4 | import { WDRouterPage, WDRouterRule } from 'wdRouter' |
| @@ -15,6 +16,7 @@ export default struct MinePageUserSimpleInfoUI { | @@ -15,6 +16,7 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 15 | @State levelHead:string = "" | 16 | @State levelHead:string = "" |
| 16 | @State levelId:number = 0 | 17 | @State levelId:number = 0 |
| 17 | @Link percent:number | 18 | @Link percent:number |
| 19 | + navItem: BottomNavDTO = {} as BottomNavDTO | ||
| 18 | 20 | ||
| 19 | loginStateChange(){ | 21 | loginStateChange(){ |
| 20 | if(this.isLogin){ | 22 | if(this.isLogin){ |
| @@ -62,6 +64,7 @@ export default struct MinePageUserSimpleInfoUI { | @@ -62,6 +64,7 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 62 | Column(){ | 64 | Column(){ |
| 63 | Row(){ | 65 | Row(){ |
| 64 | Text(this.userName) | 66 | Text(this.userName) |
| 67 | + // .fontColor(this.navItem?.homePageColor.length > 0?this.navItem.homePageColor:$r('app.color.color_222222')) | ||
| 65 | .fontColor($r('app.color.color_222222')) | 68 | .fontColor($r('app.color.color_222222')) |
| 66 | .maxLines(1) | 69 | .maxLines(1) |
| 67 | .fontWeight(FontWeight.Medium) | 70 | .fontWeight(FontWeight.Medium) |
| @@ -72,6 +75,8 @@ export default struct MinePageUserSimpleInfoUI { | @@ -72,6 +75,8 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 72 | Image($r('app.media.mine_user_edit')) | 75 | Image($r('app.media.mine_user_edit')) |
| 73 | .width(`${this.calcHeight(27)}lpx`) | 76 | .width(`${this.calcHeight(27)}lpx`) |
| 74 | .height(`${this.calcHeight(27)}lpx`) | 77 | .height(`${this.calcHeight(27)}lpx`) |
| 78 | + // .colorBlend(this.navItem?.homePageColor.length > 0?this.navItem?.homePageColor:null) | ||
| 79 | + .colorBlend(Color.Red) | ||
| 75 | .margin({left:`${this.calcHeight(15)}lpx`}) | 80 | .margin({left:`${this.calcHeight(15)}lpx`}) |
| 76 | .objectFit(ImageFit.Cover) | 81 | .objectFit(ImageFit.Cover) |
| 77 | Blank() | 82 | Blank() |
| @@ -137,7 +142,7 @@ export default struct MinePageUserSimpleInfoUI { | @@ -137,7 +142,7 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 137 | .height(`${this.calcHeight(50)}lpx`) | 142 | .height(`${this.calcHeight(50)}lpx`) |
| 138 | }.width('131lpx') | 143 | }.width('131lpx') |
| 139 | .visibility(Visibility.Hidden) | 144 | .visibility(Visibility.Hidden) |
| 140 | - }.backgroundColor($r('app.color.white')) | 145 | + } |
| 141 | .setFullWidth() | 146 | .setFullWidth() |
| 142 | .padding({top:'31lpx',left:'46lpx'}) | 147 | .padding({top:'31lpx',left:'46lpx'}) |
| 143 | } | 148 | } |
| 1 | +import { BottomNavDTO } from 'wdBean/Index' | ||
| 1 | import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem' | 2 | import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem' |
| 2 | 3 | ||
| 3 | @Component | 4 | @Component |
| @@ -5,12 +6,13 @@ export struct PagePersonFunction{ | @@ -5,12 +6,13 @@ export struct PagePersonFunction{ | ||
| 5 | @ObjectLink item: MinePagePersonalFunctionsItem | 6 | @ObjectLink item: MinePagePersonalFunctionsItem |
| 6 | @State noDivider:boolean = false | 7 | @State noDivider:boolean = false |
| 7 | @Link percent:number | 8 | @Link percent:number |
| 8 | - | 9 | + navItem: BottomNavDTO = {} as BottomNavDTO |
| 9 | build() { | 10 | build() { |
| 10 | Row(){ | 11 | Row(){ |
| 11 | Column(){ | 12 | Column(){ |
| 12 | Stack({ alignContent: Alignment.TopEnd }){ | 13 | Stack({ alignContent: Alignment.TopEnd }){ |
| 13 | Image(this.item.imgSrc) | 14 | Image(this.item.imgSrc) |
| 15 | + // .colorBlend(this.navItem?.homePageColor.length > 0?this.navItem.homePageColor:null) | ||
| 14 | .objectFit(ImageFit.Auto) | 16 | .objectFit(ImageFit.Auto) |
| 15 | .interpolation(ImageInterpolation.High) | 17 | .interpolation(ImageInterpolation.High) |
| 16 | if (this.item.isShowRedPoint) { | 18 | if (this.item.isShowRedPoint) { |
| @@ -26,6 +28,7 @@ export struct PagePersonFunction{ | @@ -26,6 +28,7 @@ export struct PagePersonFunction{ | ||
| 26 | Text(`${this.item.msg}`) | 28 | Text(`${this.item.msg}`) |
| 27 | .margin({top:`${this.calcHeight(8)}lpx`}) | 29 | .margin({top:`${this.calcHeight(8)}lpx`}) |
| 28 | .height(`${this.calcHeight(23)}lpx`) | 30 | .height(`${this.calcHeight(23)}lpx`) |
| 31 | + // .fontColor(this.navItem?.homePageColor.length > 0?this.navItem.homePageColor:$r('app.color.color_222222')) | ||
| 29 | .fontColor($r('app.color.color_222222')) | 32 | .fontColor($r('app.color.color_222222')) |
| 30 | .fontSize(`${this.calcHeight(23)}lpx`) | 33 | .fontSize(`${this.calcHeight(23)}lpx`) |
| 31 | } | 34 | } |
| @@ -11,6 +11,7 @@ import dataPreferences from '@ohos.data.preferences'; | @@ -11,6 +11,7 @@ import dataPreferences from '@ohos.data.preferences'; | ||
| 11 | import { MergeRecordDialog } from '../../dialog/MergeRecordDialog' | 11 | import { MergeRecordDialog } from '../../dialog/MergeRecordDialog' |
| 12 | import { TrackingPageBrowse } from 'wdTracking/src/main/ets/tracking/TrackingPageBrowse' | 12 | import { TrackingPageBrowse } from 'wdTracking/src/main/ets/tracking/TrackingPageBrowse' |
| 13 | import { TrackConstants } from 'wdTracking/src/main/ets/common/TrackConstants' | 13 | import { TrackConstants } from 'wdTracking/src/main/ets/common/TrackConstants' |
| 14 | +import { BottomNavDTO } from 'wdBean/Index' | ||
| 14 | 15 | ||
| 15 | const TAG = 'MinePageComponent'; | 16 | const TAG = 'MinePageComponent'; |
| 16 | 17 | ||
| @@ -27,6 +28,11 @@ export struct MinePageComponent { | @@ -27,6 +28,11 @@ export struct MinePageComponent { | ||
| 27 | @State moreData:MinePageMoreFunctionModel[] = [] | 28 | @State moreData:MinePageMoreFunctionModel[] = [] |
| 28 | scroller: Scroller = new Scroller() | 29 | scroller: Scroller = new Scroller() |
| 29 | preferences: dataPreferences.Preferences | null = null; | 30 | preferences: dataPreferences.Preferences | null = null; |
| 31 | + /** | ||
| 32 | + * 我的 底导 某个tab 对象 | ||
| 33 | + */ | ||
| 34 | + navItem: BottomNavDTO = {} as BottomNavDTO | ||
| 35 | + | ||
| 30 | observer = (key: string) => { | 36 | observer = (key: string) => { |
| 31 | if(key == SpConstants.USER_ID){ | 37 | if(key == SpConstants.USER_ID){ |
| 32 | if(StringUtils.isEmpty(SPHelper.default.getSync(SpConstants.USER_ID,""))){ | 38 | if(StringUtils.isEmpty(SPHelper.default.getSync(SpConstants.USER_ID,""))){ |
| @@ -158,12 +164,12 @@ export struct MinePageComponent { | @@ -158,12 +164,12 @@ export struct MinePageComponent { | ||
| 158 | Column(){ | 164 | Column(){ |
| 159 | Scroll(this.scroller){ | 165 | Scroll(this.scroller){ |
| 160 | Stack(){ | 166 | Stack(){ |
| 161 | - Image($r('app.media.mine_head_bg')) | 167 | + Image(this.navItem?.backgroundUrl??'') |
| 162 | .width('100%') | 168 | .width('100%') |
| 163 | .height(`${657 * this.percent}lpx`) | 169 | .height(`${657 * this.percent}lpx`) |
| 164 | - .objectFit(ImageFit.Auto) | 170 | + .objectFit(ImageFit.Cover) |
| 165 | this.MinePageUI() | 171 | this.MinePageUI() |
| 166 | - } | 172 | + }.height('100%') |
| 167 | .alignContent(Alignment.Top) | 173 | .alignContent(Alignment.Top) |
| 168 | } | 174 | } |
| 169 | .setFullWidthAndHeight() | 175 | .setFullWidthAndHeight() |
| @@ -173,16 +179,15 @@ export struct MinePageComponent { | @@ -173,16 +179,15 @@ export struct MinePageComponent { | ||
| 173 | 179 | ||
| 174 | }.width("100%") | 180 | }.width("100%") |
| 175 | .height("100%") | 181 | .height("100%") |
| 176 | - .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 177 | - } | ||
| 178 | 182 | ||
| 183 | + } | ||
| 179 | 184 | ||
| 180 | @Builder MinePageUI(){ | 185 | @Builder MinePageUI(){ |
| 181 | Column(){ | 186 | Column(){ |
| 182 | //头像层 | 187 | //头像层 |
| 183 | - MinePageUserSimpleInfoUI({isLogin:this.isLogin,percent:$percent}) | 188 | + MinePageUserSimpleInfoUI({isLogin:this.isLogin,percent:$percent,navItem:this.navItem}) |
| 184 | //Grid 区域 | 189 | //Grid 区域 |
| 185 | - MinePagePersonFunctionUI({personalData:$personalData,isLogin:this.isLogin,percent:$percent}) | 190 | + MinePagePersonFunctionUI({personalData:$personalData,isLogin:this.isLogin,percent:$percent,navItem:this.navItem}) |
| 186 | //Card | 191 | //Card |
| 187 | //MinePageCardUI() | 192 | //MinePageCardUI() |
| 188 | //创作者区域 | 193 | //创作者区域 |
| @@ -192,6 +197,7 @@ export struct MinePageComponent { | @@ -192,6 +197,7 @@ export struct MinePageComponent { | ||
| 192 | MinePageMoreFunctionUI({moreData:$moreData,percent:$percent}) | 197 | MinePageMoreFunctionUI({moreData:$moreData,percent:$percent}) |
| 193 | }.width('100%') | 198 | }.width('100%') |
| 194 | .height('100%') | 199 | .height('100%') |
| 200 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 195 | .justifyContent(FlexAlign.Start) | 201 | .justifyContent(FlexAlign.Start) |
| 196 | } | 202 | } |
| 197 | 203 |
| @@ -56,7 +56,11 @@ export struct PlayUIComponent { | @@ -56,7 +56,11 @@ export struct PlayUIComponent { | ||
| 56 | this.playerController.onStatusChangeForPlayUIComponent = (status: number) => { | 56 | this.playerController.onStatusChangeForPlayUIComponent = (status: number) => { |
| 57 | if(1 == status){ | 57 | if(1 == status){ |
| 58 | this.ispause = false | 58 | this.ispause = false |
| 59 | - this.isMenuVisible = false | 59 | + if(this.isMenuVisible){ |
| 60 | + this.onChangeMenuVisible() | ||
| 61 | + }else{ | ||
| 62 | + this.isMenuVisible = true | ||
| 63 | + } | ||
| 60 | }else if(2 == status){ | 64 | }else if(2 == status){ |
| 61 | this.ispause = true | 65 | this.ispause = true |
| 62 | } | 66 | } |
| @@ -282,6 +282,7 @@ export struct TopPlayComponent { | @@ -282,6 +282,7 @@ export struct TopPlayComponent { | ||
| 282 | }) | 282 | }) |
| 283 | }.width('100%').visibility(this.isPlayerError ? Visibility.Visible : | 283 | }.width('100%').visibility(this.isPlayerError ? Visibility.Visible : |
| 284 | Visibility.None) | 284 | Visibility.None) |
| 285 | + .margin({top:40}) | ||
| 285 | 286 | ||
| 286 | } | 287 | } |
| 287 | .width('100%') | 288 | .width('100%') |
| @@ -83,7 +83,7 @@ export struct BottomNavigationComponent { | @@ -83,7 +83,7 @@ export struct BottomNavigationComponent { | ||
| 83 | TabContent() { | 83 | TabContent() { |
| 84 | if (CompUtils.isMine(navItem)) { | 84 | if (CompUtils.isMine(navItem)) { |
| 85 | // 我的页面组件数据列表 | 85 | // 我的页面组件数据列表 |
| 86 | - MinePageComponent({ isMinePage: this.currentNavIndex === this.bottomNavList.length - 1 }) | 86 | + MinePageComponent({ isMinePage: this.currentNavIndex === this.bottomNavList.length - 1 , navItem:navItem}) |
| 87 | } else if (CompUtils.isVideo(navItem)) { | 87 | } else if (CompUtils.isVideo(navItem)) { |
| 88 | // 视频频道,包含视频和直播 | 88 | // 视频频道,包含视频和直播 |
| 89 | VideoChannelPage({ | 89 | VideoChannelPage({ |
-
Please register or login to post a comment