Showing
11 changed files
with
44 additions
and
55 deletions
| @@ -32,6 +32,9 @@ export struct Card10Component { | @@ -32,6 +32,9 @@ export struct Card10Component { | ||
| 32 | @State isBatchData: boolean = false | 32 | @State isBatchData: boolean = false |
| 33 | 33 | ||
| 34 | async aboutToAppear(): Promise<void> { | 34 | async aboutToAppear(): Promise<void> { |
| 35 | + console.log('Card10Component-compDTO', JSON.stringify(this.compDTO)) | ||
| 36 | + console.log('Card10Component-contentDTO', JSON.stringify(this.contentDTO)) | ||
| 37 | + | ||
| 35 | this.titleInit(); | 38 | this.titleInit(); |
| 36 | this.loadImg = await onlyWifiLoadImg(); | 39 | this.loadImg = await onlyWifiLoadImg(); |
| 37 | this.initHideDetail(); | 40 | this.initHideDetail(); |
| @@ -41,7 +41,7 @@ export struct Card11Component { | @@ -41,7 +41,7 @@ export struct Card11Component { | ||
| 41 | Column() { | 41 | Column() { |
| 42 | Stack() { | 42 | Stack() { |
| 43 | if(this.contentDTO.objectType == '5'){ | 43 | if(this.contentDTO.objectType == '5'){ |
| 44 | - Notes({ objectType: this.contentDTO.objectType }).height(28).align(Alignment.Center) | 44 | + Notes({ objectType: this.contentDTO.objectType, }).height(28).align(Alignment.Center) |
| 45 | } else { | 45 | } else { |
| 46 | if (this.contentDTO.seoTags) { | 46 | if (this.contentDTO.seoTags) { |
| 47 | Notes({ newTags: this.contentDTO.seoTags }).height(28).align(Alignment.Center) | 47 | Notes({ newTags: this.contentDTO.seoTags }).height(28).align(Alignment.Center) |
| @@ -77,7 +77,6 @@ export struct Card11Component { | @@ -77,7 +77,6 @@ export struct Card11Component { | ||
| 77 | (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 : | 77 | (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 : |
| 78 | ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 : | 78 | ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 : |
| 79 | 0 ) | 79 | 0 ) |
| 80 | - | ||
| 81 | }.alignContent(Alignment.TopStart) | 80 | }.alignContent(Alignment.TopStart) |
| 82 | 81 | ||
| 83 | 82 |
| @@ -48,20 +48,6 @@ export struct Card2Component { | @@ -48,20 +48,6 @@ export struct Card2Component { | ||
| 48 | Column() { | 48 | Column() { |
| 49 | Column() { | 49 | Column() { |
| 50 | Stack() { | 50 | Stack() { |
| 51 | - // if(this.contentDTO.objectType == '5'){ | ||
| 52 | - // Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center) | ||
| 53 | - // }else if(this.contentDTO.objectType == '2'){ | ||
| 54 | - // if(this.contentDTO.seoTags){ | ||
| 55 | - // Notes({ newTags: this.contentDTO.seoTags }).height(30).align(Alignment.Center) | ||
| 56 | - // }else if(this.contentDTO.newTags){ | ||
| 57 | - // Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center) | ||
| 58 | - // | ||
| 59 | - // } | ||
| 60 | - // }else { | ||
| 61 | - // if(this.contentDTO.newTags){ | ||
| 62 | - // Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center) | ||
| 63 | - // } | ||
| 64 | - // } | ||
| 65 | if(this.contentDTO.objectType == '5'){ | 51 | if(this.contentDTO.objectType == '5'){ |
| 66 | Notes({ objectType: this.contentDTO.objectType }).height(29).align(Alignment.Center) | 52 | Notes({ objectType: this.contentDTO.objectType }).height(29).align(Alignment.Center) |
| 67 | } else { | 53 | } else { |
| @@ -75,14 +61,6 @@ export struct Card2Component { | @@ -75,14 +61,6 @@ export struct Card2Component { | ||
| 75 | Notes({ newTags: '置顶' }).height(29).align(Alignment.Center) | 61 | Notes({ newTags: '置顶' }).height(29).align(Alignment.Center) |
| 76 | } | 62 | } |
| 77 | } | 63 | } |
| 78 | - //新闻标题 | ||
| 79 | - // if (this.contentDTO.newTags) { | ||
| 80 | - // | ||
| 81 | - // //Notes({ newTags: this.contentDTO.newTags }) | ||
| 82 | - // } else if (this.contentDTO.objectType == '5') { | ||
| 83 | - // | ||
| 84 | - // //Notes({ objectType: this.contentDTO.objectType }) | ||
| 85 | - // } | ||
| 86 | 64 | ||
| 87 | Text() { | 65 | Text() { |
| 88 | if (this.titleMarked) { | 66 | if (this.titleMarked) { |
| @@ -108,6 +86,7 @@ export struct Card2Component { | @@ -108,6 +86,7 @@ export struct Card2Component { | ||
| 108 | (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 : | 86 | (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 : |
| 109 | ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 : | 87 | ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 : |
| 110 | 0 ) | 88 | 0 ) |
| 89 | + .width('100%') | ||
| 111 | }.alignContent(Alignment.TopStart) | 90 | }.alignContent(Alignment.TopStart) |
| 112 | 91 | ||
| 113 | //.textIndent(this.contentDTO.objectType == '5' ? 35 : 0) | 92 | //.textIndent(this.contentDTO.objectType == '5' ? 35 : 0) |
| @@ -38,11 +38,6 @@ export struct Card3Component { | @@ -38,11 +38,6 @@ export struct Card3Component { | ||
| 38 | build() { | 38 | build() { |
| 39 | Column() { | 39 | Column() { |
| 40 | Stack() { | 40 | Stack() { |
| 41 | - // if (this.contentDTO.newTags) { | ||
| 42 | - // Notes({ newTags: this.contentDTO.newTags }).height(27).align(Alignment.Center) | ||
| 43 | - // } else if (this.contentDTO.objectType == '5') { | ||
| 44 | - // Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center) | ||
| 45 | - // } | ||
| 46 | if(this.contentDTO.objectType == '5'){ | 41 | if(this.contentDTO.objectType == '5'){ |
| 47 | Notes({ objectType: this.contentDTO.objectType }).height(29).align(Alignment.Center) | 42 | Notes({ objectType: this.contentDTO.objectType }).height(29).align(Alignment.Center) |
| 48 | } else { | 43 | } else { |
| @@ -84,6 +84,7 @@ export struct Card4Component { | @@ -84,6 +84,7 @@ export struct Card4Component { | ||
| 84 | (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 : | 84 | (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 : |
| 85 | ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 : | 85 | ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 : |
| 86 | 0 ) | 86 | 0 ) |
| 87 | + .width('100%') | ||
| 87 | }.alignContent(Alignment.TopStart) | 88 | }.alignContent(Alignment.TopStart) |
| 88 | //新闻标题 | 89 | //新闻标题 |
| 89 | 90 |
| @@ -44,16 +44,6 @@ export struct Card6Component { | @@ -44,16 +44,6 @@ export struct Card6Component { | ||
| 44 | Row() { | 44 | Row() { |
| 45 | Column() { | 45 | Column() { |
| 46 | Column() { | 46 | Column() { |
| 47 | - // TODO 这个tag涉及样式问题。待优化。 | ||
| 48 | - // if (this.contentDTO.newTags) { | ||
| 49 | - // Text(this.contentDTO.newTags) | ||
| 50 | - // .backgroundColor($r('app.color.color_ED2800')) | ||
| 51 | - // .borderRadius($r('app.float.button_border_radius')) | ||
| 52 | - // .fontColor($r('app.color.color_fff')) | ||
| 53 | - // .fontSize($r('app.float.font_size_12')) | ||
| 54 | - // .padding(2) | ||
| 55 | - // .margin({ right: 2 }) | ||
| 56 | - // } | ||
| 57 | Stack() { | 47 | Stack() { |
| 58 | if(this.contentDTO.objectType == '5'){ | 48 | if(this.contentDTO.objectType == '5'){ |
| 59 | Notes({ objectType: this.contentDTO.objectType }).height(28).align(Alignment.Center) | 49 | Notes({ objectType: this.contentDTO.objectType }).height(28).align(Alignment.Center) |
| @@ -71,7 +61,6 @@ export struct Card6Component { | @@ -71,7 +61,6 @@ export struct Card6Component { | ||
| 71 | 61 | ||
| 72 | Text() | 62 | Text() |
| 73 | { | 63 | { |
| 74 | - | ||
| 75 | if (this.titleMarked) { | 64 | if (this.titleMarked) { |
| 76 | ForEach(this.textArr, (textItem: textItem) => { | 65 | ForEach(this.textArr, (textItem: textItem) => { |
| 77 | if (textItem.isRed) { | 66 | if (textItem.isRed) { |
| @@ -85,7 +74,6 @@ export struct Card6Component { | @@ -85,7 +74,6 @@ export struct Card6Component { | ||
| 85 | Span(this.contentDTO.newsTitle) | 74 | Span(this.contentDTO.newsTitle) |
| 86 | } | 75 | } |
| 87 | } | 76 | } |
| 88 | - | ||
| 89 | .fontColor(this.clicked ? 0x848484 : 0x222222) | 77 | .fontColor(this.clicked ? 0x848484 : 0x222222) |
| 90 | .fontSize(18) | 78 | .fontSize(18) |
| 91 | .lineHeight(27) | 79 | .lineHeight(27) |
| @@ -97,9 +85,9 @@ export struct Card6Component { | @@ -97,9 +85,9 @@ export struct Card6Component { | ||
| 97 | (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? (12 + (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) * 11) : | 85 | (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? (12 + (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) * 11) : |
| 98 | ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 : | 86 | ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 : |
| 99 | 0 ) | 87 | 0 ) |
| 100 | - }.alignContent(Alignment.TopStart) | ||
| 101 | - | ||
| 102 | - | 88 | + .width('100%') |
| 89 | + } | ||
| 90 | + .alignContent(Alignment.TopStart) | ||
| 103 | } | 91 | } |
| 104 | .justifyContent(FlexAlign.Start) | 92 | .justifyContent(FlexAlign.Start) |
| 105 | Blank() | 93 | Blank() |
| @@ -227,10 +227,6 @@ struct CarouselLayout01CardView { | @@ -227,10 +227,6 @@ struct CarouselLayout01CardView { | ||
| 227 | Notes({ newTags: this.item.newTags }) | 227 | Notes({ newTags: this.item.newTags }) |
| 228 | } | 228 | } |
| 229 | } | 229 | } |
| 230 | - // if (this.item.objectType == '5' || this.item.objectType == '6') { | ||
| 231 | - // Notes({ objectType: this.item.objectType }) | ||
| 232 | - // } | ||
| 233 | - //Text(`${this.item.corner}${this.item.newsTitle}`) | ||
| 234 | Text(`${this.item.newsTitle}`) | 230 | Text(`${this.item.newsTitle}`) |
| 235 | .width(CommonConstants.FULL_PARENT) | 231 | .width(CommonConstants.FULL_PARENT) |
| 236 | .fontColor(Color.White) | 232 | .fontColor(Color.White) |
| @@ -4,6 +4,8 @@ import { SPHelper, StringUtils, UserDataLocal } from 'wdKit' | @@ -4,6 +4,8 @@ import { SPHelper, StringUtils, UserDataLocal } from 'wdKit' | ||
| 4 | import { WDRouterPage, WDRouterRule } from 'wdRouter' | 4 | import { WDRouterPage, WDRouterRule } from 'wdRouter' |
| 5 | import { TrackingButton, TrackConstants } from 'wdTracking/Index' | 5 | import { TrackingButton, TrackConstants } from 'wdTracking/Index' |
| 6 | import MinePageDatasModel from '../../model/MinePageDatasModel' | 6 | import MinePageDatasModel from '../../model/MinePageDatasModel' |
| 7 | +import { ColorUtils } from '../../utils/ColorUtils' | ||
| 8 | + | ||
| 7 | const TAG = "MinePageUserSimpleInfoUI" | 9 | const TAG = "MinePageUserSimpleInfoUI" |
| 8 | 10 | ||
| 9 | 11 | ||
| @@ -74,7 +76,7 @@ export default struct MinePageUserSimpleInfoUI { | @@ -74,7 +76,7 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 74 | Image($r('app.media.mine_user_edit')) | 76 | Image($r('app.media.mine_user_edit')) |
| 75 | .width(`${this.calcHeight(27)}lpx`) | 77 | .width(`${this.calcHeight(27)}lpx`) |
| 76 | .height(`${this.calcHeight(27)}lpx`) | 78 | .height(`${this.calcHeight(27)}lpx`) |
| 77 | - .colorBlend(this.navItem?.homePageColor.length > 0?this.navItem?.homePageColor:null) | 79 | + .colorFilter(ColorUtils.getDrawingColorFilter(this.navItem?.homePageColor.length > 0?this.navItem?.homePageColor:'')) |
| 78 | .margin({left:`${this.calcHeight(15)}lpx`}) | 80 | .margin({left:`${this.calcHeight(15)}lpx`}) |
| 79 | .objectFit(ImageFit.Cover) | 81 | .objectFit(ImageFit.Cover) |
| 80 | Blank() | 82 | Blank() |
| @@ -96,10 +98,10 @@ export default struct MinePageUserSimpleInfoUI { | @@ -96,10 +98,10 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 96 | .fontSize(`${this.calcHeight(19)}lpx`) | 98 | .fontSize(`${this.calcHeight(19)}lpx`) |
| 97 | .width(this.levelId>9?`${this.calcHeight(69)}lpx`:`${this.calcHeight(50)}lpx`) | 99 | .width(this.levelId>9?`${this.calcHeight(69)}lpx`:`${this.calcHeight(50)}lpx`) |
| 98 | .height(`${this.calcHeight(29)}lpx`) | 100 | .height(`${this.calcHeight(29)}lpx`) |
| 99 | - }.margin({top:'`${this.calcHeight(15)}lpx`'}) | 101 | + }.margin({top:`${this.calcHeight(15)}lpx`}) |
| 100 | } | 102 | } |
| 101 | }.alignItems(HorizontalAlign.Start) | 103 | }.alignItems(HorizontalAlign.Start) |
| 102 | - .margin({top:`${this.calcHeight(12)}lpx`,left:`${this.calcHeight(4)}lpx`}) | 104 | + .margin({top:`${this.calcHeight(5)}lpx`,left:`${this.calcHeight(4)}lpx`}) |
| 103 | .width(`${this.calcHeight(352)}lpx`) | 105 | .width(`${this.calcHeight(352)}lpx`) |
| 104 | }else{ | 106 | }else{ |
| 105 | Row(){ | 107 | Row(){ |
| 1 | import { BottomNavDTO } from 'wdBean/Index' | 1 | import { BottomNavDTO } from 'wdBean/Index' |
| 2 | +import { ColorUtils } from '../../utils/ColorUtils' | ||
| 2 | import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem' | 3 | import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem' |
| 3 | 4 | ||
| 4 | @Component | 5 | @Component |
| @@ -12,7 +13,7 @@ export struct PagePersonFunction{ | @@ -12,7 +13,7 @@ export struct PagePersonFunction{ | ||
| 12 | Column(){ | 13 | Column(){ |
| 13 | Stack({ alignContent: Alignment.TopEnd }){ | 14 | Stack({ alignContent: Alignment.TopEnd }){ |
| 14 | Image(this.item.imgSrc) | 15 | Image(this.item.imgSrc) |
| 15 | - .colorBlend(this.navItem?.homePageColor.length > 0?this.navItem.homePageColor:null) | 16 | + .colorFilter(ColorUtils.getDrawingColorFilter(this.navItem?.homePageColor.length > 0?this.navItem?.homePageColor:'')) |
| 16 | .objectFit(ImageFit.Auto) | 17 | .objectFit(ImageFit.Auto) |
| 17 | .interpolation(ImageInterpolation.High) | 18 | .interpolation(ImageInterpolation.High) |
| 18 | if (this.item.isShowRedPoint) { | 19 | if (this.item.isShowRedPoint) { |
| @@ -5,7 +5,7 @@ import MinePageDatasModel from '../../model/MinePageDatasModel' | @@ -5,7 +5,7 @@ import MinePageDatasModel from '../../model/MinePageDatasModel' | ||
| 5 | import MinePageUserSimpleInfoUI from '../mine/MinePageUserSimpleInfoUI' | 5 | import MinePageUserSimpleInfoUI from '../mine/MinePageUserSimpleInfoUI' |
| 6 | import MinePagePersonFunctionUI from '../mine/MinePagePersonFunctionUI' | 6 | import MinePagePersonFunctionUI from '../mine/MinePagePersonFunctionUI' |
| 7 | import MinePageMoreFunctionUI from '../mine/MinePageMoreFunctionUI' | 7 | import MinePageMoreFunctionUI from '../mine/MinePageMoreFunctionUI' |
| 8 | -import { BreakpointSystem, DateTimeUtils, SPHelper, StringUtils } from 'wdKit' | 8 | +import { BreakpointSystem, DateTimeUtils, SPHelper, StringUtils, WindowModel } from 'wdKit' |
| 9 | import { SpConstants } from 'wdConstant' | 9 | import { SpConstants } from 'wdConstant' |
| 10 | import dataPreferences from '@ohos.data.preferences'; | 10 | import dataPreferences from '@ohos.data.preferences'; |
| 11 | import { MergeRecordDialog } from '../../dialog/MergeRecordDialog' | 11 | import { MergeRecordDialog } from '../../dialog/MergeRecordDialog' |
| @@ -92,7 +92,30 @@ export struct MinePageComponent { | @@ -92,7 +92,30 @@ export struct MinePageComponent { | ||
| 92 | 92 | ||
| 93 | this.pageShowTime = DateTimeUtils.getTimeStamp() | 93 | this.pageShowTime = DateTimeUtils.getTimeStamp() |
| 94 | } | 94 | } |
| 95 | + | ||
| 96 | + this.changeTopStatusBarColor(this.navItem.statusBarColor) | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + /** | ||
| 100 | + * 修改手机顶部状态栏颜色 | ||
| 101 | + * @param statusValue | ||
| 102 | + */ | ||
| 103 | + changeTopStatusBarColor(statusValue: number) { | ||
| 104 | + if (statusValue === 0) {//白色状态栏 | ||
| 105 | + WindowModel.shared.setWindowSystemBarProperties({ | ||
| 106 | + statusBarContentColor: '#ffffff', | ||
| 107 | + }) | ||
| 108 | + } else if (statusValue === 1) { // 黑色状态栏 | ||
| 109 | + WindowModel.shared.setWindowSystemBarProperties({ | ||
| 110 | + statusBarContentColor: '#000000', | ||
| 111 | + }) | ||
| 112 | + }else { | ||
| 113 | + WindowModel.shared.setWindowSystemBarProperties({ | ||
| 114 | + statusBarContentColor: '#000000', | ||
| 115 | + }) | ||
| 95 | } | 116 | } |
| 117 | + } | ||
| 118 | + | ||
| 96 | pageHideForUpdateData(){ | 119 | pageHideForUpdateData(){ |
| 97 | if(this.isMinePage){ | 120 | if(this.isMinePage){ |
| 98 | this.pageHideTime = DateTimeUtils.getTimeStamp() | 121 | this.pageHideTime = DateTimeUtils.getTimeStamp() |
| @@ -115,6 +138,8 @@ export struct MinePageComponent { | @@ -115,6 +138,8 @@ export struct MinePageComponent { | ||
| 115 | this.addLoginStatusObserver() | 138 | this.addLoginStatusObserver() |
| 116 | console.log(TAG,"currentBreakpoint==>"+this.currentBreakpoint) | 139 | console.log(TAG,"currentBreakpoint==>"+this.currentBreakpoint) |
| 117 | this.currentChanged() | 140 | this.currentChanged() |
| 141 | + | ||
| 142 | + this.changeTopStatusBarColor(this.navItem.statusBarColor) | ||
| 118 | } | 143 | } |
| 119 | 144 | ||
| 120 | getMessageData(){ | 145 | getMessageData(){ |
| @@ -160,13 +160,13 @@ export struct PlayUIComponent { | @@ -160,13 +160,13 @@ export struct PlayUIComponent { | ||
| 160 | rmhInfo: this.contentDetailData.rmhInfo | 160 | rmhInfo: this.contentDetailData.rmhInfo |
| 161 | }) | 161 | }) |
| 162 | .margin({ | 162 | .margin({ |
| 163 | - top:-7, | 163 | + // top:-7, |
| 164 | right: 10 | 164 | right: 10 |
| 165 | }) | 165 | }) |
| 166 | } | 166 | } |
| 167 | //第二行右边直播状态参与人数 | 167 | //第二行右边直播状态参与人数 |
| 168 | this.getLiveStatusView() | 168 | this.getLiveStatusView() |
| 169 | - } | 169 | + }.margin({top:-7}) |
| 170 | } | 170 | } |
| 171 | .width('100%') | 171 | .width('100%') |
| 172 | // .width(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? 'calc(100% - 80vp)' : 'calc(100% - 32vp)') | 172 | // .width(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? 'calc(100% - 80vp)' : 'calc(100% - 32vp)') |
-
Please register or login to post a comment