Showing
23 changed files
with
365 additions
and
313 deletions
| 1 | import { CompStyle } from 'wdConstant'; | 1 | import { CompStyle } from 'wdConstant'; |
| 2 | import { CompDTO, ContentDTO } from 'wdBean'; | 2 | import { CompDTO, ContentDTO } from 'wdBean'; |
| 3 | import { Card2Component } from './cardview/Card2Component'; | 3 | import { Card2Component } from './cardview/Card2Component'; |
| 4 | -import { Card3Component } from './cardview/Card3Component'; | 4 | +// import { Card3Component } from './cardview/Card3Component'; |
| 5 | import { Card4Component } from './cardview/Card4Component'; | 5 | import { Card4Component } from './cardview/Card4Component'; |
| 6 | import { Card5Component } from './cardview/Card5Component'; | 6 | import { Card5Component } from './cardview/Card5Component'; |
| 7 | import { Card6Component } from './cardview/Card6Component'; | 7 | import { Card6Component } from './cardview/Card6Component'; |
| @@ -60,8 +60,6 @@ export struct CardParser { | @@ -60,8 +60,6 @@ export struct CardParser { | ||
| 60 | } else { | 60 | } else { |
| 61 | if (contentDTO.appStyle === CompStyle.Card_02) { | 61 | if (contentDTO.appStyle === CompStyle.Card_02) { |
| 62 | Card2Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) | 62 | Card2Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) |
| 63 | - } else if (contentDTO.appStyle === CompStyle.Card_03) { | ||
| 64 | - Card3Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) | ||
| 65 | } else if (contentDTO.appStyle === CompStyle.Card_04) { | 63 | } else if (contentDTO.appStyle === CompStyle.Card_04) { |
| 66 | Card4Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) | 64 | Card4Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) |
| 67 | } else if (contentDTO.appStyle === CompStyle.Card_05) { | 65 | } else if (contentDTO.appStyle === CompStyle.Card_05) { |
| @@ -4,6 +4,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | @@ -4,6 +4,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | ||
| 4 | import PageModel from '../viewmodel/PageModel'; | 4 | import PageModel from '../viewmodel/PageModel'; |
| 5 | import { CardParser } from './CardParser'; | 5 | import { CardParser } from './CardParser'; |
| 6 | import { Card2Component } from './cardview/Card2Component'; | 6 | import { Card2Component } from './cardview/Card2Component'; |
| 7 | +import { Card3Component } from './cardview/Card3Component'; | ||
| 7 | import { Card9Component } from './cardview/Card9Component'; | 8 | import { Card9Component } from './cardview/Card9Component'; |
| 8 | import { Card6Component } from './cardview/Card6Component'; | 9 | import { Card6Component } from './cardview/Card6Component'; |
| 9 | import { Card5Component } from './cardview/Card5Component'; | 10 | import { Card5Component } from './cardview/Card5Component'; |
| @@ -72,7 +73,7 @@ export struct CompParser { | @@ -72,7 +73,7 @@ export struct CompParser { | ||
| 72 | 73 | ||
| 73 | build() { | 74 | build() { |
| 74 | Column() { | 75 | Column() { |
| 75 | - // Text(JSON.stringify(this.compDTO.compStyle)) | 76 | + //Text(JSON.stringify(this.compDTO.compStyle)) |
| 76 | this.componentBuilder(); | 77 | this.componentBuilder(); |
| 77 | } | 78 | } |
| 78 | } | 79 | } |
| @@ -142,11 +143,13 @@ export struct CompParser { | @@ -142,11 +143,13 @@ export struct CompParser { | ||
| 142 | //时间链卡 | 143 | //时间链卡 |
| 143 | Card9Component({ compDTO: this.compDTO, contentDTO:this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) | 144 | Card9Component({ compDTO: this.compDTO, contentDTO:this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) |
| 144 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 145 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 145 | - } else if(this.compDTO.compStyle === CompStyle | ||
| 146 | - .Card_13){ | 146 | + } else if(this.compDTO.compStyle === CompStyle.Card_13){ |
| 147 | Card6Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) | 147 | Card6Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) |
| 148 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 148 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 149 | - } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) { | 149 | + } else if(this.compDTO.compStyle === CompStyle.Card_03){ |
| 150 | + Card3Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) | ||
| 151 | + Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | ||
| 152 | + }else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) { | ||
| 150 | ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 153 | ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 151 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 154 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 152 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { | 155 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { |
| @@ -63,7 +63,6 @@ export struct AppointmentListUI { | @@ -63,7 +63,6 @@ export struct AppointmentListUI { | ||
| 63 | .width("100%") | 63 | .width("100%") |
| 64 | .height("100%") | 64 | .height("100%") |
| 65 | .backgroundColor($r('app.color.color_F9F9F9')) | 65 | .backgroundColor($r('app.color.color_F9F9F9')) |
| 66 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 67 | CustomPullToRefresh({ | 66 | CustomPullToRefresh({ |
| 68 | alldata:this.data, | 67 | alldata:this.data, |
| 69 | scroller:this.scroller, | 68 | scroller:this.scroller, |
| @@ -120,12 +120,11 @@ export struct FollowFirstTabsComponent{ | @@ -120,12 +120,11 @@ export struct FollowFirstTabsComponent{ | ||
| 120 | this.listScroller.scrollToIndex(index, true, ScrollAlign.CENTER) | 120 | this.listScroller.scrollToIndex(index, true, ScrollAlign.CENTER) |
| 121 | }) | 121 | }) |
| 122 | .width('100%') | 122 | .width('100%') |
| 123 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 124 | .layoutWeight(1) | 123 | .layoutWeight(1) |
| 125 | .loop(false) | 124 | .loop(false) |
| 126 | .indicator(false) | 125 | .indicator(false) |
| 127 | .effectMode(EdgeEffect.None) | 126 | .effectMode(EdgeEffect.None) |
| 128 | - }.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | 127 | + } |
| 129 | } | 128 | } |
| 130 | }.width('100%') | 129 | }.width('100%') |
| 131 | .height("100%") | 130 | .height("100%") |
| @@ -101,7 +101,6 @@ export struct FollowListDetailUI { | @@ -101,7 +101,6 @@ export struct FollowListDetailUI { | ||
| 101 | .margin({bottom:"40lpx"}) | 101 | .margin({bottom:"40lpx"}) |
| 102 | } | 102 | } |
| 103 | } | 103 | } |
| 104 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 105 | .edgeEffect(EdgeEffect.None) | 104 | .edgeEffect(EdgeEffect.None) |
| 106 | .cachedCount(5) | 105 | .cachedCount(5) |
| 107 | .padding({ left: '31lpx', right: '31lpx' }) | 106 | .padding({ left: '31lpx', right: '31lpx' }) |
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowSecondTabsComponent.ets
| @@ -27,7 +27,6 @@ export struct FollowSecondTabsComponent{ | @@ -27,7 +27,6 @@ export struct FollowSecondTabsComponent{ | ||
| 27 | .width("100%") | 27 | .width("100%") |
| 28 | .height("100%") | 28 | .height("100%") |
| 29 | .backgroundColor($r('app.color.color_transparent')) | 29 | .backgroundColor($r('app.color.color_transparent')) |
| 30 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 31 | 30 | ||
| 32 | FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].id,type:1}) | 31 | FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].id,type:1}) |
| 33 | .height("100%") | 32 | .height("100%") |
| @@ -40,7 +39,6 @@ export struct FollowSecondTabsComponent{ | @@ -40,7 +39,6 @@ export struct FollowSecondTabsComponent{ | ||
| 40 | .width("100%") | 39 | .width("100%") |
| 41 | .height("100%") | 40 | .height("100%") |
| 42 | .backgroundColor($r('app.color.color_transparent')) | 41 | .backgroundColor($r('app.color.color_transparent')) |
| 43 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 44 | 42 | ||
| 45 | this.FollowSecondUI() | 43 | this.FollowSecondUI() |
| 46 | }.width("100%") | 44 | }.width("100%") |
| @@ -50,7 +48,6 @@ export struct FollowSecondTabsComponent{ | @@ -50,7 +48,6 @@ export struct FollowSecondTabsComponent{ | ||
| 50 | } | 48 | } |
| 51 | .width('100%') | 49 | .width('100%') |
| 52 | .layoutWeight(1) | 50 | .layoutWeight(1) |
| 53 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 54 | } | 51 | } |
| 55 | 52 | ||
| 56 | @Builder FollowSecondUI(){ | 53 | @Builder FollowSecondUI(){ |
| @@ -89,7 +86,6 @@ export struct FollowSecondTabsComponent{ | @@ -89,7 +86,6 @@ export struct FollowSecondTabsComponent{ | ||
| 89 | .effectMode(EdgeEffect.None) | 86 | .effectMode(EdgeEffect.None) |
| 90 | .height('100%') | 87 | .height('100%') |
| 91 | .layoutWeight(1) | 88 | .layoutWeight(1) |
| 92 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 93 | }.width('100%') | 89 | }.width('100%') |
| 94 | } | 90 | } |
| 95 | 91 |
| @@ -122,7 +122,6 @@ export struct FollowThirdTabsComponent{ | @@ -122,7 +122,6 @@ export struct FollowThirdTabsComponent{ | ||
| 122 | }) | 122 | }) |
| 123 | .width('100%') | 123 | .width('100%') |
| 124 | .layoutWeight(1) | 124 | .layoutWeight(1) |
| 125 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 126 | } | 125 | } |
| 127 | } | 126 | } |
| 128 | 127 |
| 1 | -import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index' | 1 | +import { DateTimeUtils } from 'wdKit/Index' |
| 2 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' | 2 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' |
| 3 | import { Remark, WDMessageCenterMessageType } from '../../../model/InteractMessageModel' | 3 | import { Remark, WDMessageCenterMessageType } from '../../../model/InteractMessageModel' |
| 4 | import MinePageDatasModel from '../../../model/MinePageDatasModel' | 4 | import MinePageDatasModel from '../../../model/MinePageDatasModel' |
| @@ -7,7 +7,6 @@ import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh' | @@ -7,7 +7,6 @@ import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh' | ||
| 7 | import { CustomTitleUI } from '../../reusable/CustomTitleUI' | 7 | import { CustomTitleUI } from '../../reusable/CustomTitleUI' |
| 8 | import { MessageListItemUI } from './MessageListItemUI' | 8 | import { MessageListItemUI } from './MessageListItemUI' |
| 9 | import {TrackingButton,TrackConstants}from 'wdTracking/Index' | 9 | import {TrackingButton,TrackConstants}from 'wdTracking/Index' |
| 10 | -import TrackingPageBrowseUtils from '../../../utils/TrackingPageBrowseUtils' | ||
| 11 | 10 | ||
| 12 | const TAG = "MessageListUI" | 11 | const TAG = "MessageListUI" |
| 13 | 12 |
| @@ -57,33 +57,40 @@ export struct SubscribeMessageComponent{ | @@ -57,33 +57,40 @@ export struct SubscribeMessageComponent{ | ||
| 57 | } | 57 | } |
| 58 | } | 58 | } |
| 59 | } else { | 59 | } else { |
| 60 | - CustomPullToRefresh({ | ||
| 61 | - alldata:this.data, | ||
| 62 | - scroller:this.scroller, | ||
| 63 | - customList:()=>{ | ||
| 64 | - this.ListLayout() | ||
| 65 | - }, | ||
| 66 | - onRefresh:(resolve)=>{ | ||
| 67 | - this.curPageNum = 1; | ||
| 68 | - this.hasMore = true | ||
| 69 | - this.isGetRequest = false | ||
| 70 | - this.data.clear() | ||
| 71 | - if (!this.isLoading) { | ||
| 72 | - this.getNewPageData() | ||
| 73 | - } | ||
| 74 | - if(resolve) resolve('刷新成功') | ||
| 75 | - }, | ||
| 76 | - onLoadMore:(resolve)=> { | ||
| 77 | - if (!this.isLoading) { | ||
| 78 | - //加载分页数据 | ||
| 79 | - this.getNewPageData() | 60 | + Stack(){ |
| 61 | + Row() | ||
| 62 | + .width("100%") | ||
| 63 | + .height("100%") | ||
| 64 | + .backgroundColor($r('app.color.color_F9F9F9')) | ||
| 65 | + | ||
| 66 | + CustomPullToRefresh({ | ||
| 67 | + alldata:this.data, | ||
| 68 | + scroller:this.scroller, | ||
| 69 | + customList:()=>{ | ||
| 70 | + this.ListLayout() | ||
| 71 | + }, | ||
| 72 | + onRefresh:(resolve)=>{ | ||
| 73 | + this.curPageNum = 1; | ||
| 74 | + this.hasMore = true | ||
| 75 | + this.isGetRequest = false | ||
| 76 | + this.data.clear() | ||
| 77 | + if (!this.isLoading) { | ||
| 78 | + this.getNewPageData() | ||
| 79 | + } | ||
| 80 | + if(resolve) resolve('刷新成功') | ||
| 81 | + }, | ||
| 82 | + onLoadMore:(resolve)=> { | ||
| 83 | + if (!this.isLoading) { | ||
| 84 | + //加载分页数据 | ||
| 85 | + this.getNewPageData() | ||
| 86 | + } | ||
| 80 | } | 87 | } |
| 81 | - } | ||
| 82 | - }) | ||
| 83 | - .width('100%') | 88 | + }) |
| 89 | + .width('100%') | ||
| 90 | + } | ||
| 84 | } | 91 | } |
| 85 | } | 92 | } |
| 86 | - .backgroundColor($r('app.color.color_F9F9F9')) | 93 | + .backgroundColor($r('app.color.color_transparent')) |
| 87 | .height('100%') | 94 | .height('100%') |
| 88 | .width('100%') | 95 | .width('100%') |
| 89 | } | 96 | } |
| @@ -9,6 +9,9 @@ const TAG = "AppointmentListPage" | @@ -9,6 +9,9 @@ const TAG = "AppointmentListPage" | ||
| 9 | struct AppointmentListPage { | 9 | struct AppointmentListPage { |
| 10 | pageShowTime:number = 0; | 10 | pageShowTime:number = 0; |
| 11 | pageHideTime:number = 0; | 11 | pageHideTime:number = 0; |
| 12 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 13 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 14 | + | ||
| 12 | 15 | ||
| 13 | onPageShow() { | 16 | onPageShow() { |
| 14 | this.pageShowTime = DateTimeUtils.getTimeStamp() | 17 | this.pageShowTime = DateTimeUtils.getTimeStamp() |
| @@ -23,7 +26,12 @@ struct AppointmentListPage { | @@ -23,7 +26,12 @@ struct AppointmentListPage { | ||
| 23 | 26 | ||
| 24 | build() { | 27 | build() { |
| 25 | Column(){ | 28 | Column(){ |
| 26 | - AppointmentListUI() | ||
| 27 | - } | 29 | + Column(){ |
| 30 | + AppointmentListUI() | ||
| 31 | + } | ||
| 32 | + }.width("100%") | ||
| 33 | + .height("100%") | ||
| 34 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 35 | + | ||
| 28 | } | 36 | } |
| 29 | } | 37 | } |
| @@ -11,6 +11,8 @@ struct FollowListPage { | @@ -11,6 +11,8 @@ struct FollowListPage { | ||
| 11 | @State curIndex: string = '0'; | 11 | @State curIndex: string = '0'; |
| 12 | pageShowTime:number = 0; | 12 | pageShowTime:number = 0; |
| 13 | pageHideTime:number = 0; | 13 | pageHideTime:number = 0; |
| 14 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 15 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 14 | 16 | ||
| 15 | onPageShow() { | 17 | onPageShow() { |
| 16 | this.curIndex = this.params?.['index']; | 18 | this.curIndex = this.params?.['index']; |
| @@ -25,12 +27,16 @@ struct FollowListPage { | @@ -25,12 +27,16 @@ struct FollowListPage { | ||
| 25 | } | 27 | } |
| 26 | 28 | ||
| 27 | build() { | 29 | build() { |
| 28 | - Column() { | ||
| 29 | - //Tab 详情 | ||
| 30 | - FollowFirstTabsComponent({changeIndex:Number(this.curIndex)}) | ||
| 31 | - } | ||
| 32 | - .backgroundColor($r('app.color.white')) | ||
| 33 | - .height('100%') | ||
| 34 | - .width('100%') | 30 | + Column(){ |
| 31 | + Column() { | ||
| 32 | + //Tab 详情 | ||
| 33 | + FollowFirstTabsComponent({changeIndex:Number(this.curIndex)}) | ||
| 34 | + } | ||
| 35 | + .backgroundColor($r('app.color.white')) | ||
| 36 | + .height('100%') | ||
| 37 | + .width('100%') | ||
| 38 | + }.width("100%") | ||
| 39 | + .height("100%") | ||
| 40 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 35 | } | 41 | } |
| 36 | } | 42 | } |
| @@ -19,7 +19,6 @@ const TAG = 'MinePageComponent'; | @@ -19,7 +19,6 @@ const TAG = 'MinePageComponent'; | ||
| 19 | */ | 19 | */ |
| 20 | @Component | 20 | @Component |
| 21 | export struct MinePageComponent { | 21 | export struct MinePageComponent { |
| 22 | - private topRectHeight: string = AppStorage.get<number>('topSafeHeight') + 'px'; | ||
| 23 | //是否是创作者 | 22 | //是否是创作者 |
| 24 | @State isCreator:boolean = false | 23 | @State isCreator:boolean = false |
| 25 | @State isLogin:boolean = false //默认 false 测试放开 | 24 | @State isLogin:boolean = false //默认 false 测试放开 |
| @@ -63,6 +62,8 @@ export struct MinePageComponent { | @@ -63,6 +62,8 @@ export struct MinePageComponent { | ||
| 63 | @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm'; | 62 | @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm'; |
| 64 | private breakpointSystem = new BreakpointSystem(); | 63 | private breakpointSystem = new BreakpointSystem(); |
| 65 | @State percent:number = 1 | 64 | @State percent:number = 1 |
| 65 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 66 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 66 | 67 | ||
| 67 | currentChanged(){ | 68 | currentChanged(){ |
| 68 | if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){ | 69 | if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){ |
| @@ -154,22 +155,25 @@ export struct MinePageComponent { | @@ -154,22 +155,25 @@ export struct MinePageComponent { | ||
| 154 | } | 155 | } |
| 155 | 156 | ||
| 156 | build() { | 157 | build() { |
| 157 | - Scroll(this.scroller){ | ||
| 158 | - Stack(){ | ||
| 159 | - Image($r('app.media.mine_head_bg')) | ||
| 160 | - .width('100%') | ||
| 161 | - .height(`${657 * this.percent}lpx`) | ||
| 162 | - .objectFit(ImageFit.Auto) | ||
| 163 | - this.MinePageUI() | 158 | + Column(){ |
| 159 | + Scroll(this.scroller){ | ||
| 160 | + Stack(){ | ||
| 161 | + Image($r('app.media.mine_head_bg')) | ||
| 162 | + .width('100%') | ||
| 163 | + .height(`${657 * this.percent}lpx`) | ||
| 164 | + .objectFit(ImageFit.Auto) | ||
| 165 | + this.MinePageUI() | ||
| 166 | + } | ||
| 167 | + .alignContent(Alignment.Top) | ||
| 164 | } | 168 | } |
| 165 | - .alignContent(Alignment.Top) | ||
| 166 | - } | ||
| 167 | - .setFullWidthAndHeight() | ||
| 168 | - .backgroundColor($r('app.color.color_F9F9F9')) | ||
| 169 | - .scrollable(ScrollDirection.Vertical) | ||
| 170 | - .scrollBar(BarState.Off) | ||
| 171 | - // 预留状态栏、导航栏高度 | ||
| 172 | - .margin({ top: this.topRectHeight}) | 169 | + .setFullWidthAndHeight() |
| 170 | + .backgroundColor($r('app.color.color_F9F9F9')) | ||
| 171 | + .scrollable(ScrollDirection.Vertical) | ||
| 172 | + .scrollBar(BarState.Off) | ||
| 173 | + | ||
| 174 | + }.width("100%") | ||
| 175 | + .height("100%") | ||
| 176 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 173 | } | 177 | } |
| 174 | 178 | ||
| 175 | 179 |
| @@ -70,7 +70,6 @@ struct PeopleShipHomePage { | @@ -70,7 +70,6 @@ struct PeopleShipHomePage { | ||
| 70 | .objectRepeat(ImageRepeat.NoRepeat) | 70 | .objectRepeat(ImageRepeat.NoRepeat) |
| 71 | .backgroundColor(Color.White) | 71 | .backgroundColor(Color.White) |
| 72 | .visibility(this.isLoading ? Visibility.None : Visibility.Visible) | 72 | .visibility(this.isLoading ? Visibility.None : Visibility.Visible) |
| 73 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 74 | 73 | ||
| 75 | Row() | 74 | Row() |
| 76 | .height(px2vp(this.topSafeHeight)) | 75 | .height(px2vp(this.topSafeHeight)) |
| @@ -78,7 +77,6 @@ struct PeopleShipHomePage { | @@ -78,7 +77,6 @@ struct PeopleShipHomePage { | ||
| 78 | .backgroundColor($r('app.color.white')) | 77 | .backgroundColor($r('app.color.white')) |
| 79 | .visibility(this.topOpacity > 0 ? Visibility.Visible : Visibility.None) | 78 | .visibility(this.topOpacity > 0 ? Visibility.Visible : Visibility.None) |
| 80 | .opacity(this.topOpacity ) | 79 | .opacity(this.topOpacity ) |
| 81 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 82 | } | 80 | } |
| 83 | 81 | ||
| 84 | Column(){ | 82 | Column(){ |
| @@ -141,10 +139,10 @@ struct PeopleShipHomePage { | @@ -141,10 +139,10 @@ struct PeopleShipHomePage { | ||
| 141 | }) | 139 | }) |
| 142 | } | 140 | } |
| 143 | } | 141 | } |
| 144 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 145 | .alignItems(HorizontalAlign.Start) | 142 | .alignItems(HorizontalAlign.Start) |
| 146 | .justifyContent(FlexAlign.Start) | 143 | .justifyContent(FlexAlign.Start) |
| 147 | .width('100%') | 144 | .width('100%') |
| 145 | + .margin({top:px2vp(this.topSafeHeight)}) | ||
| 148 | } | 146 | } |
| 149 | .width('100%') | 147 | .width('100%') |
| 150 | }else{ | 148 | }else{ |
| @@ -165,7 +163,6 @@ struct PeopleShipHomePage { | @@ -165,7 +163,6 @@ struct PeopleShipHomePage { | ||
| 165 | } | 163 | } |
| 166 | 164 | ||
| 167 | aboutToAppear() { | 165 | aboutToAppear() { |
| 168 | - WindowModel.shared.setWindowLayoutFullScreen(false) | ||
| 169 | this.getData() | 166 | this.getData() |
| 170 | } | 167 | } |
| 171 | 168 |
| @@ -22,6 +22,8 @@ export struct PrivacySettingPage { | @@ -22,6 +22,8 @@ export struct PrivacySettingPage { | ||
| 22 | @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm'; | 22 | @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm'; |
| 23 | private breakpointSystem = new BreakpointSystem(); | 23 | private breakpointSystem = new BreakpointSystem(); |
| 24 | @State percent:number = 1 | 24 | @State percent:number = 1 |
| 25 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 26 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 25 | 27 | ||
| 26 | currentChanged(){ | 28 | currentChanged(){ |
| 27 | if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){ | 29 | if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){ |
| @@ -76,13 +78,17 @@ export struct PrivacySettingPage { | @@ -76,13 +78,17 @@ export struct PrivacySettingPage { | ||
| 76 | 78 | ||
| 77 | build() { | 79 | build() { |
| 78 | Column(){ | 80 | Column(){ |
| 79 | - TitleBackComponent({title:"隐私设置"}) | ||
| 80 | - | ||
| 81 | - //滑动区域 | ||
| 82 | - this.PrivacySettingComponentsUI() | ||
| 83 | - }.backgroundColor('#F8F8F8') | ||
| 84 | - .width("100%") | 81 | + Column(){ |
| 82 | + TitleBackComponent({title:"隐私设置"}) | ||
| 83 | + | ||
| 84 | + //滑动区域 | ||
| 85 | + this.PrivacySettingComponentsUI() | ||
| 86 | + }.backgroundColor('#F8F8F8') | ||
| 87 | + .width("100%") | ||
| 88 | + .height("100%") | ||
| 89 | + }.width("100%") | ||
| 85 | .height("100%") | 90 | .height("100%") |
| 91 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 86 | 92 | ||
| 87 | } | 93 | } |
| 88 | 94 |
| @@ -7,6 +7,8 @@ import { AboutPageUI } from '../setting/AboutPageUI'; | @@ -7,6 +7,8 @@ import { AboutPageUI } from '../setting/AboutPageUI'; | ||
| 7 | struct SettingAboutPage { | 7 | struct SettingAboutPage { |
| 8 | pageShowTime:number = 0; | 8 | pageShowTime:number = 0; |
| 9 | pageHideTime:number = 0; | 9 | pageHideTime:number = 0; |
| 10 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 11 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 10 | 12 | ||
| 11 | onPageShow() { | 13 | onPageShow() { |
| 12 | this.pageShowTime = DateTimeUtils.getTimeStamp() | 14 | this.pageShowTime = DateTimeUtils.getTimeStamp() |
| @@ -22,7 +24,12 @@ struct SettingAboutPage { | @@ -22,7 +24,12 @@ struct SettingAboutPage { | ||
| 22 | 24 | ||
| 23 | build() { | 25 | build() { |
| 24 | Column(){ | 26 | Column(){ |
| 25 | - AboutPageUI() | ||
| 26 | - }.backgroundColor($r('app.color.white')) | 27 | + Column(){ |
| 28 | + AboutPageUI() | ||
| 29 | + }.backgroundColor($r('app.color.white')) | ||
| 30 | + }.width("100%") | ||
| 31 | + .height("100%") | ||
| 32 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 33 | + | ||
| 27 | } | 34 | } |
| 28 | } | 35 | } |
| @@ -16,6 +16,8 @@ struct SettingPage { | @@ -16,6 +16,8 @@ struct SettingPage { | ||
| 16 | 16 | ||
| 17 | pageShowSettingTime:number = 0; | 17 | pageShowSettingTime:number = 0; |
| 18 | pageHideSettingTime:number = 0; | 18 | pageHideSettingTime:number = 0; |
| 19 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 20 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 19 | 21 | ||
| 20 | 22 | ||
| 21 | onPageShow() { | 23 | onPageShow() { |
| @@ -44,14 +46,19 @@ struct SettingPage { | @@ -44,14 +46,19 @@ struct SettingPage { | ||
| 44 | } | 46 | } |
| 45 | 47 | ||
| 46 | build() { | 48 | build() { |
| 47 | - Column() { | ||
| 48 | - if (this.pageType == 'mainSetting') { | ||
| 49 | - MineSettingComponent() | ||
| 50 | - } else { | ||
| 51 | - AccountAndSecurityLayout({enterActivityTime:this.enterActivityTime}) | ||
| 52 | - } | ||
| 53 | - }.setFullWidth() | ||
| 54 | - .backgroundColor($r("app.color.white")) | 49 | + Column(){ |
| 50 | + Column() { | ||
| 51 | + if (this.pageType == 'mainSetting') { | ||
| 52 | + MineSettingComponent() | ||
| 53 | + } else { | ||
| 54 | + AccountAndSecurityLayout({enterActivityTime:this.enterActivityTime}) | ||
| 55 | + } | ||
| 56 | + }.setFullWidth() | ||
| 57 | + .backgroundColor($r("app.color.white")) | ||
| 58 | + }.width("100%") | ||
| 59 | + .height("100%") | ||
| 60 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 61 | + | ||
| 55 | } | 62 | } |
| 56 | 63 | ||
| 57 | // 私有方法 | 64 | // 私有方法 |
| @@ -38,6 +38,7 @@ struct MineHomePage { | @@ -38,6 +38,7 @@ struct MineHomePage { | ||
| 38 | @State isCommentEnter:string = ""; | 38 | @State isCommentEnter:string = ""; |
| 39 | @State isConnectNetwork : boolean = NetworkUtil.isNetConnected() | 39 | @State isConnectNetwork : boolean = NetworkUtil.isNetConnected() |
| 40 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | 40 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 |
| 41 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 41 | pageShowTime:number = 0; | 42 | pageShowTime:number = 0; |
| 42 | pageHideTime:number = 0; | 43 | pageHideTime:number = 0; |
| 43 | 44 | ||
| @@ -62,248 +63,248 @@ struct MineHomePage { | @@ -62,248 +63,248 @@ struct MineHomePage { | ||
| 62 | } | 63 | } |
| 63 | 64 | ||
| 64 | build() { | 65 | build() { |
| 65 | - if(this.isConnectNetwork){ | ||
| 66 | - Stack({ alignContent: Alignment.Top }){ | 66 | + if(this.isConnectNetwork){ |
| 67 | Stack({ alignContent: Alignment.Top }){ | 67 | Stack({ alignContent: Alignment.Top }){ |
| 68 | - Image($r('app.media.title_bg')) | ||
| 69 | - .width('100%') | ||
| 70 | - .height('355lpx') | ||
| 71 | - .objectFit(ImageFit.Cover) | ||
| 72 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 73 | - | ||
| 74 | - Row() | ||
| 75 | - .height(px2vp(this.topSafeHeight)) | ||
| 76 | - .width("100%") | ||
| 77 | - .backgroundColor($r('app.color.white')) | ||
| 78 | - .visibility(this.tileOpacity > 0 ? 0 : 1) | ||
| 79 | - .opacity(this.tileOpacity ) | ||
| 80 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 81 | - } | ||
| 82 | - | ||
| 83 | - Column(){ | ||
| 84 | Stack({ alignContent: Alignment.Top }){ | 68 | Stack({ alignContent: Alignment.Top }){ |
| 85 | - this.MineHomeTitleTransparent() | ||
| 86 | - this.MineHomeTitleWhite() | 69 | + Image($r('app.media.title_bg')) |
| 70 | + .width('100%') | ||
| 71 | + .height('355lpx') | ||
| 72 | + .objectFit(ImageFit.Cover) | ||
| 73 | + | ||
| 74 | + Row() | ||
| 75 | + .height(px2vp(this.topSafeHeight)) | ||
| 76 | + .width("100%") | ||
| 77 | + .backgroundColor($r('app.color.white')) | ||
| 78 | + .visibility(this.tileOpacity > 0 ? 0 : 1) | ||
| 79 | + .opacity(this.tileOpacity ) | ||
| 87 | } | 80 | } |
| 88 | 81 | ||
| 89 | - Scroll(this.scroller) { | ||
| 90 | - Column() { | ||
| 91 | - //用户信息区域 | ||
| 92 | - Row() { | ||
| 93 | - Stack(){ | ||
| 94 | - Image(this.headPhotoUrl) | ||
| 95 | - .alt($r('app.media.default_head')) | ||
| 96 | - .width('115lpx') | ||
| 97 | - .height('115lpx') | ||
| 98 | - .objectFit(ImageFit.Auto) | ||
| 99 | - .clip(new Circle({ width: '115lpx', height: '115lpx' })) | ||
| 100 | - Image(this.levelHead) | ||
| 101 | - .width('165lpx') | ||
| 102 | - .height('165lpx') | ||
| 103 | - .objectFit(ImageFit.Auto) | ||
| 104 | - }.onClick(()=>{ | ||
| 105 | - let params = {'headPhotoUrl': this.headPhotoUrl} as Record<string, string>; | ||
| 106 | - WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params) | ||
| 107 | - }).width('165lpx') | ||
| 108 | - .height('165lpx') | 82 | + Column(){ |
| 83 | + Stack({ alignContent: Alignment.Top }){ | ||
| 84 | + this.MineHomeTitleTransparent() | ||
| 85 | + this.MineHomeTitleWhite() | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + Scroll(this.scroller) { | ||
| 89 | + Column() { | ||
| 90 | + //用户信息区域 | ||
| 91 | + Row() { | ||
| 92 | + Stack(){ | ||
| 93 | + Image(this.headPhotoUrl) | ||
| 94 | + .alt($r('app.media.default_head')) | ||
| 95 | + .width('115lpx') | ||
| 96 | + .height('115lpx') | ||
| 97 | + .objectFit(ImageFit.Auto) | ||
| 98 | + .clip(new Circle({ width: '115lpx', height: '115lpx' })) | ||
| 99 | + Image(this.levelHead) | ||
| 100 | + .width('165lpx') | ||
| 101 | + .height('165lpx') | ||
| 102 | + .objectFit(ImageFit.Auto) | ||
| 103 | + }.onClick(()=>{ | ||
| 104 | + let params = {'headPhotoUrl': this.headPhotoUrl} as Record<string, string>; | ||
| 105 | + WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params) | ||
| 106 | + }).width('165lpx') | ||
| 107 | + .height('165lpx') | ||
| 108 | + | ||
| 109 | + Column() { | ||
| 110 | + Row() { | ||
| 111 | + Text(`${this.userName}`) | ||
| 112 | + .fontColor($r('app.color.white')) | ||
| 113 | + .maxLines(1) | ||
| 114 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 115 | + .fontSize('38lpx') | ||
| 116 | + .lineHeight('50lpx') | ||
| 117 | + .fontWeight('500lpx') | ||
| 118 | + .onClick(()=>{ | ||
| 119 | + let params: editModelParams = { | ||
| 120 | + editContent: this.userName | ||
| 121 | + } | ||
| 122 | + WDRouterRule.jumpWithPage(WDRouterPage.editUserNikeNamePage,params) | ||
| 123 | + }) | ||
| 124 | + | ||
| 125 | + if(this.levelId>0){ | ||
| 126 | + Text(`等级${this.levelId}`) | ||
| 127 | + .fontColor($r('app.color.color_ED2800')) | ||
| 128 | + .fontSize('23lpx') | ||
| 129 | + .fontWeight(500) | ||
| 130 | + .margin({ left: '10lpx' }) | ||
| 131 | + .backgroundImage($r("app.media.my_grade_bg")) | ||
| 132 | + .backgroundImageSize(ImageSize.Cover) | ||
| 133 | + .padding({left:"17lpx",right:"8lpx"}) | ||
| 134 | + .height('35lpx') | ||
| 135 | + .borderRadius({topRight:2,bottomRight:2}) | ||
| 136 | + } | ||
| 137 | + | ||
| 138 | + Blank() | ||
| 139 | + }.width('507lpx') | ||
| 109 | 140 | ||
| 141 | + Row() { | ||
| 142 | + Row() { | ||
| 143 | + Text(`${this.browseNum}`) | ||
| 144 | + .textStyle() | ||
| 145 | + Text("阅读") | ||
| 146 | + .textStyle2() | ||
| 147 | + } | ||
| 148 | + .margin({ right: '15lpx' }) | ||
| 149 | + | ||
| 150 | + Divider() | ||
| 151 | + .height('19lpx') | ||
| 152 | + .width('2lpx') | ||
| 153 | + .color($r('app.color.white')) | ||
| 154 | + .vertical(true) | ||
| 155 | + .opacity(0.4) | ||
| 156 | + Row() { | ||
| 157 | + Text(`${this.commentNum}`) | ||
| 158 | + .textStyle() | ||
| 159 | + Text("评论") | ||
| 160 | + .textStyle2() | ||
| 161 | + }.margin({ right: '15lpx', left: '15lpx' }) | ||
| 162 | + | ||
| 163 | + Divider() | ||
| 164 | + .height('19lpx') | ||
| 165 | + .width('2lpx') | ||
| 166 | + .color($r('app.color.white')) | ||
| 167 | + .vertical(true) | ||
| 168 | + .opacity(0.4) | ||
| 169 | + Row() { | ||
| 170 | + Text(`${this.attentionNum}`) | ||
| 171 | + .textStyle() | ||
| 172 | + Text("关注") | ||
| 173 | + .textStyle2() | ||
| 174 | + }.margin({ left: '15lpx' }) | ||
| 175 | + }.margin({ top: '23lpx' }) | ||
| 176 | + }.alignItems(HorizontalAlign.Start) | ||
| 177 | + .margin({ left: StringUtils.isEmpty(this.levelHead)?'32lpx':"3lpx" }) | ||
| 178 | + } | ||
| 179 | + .onAreaChange((oldValue: Area, newValue: Area) => { | ||
| 180 | + if (this.firstPositionY === 0) { | ||
| 181 | + this.firstPositionY = newValue.globalPosition.y as number | ||
| 182 | + }else{ | ||
| 183 | + let persent = (this.firstPositionY - Number(newValue.globalPosition.y)) / (this.firstPositionY * 0.3) | ||
| 184 | + if(persent > 1){ | ||
| 185 | + persent = 1 | ||
| 186 | + } | ||
| 187 | + this.tileOpacity = persent | ||
| 188 | + } | ||
| 189 | + }) | ||
| 190 | + .backgroundColor($r('app.color.color_transparent')) | ||
| 191 | + .height('184lpx') | ||
| 192 | + .width('100%') | ||
| 193 | + .padding({ left: '6lpx' }) | ||
| 194 | + | ||
| 195 | + | ||
| 196 | + //用户简介区域 | ||
| 110 | Column() { | 197 | Column() { |
| 111 | Row() { | 198 | Row() { |
| 112 | - Text(`${this.userName}`) | ||
| 113 | - .fontColor($r('app.color.white')) | ||
| 114 | - .maxLines(1) | 199 | + Text(this.isHasIntroduction?"简介:"+this.desc:this.desc) |
| 200 | + .fontSize('27lpx') | ||
| 201 | + .maxLines(3) | ||
| 115 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 202 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 116 | - .fontSize('38lpx') | ||
| 117 | - .lineHeight('50lpx') | ||
| 118 | - .fontWeight('500lpx') | 203 | + .lineHeight('40lpx') |
| 204 | + .fontWeight('400lpx') | ||
| 205 | + .fontColor(this.isHasIntroduction?$r('app.color.color_222222'):$r('app.color.color_999999')) | ||
| 206 | + .textAlign(TextAlign.Start) | ||
| 119 | .onClick(()=>{ | 207 | .onClick(()=>{ |
| 120 | let params: editModelParams = { | 208 | let params: editModelParams = { |
| 121 | - editContent: this.userName | 209 | + editContent: this.isHasIntroduction?this.desc:'' |
| 122 | } | 210 | } |
| 123 | - WDRouterRule.jumpWithPage(WDRouterPage.editUserNikeNamePage,params) | 211 | + WDRouterRule.jumpWithPage(WDRouterPage.editUserIntroductionPage,params) |
| 124 | }) | 212 | }) |
| 125 | - | ||
| 126 | - if(this.levelId>0){ | ||
| 127 | - Text(`等级${this.levelId}`) | ||
| 128 | - .fontColor($r('app.color.color_ED2800')) | ||
| 129 | - .fontSize('23lpx') | ||
| 130 | - .fontWeight(500) | ||
| 131 | - .margin({ left: '10lpx' }) | ||
| 132 | - .backgroundImage($r("app.media.my_grade_bg")) | ||
| 133 | - .backgroundImageSize(ImageSize.Cover) | ||
| 134 | - .padding({left:"17lpx",right:"8lpx"}) | ||
| 135 | - .height('35lpx') | ||
| 136 | - .borderRadius({topRight:2,bottomRight:2}) | ||
| 137 | - } | ||
| 138 | - | ||
| 139 | - Blank() | ||
| 140 | - }.width('507lpx') | ||
| 141 | - | ||
| 142 | - Row() { | ||
| 143 | - Row() { | ||
| 144 | - Text(`${this.browseNum}`) | ||
| 145 | - .textStyle() | ||
| 146 | - Text("阅读") | ||
| 147 | - .textStyle2() | 213 | + if(!this.isHasIntroduction){ |
| 214 | + Image($r('app.media.user_info_edit_icon')) | ||
| 215 | + .width('27lpx') | ||
| 216 | + .height('27lpx') | ||
| 217 | + .interpolation(ImageInterpolation.High) | ||
| 218 | + .objectFit(ImageFit.Auto) | ||
| 148 | } | 219 | } |
| 149 | - .margin({ right: '15lpx' }) | ||
| 150 | - | ||
| 151 | - Divider() | ||
| 152 | - .height('19lpx') | ||
| 153 | - .width('2lpx') | ||
| 154 | - .color($r('app.color.white')) | ||
| 155 | - .vertical(true) | ||
| 156 | - .opacity(0.4) | ||
| 157 | - Row() { | ||
| 158 | - Text(`${this.commentNum}`) | ||
| 159 | - .textStyle() | ||
| 160 | - Text("评论") | ||
| 161 | - .textStyle2() | ||
| 162 | - }.margin({ right: '15lpx', left: '15lpx' }) | ||
| 163 | - | ||
| 164 | - Divider() | ||
| 165 | - .height('19lpx') | ||
| 166 | - .width('2lpx') | ||
| 167 | - .color($r('app.color.white')) | ||
| 168 | - .vertical(true) | ||
| 169 | - .opacity(0.4) | ||
| 170 | - Row() { | ||
| 171 | - Text(`${this.attentionNum}`) | ||
| 172 | - .textStyle() | ||
| 173 | - Text("关注") | ||
| 174 | - .textStyle2() | ||
| 175 | - }.margin({ left: '15lpx' }) | ||
| 176 | - }.margin({ top: '23lpx' }) | ||
| 177 | - }.alignItems(HorizontalAlign.Start) | ||
| 178 | - .margin({ left: StringUtils.isEmpty(this.levelHead)?'32lpx':"3lpx" }) | ||
| 179 | - } | ||
| 180 | - .onAreaChange((oldValue: Area, newValue: Area) => { | ||
| 181 | - if (this.firstPositionY === 0) { | ||
| 182 | - this.firstPositionY = newValue.globalPosition.y as number | ||
| 183 | - }else{ | ||
| 184 | - let persent = (this.firstPositionY - Number(newValue.globalPosition.y)) / (this.firstPositionY * 0.3) | ||
| 185 | - if(persent > 1){ | ||
| 186 | - persent = 1 | ||
| 187 | } | 220 | } |
| 188 | - this.tileOpacity = persent | ||
| 189 | - } | ||
| 190 | - }) | ||
| 191 | - .backgroundColor($r('app.color.color_transparent')) | ||
| 192 | - .height('184lpx') | ||
| 193 | - .width('100%') | ||
| 194 | - .padding({ left: '6lpx' }) | ||
| 195 | 221 | ||
| 196 | 222 | ||
| 197 | - //用户简介区域 | ||
| 198 | - Column() { | ||
| 199 | - Row() { | ||
| 200 | - Text(this.isHasIntroduction?"简介:"+this.desc:this.desc) | ||
| 201 | - .fontSize('27lpx') | ||
| 202 | - .maxLines(3) | ||
| 203 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 204 | - .lineHeight('40lpx') | 223 | + Text(`来到人民日报${this.registerTimeForDay}天`) |
| 224 | + .fontSize('23lpx') | ||
| 225 | + .lineHeight('25lpx') | ||
| 205 | .fontWeight('400lpx') | 226 | .fontWeight('400lpx') |
| 206 | - .fontColor(this.isHasIntroduction?$r('app.color.color_222222'):$r('app.color.color_999999')) | 227 | + .fontColor($r('app.color.color_999999')) |
| 207 | .textAlign(TextAlign.Start) | 228 | .textAlign(TextAlign.Start) |
| 208 | - .onClick(()=>{ | ||
| 209 | - let params: editModelParams = { | ||
| 210 | - editContent: this.isHasIntroduction?this.desc:'' | ||
| 211 | - } | ||
| 212 | - WDRouterRule.jumpWithPage(WDRouterPage.editUserIntroductionPage,params) | ||
| 213 | - }) | ||
| 214 | - if(!this.isHasIntroduction){ | ||
| 215 | - Image($r('app.media.user_info_edit_icon')) | ||
| 216 | - .width('27lpx') | ||
| 217 | - .height('27lpx') | ||
| 218 | - .interpolation(ImageInterpolation.High) | ||
| 219 | - .objectFit(ImageFit.Auto) | ||
| 220 | - } | ||
| 221 | - } | 229 | + .margin({ top: '15lpx' }) |
| 222 | 230 | ||
| 231 | + }.padding({ left: '31lpx',right:'31lpx',top:'19lpx',bottom:'31lpx'}) | ||
| 232 | + .alignItems(HorizontalAlign.Start) | ||
| 233 | + .justifyContent(FlexAlign.Center) | ||
| 234 | + .width('100%') | ||
| 235 | + .backgroundColor($r('app.color.white')) | ||
| 236 | + //间隔符 | ||
| 223 | 237 | ||
| 224 | - Text(`来到人民日报${this.registerTimeForDay}天`) | ||
| 225 | - .fontSize('23lpx') | ||
| 226 | - .lineHeight('25lpx') | ||
| 227 | - .fontWeight('400lpx') | ||
| 228 | - .fontColor($r('app.color.color_999999')) | ||
| 229 | - .textAlign(TextAlign.Start) | ||
| 230 | - .margin({ top: '15lpx' }) | ||
| 231 | - | ||
| 232 | - }.padding({ left: '31lpx',right:'31lpx',top:'19lpx',bottom:'31lpx'}) | ||
| 233 | - .alignItems(HorizontalAlign.Start) | ||
| 234 | - .justifyContent(FlexAlign.Center) | ||
| 235 | - .width('100%') | ||
| 236 | - .backgroundColor($r('app.color.white')) | ||
| 237 | - //间隔符 | ||
| 238 | - | ||
| 239 | - Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx') | 238 | + Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx') |
| 240 | 239 | ||
| 241 | - //tab 页面 | ||
| 242 | - Stack({ alignContent: Alignment.Top }){ | ||
| 243 | - Tabs({controller: this.controller}) { | ||
| 244 | - TabContent() { | ||
| 245 | - HomePageBottomCommentComponent({commentNum:$commentNum}) | ||
| 246 | - } | ||
| 247 | - TabContent() { | ||
| 248 | - HomePageBottomFollowComponent() | 240 | + //tab 页面 |
| 241 | + Stack({ alignContent: Alignment.Top }){ | ||
| 242 | + Tabs({controller: this.controller}) { | ||
| 243 | + TabContent() { | ||
| 244 | + HomePageBottomCommentComponent({commentNum:$commentNum}) | ||
| 245 | + } | ||
| 246 | + TabContent() { | ||
| 247 | + HomePageBottomFollowComponent() | ||
| 248 | + } | ||
| 249 | } | 249 | } |
| 250 | - } | ||
| 251 | - .backgroundColor($r('app.color.white')) | ||
| 252 | - .animationDuration(0) | ||
| 253 | - .onChange((index: number) => { | ||
| 254 | - this.currentIndex = index | ||
| 255 | - trackTabFirstClick(index === 0 ? "评论":"关注") | ||
| 256 | - }) | ||
| 257 | - .vertical(false) | ||
| 258 | - .barHeight("77lpx") | ||
| 259 | - | ||
| 260 | - Column() { | ||
| 261 | - // 页签 | ||
| 262 | - Row({ space: 7 }) { | ||
| 263 | - Scroll() { | ||
| 264 | - Row() { | ||
| 265 | - this.TabBuilder(0,"评论") | ||
| 266 | - this.TabBuilder(1,"关注") | 250 | + .backgroundColor($r('app.color.white')) |
| 251 | + .animationDuration(0) | ||
| 252 | + .onChange((index: number) => { | ||
| 253 | + this.currentIndex = index | ||
| 254 | + trackTabFirstClick(index === 0 ? "评论":"关注") | ||
| 255 | + }) | ||
| 256 | + .vertical(false) | ||
| 257 | + .barHeight("77lpx") | ||
| 258 | + | ||
| 259 | + Column() { | ||
| 260 | + // 页签 | ||
| 261 | + Row({ space: 7 }) { | ||
| 262 | + Scroll() { | ||
| 263 | + Row() { | ||
| 264 | + this.TabBuilder(0,"评论") | ||
| 265 | + this.TabBuilder(1,"关注") | ||
| 266 | + } | ||
| 267 | + .justifyContent(FlexAlign.Start) | ||
| 267 | } | 268 | } |
| 268 | - .justifyContent(FlexAlign.Start) | 269 | + .align(Alignment.Start) |
| 270 | + .scrollable(ScrollDirection.Horizontal) | ||
| 271 | + .scrollBar(BarState.Off) | ||
| 272 | + .width('100%') | ||
| 273 | + .padding({left:'31lpx'}) | ||
| 269 | } | 274 | } |
| 270 | - .align(Alignment.Start) | ||
| 271 | - .scrollable(ScrollDirection.Horizontal) | ||
| 272 | - .scrollBar(BarState.Off) | 275 | + .alignItems(VerticalAlign.Bottom) |
| 273 | .width('100%') | 276 | .width('100%') |
| 274 | - .padding({left:'31lpx'}) | ||
| 275 | } | 277 | } |
| 276 | - .alignItems(VerticalAlign.Bottom) | 278 | + .backgroundColor($r('app.color.white')) |
| 279 | + .alignItems(HorizontalAlign.Start) | ||
| 277 | .width('100%') | 280 | .width('100%') |
| 281 | + .height('77lpx') | ||
| 278 | } | 282 | } |
| 279 | - .backgroundColor($r('app.color.white')) | ||
| 280 | - .alignItems(HorizontalAlign.Start) | ||
| 281 | - .width('100%') | ||
| 282 | - .height('77lpx') | ||
| 283 | - } | ||
| 284 | - }.width("100%") | ||
| 285 | - } | ||
| 286 | - .edgeEffect(EdgeEffect.None) | ||
| 287 | - .scrollBar(BarState.Off) | ||
| 288 | - .width('100%') | ||
| 289 | - .layoutWeight(1) | ||
| 290 | - }.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 291 | - }.width('100%') | ||
| 292 | - .layoutWeight(1) | ||
| 293 | - }else{ | ||
| 294 | - Column(){ | ||
| 295 | - CustomTitleUI({ titleName: "" }) | ||
| 296 | - | ||
| 297 | - EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => { | ||
| 298 | - this.isConnectNetwork = NetworkUtil.isNetConnected() | ||
| 299 | - if(this.isConnectNetwork){ | ||
| 300 | - this.getUserInfo() | 283 | + }.width("100%") |
| 284 | + } | ||
| 285 | + .edgeEffect(EdgeEffect.None) | ||
| 286 | + .scrollBar(BarState.Off) | ||
| 287 | + .width('100%') | ||
| 288 | + .layoutWeight(1) | ||
| 301 | } | 289 | } |
| 302 | - },}) | ||
| 303 | - .layoutWeight(1) | ||
| 304 | - .width('100%') | 290 | + .margin({top:px2vp(this.topSafeHeight)}) |
| 291 | + }.width('100%') | ||
| 292 | + .padding({bottom:px2vp(this.bottomSafeHeight)}) | ||
| 293 | + .layoutWeight(1) | ||
| 294 | + }else{ | ||
| 295 | + Column(){ | ||
| 296 | + CustomTitleUI({ titleName: "" }) | ||
| 297 | + | ||
| 298 | + EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => { | ||
| 299 | + this.isConnectNetwork = NetworkUtil.isNetConnected() | ||
| 300 | + if(this.isConnectNetwork){ | ||
| 301 | + this.getUserInfo() | ||
| 302 | + } | ||
| 303 | + },}) | ||
| 304 | + .layoutWeight(1) | ||
| 305 | + .width('100%') | ||
| 306 | + } | ||
| 305 | } | 307 | } |
| 306 | - } | ||
| 307 | 308 | ||
| 308 | } | 309 | } |
| 309 | @Builder MineHomeTitleTransparent() { | 310 | @Builder MineHomeTitleTransparent() { |
| @@ -4,6 +4,8 @@ import TrackingPageBrowseUtils from '../utils/TrackingPageBrowseUtils' | @@ -4,6 +4,8 @@ import TrackingPageBrowseUtils from '../utils/TrackingPageBrowseUtils' | ||
| 4 | @Entry | 4 | @Entry |
| 5 | @Component | 5 | @Component |
| 6 | struct MineMessagePage { | 6 | struct MineMessagePage { |
| 7 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 8 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 7 | 9 | ||
| 8 | onPageShow(): void { | 10 | onPageShow(): void { |
| 9 | TrackingPageBrowseUtils.TrackingPageBrowseExposureStart() | 11 | TrackingPageBrowseUtils.TrackingPageBrowseExposureStart() |
| @@ -15,7 +17,12 @@ struct MineMessagePage { | @@ -15,7 +17,12 @@ struct MineMessagePage { | ||
| 15 | 17 | ||
| 16 | build() { | 18 | build() { |
| 17 | Column(){ | 19 | Column(){ |
| 18 | - MessageListUI() | ||
| 19 | - } | 20 | + Column(){ |
| 21 | + MessageListUI() | ||
| 22 | + } | ||
| 23 | + }.width("100%") | ||
| 24 | + .height("100%") | ||
| 25 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 26 | + | ||
| 20 | } | 27 | } |
| 21 | } | 28 | } |
| @@ -140,7 +140,6 @@ export struct MultiPictureListPage { | @@ -140,7 +140,6 @@ export struct MultiPictureListPage { | ||
| 140 | .id('e_picture_container') | 140 | .id('e_picture_container') |
| 141 | // 设置顶部绘制延伸到状态栏 | 141 | // 设置顶部绘制延伸到状态栏 |
| 142 | // 设置底部绘制延伸到导航条 | 142 | // 设置底部绘制延伸到导航条 |
| 143 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | ||
| 144 | } | 143 | } |
| 145 | 144 | ||
| 146 | /** | 145 | /** |
| @@ -70,7 +70,6 @@ struct OtherNormalUserHomePage { | @@ -70,7 +70,6 @@ struct OtherNormalUserHomePage { | ||
| 70 | .width('100%') | 70 | .width('100%') |
| 71 | .height('355lpx') | 71 | .height('355lpx') |
| 72 | .objectFit(ImageFit.Cover) | 72 | .objectFit(ImageFit.Cover) |
| 73 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 74 | 73 | ||
| 75 | Row() | 74 | Row() |
| 76 | .height(px2vp(this.topSafeHeight)) | 75 | .height(px2vp(this.topSafeHeight)) |
| @@ -78,7 +77,6 @@ struct OtherNormalUserHomePage { | @@ -78,7 +77,6 @@ struct OtherNormalUserHomePage { | ||
| 78 | .backgroundColor($r('app.color.white')) | 77 | .backgroundColor($r('app.color.white')) |
| 79 | .visibility(this.tileOpacity > 0 ? 0 : 1) | 78 | .visibility(this.tileOpacity > 0 ? 0 : 1) |
| 80 | .opacity(this.tileOpacity ) | 79 | .opacity(this.tileOpacity ) |
| 81 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 82 | } | 80 | } |
| 83 | 81 | ||
| 84 | Column(){ | 82 | Column(){ |
| @@ -254,7 +252,7 @@ struct OtherNormalUserHomePage { | @@ -254,7 +252,7 @@ struct OtherNormalUserHomePage { | ||
| 254 | .scrollBar(BarState.Off) | 252 | .scrollBar(BarState.Off) |
| 255 | .width('100%') | 253 | .width('100%') |
| 256 | .layoutWeight(1) | 254 | .layoutWeight(1) |
| 257 | - }.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | 255 | + } |
| 258 | }.width('100%') | 256 | }.width('100%') |
| 259 | .layoutWeight(1) | 257 | .layoutWeight(1) |
| 260 | }else{ | 258 | }else{ |
| @@ -10,6 +10,8 @@ struct SearchPage { | @@ -10,6 +10,8 @@ struct SearchPage { | ||
| 10 | @State fromTabName: string = 'NEWS'; | 10 | @State fromTabName: string = 'NEWS'; |
| 11 | pageShowTime:number = 0; | 11 | pageShowTime:number = 0; |
| 12 | pageHideTime:number = 0; | 12 | pageHideTime:number = 0; |
| 13 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 14 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 13 | 15 | ||
| 14 | onPageShow() { | 16 | onPageShow() { |
| 15 | this.fromTabName = this.params?.['tabName']; | 17 | this.fromTabName = this.params?.['tabName']; |
| @@ -25,9 +27,13 @@ struct SearchPage { | @@ -25,9 +27,13 @@ struct SearchPage { | ||
| 25 | 27 | ||
| 26 | build() { | 28 | build() { |
| 27 | Column(){ | 29 | Column(){ |
| 28 | - SearchComponent({fromTabName:$fromTabName}) | ||
| 29 | - }.height('100%') | ||
| 30 | - .width('100%') | ||
| 31 | - .backgroundColor($r('app.color.white')) | 30 | + Column(){ |
| 31 | + SearchComponent({fromTabName:$fromTabName}) | ||
| 32 | + }.height('100%') | ||
| 33 | + .width('100%') | ||
| 34 | + .backgroundColor($r('app.color.white')) | ||
| 35 | + }.width("100%") | ||
| 36 | + .height("100%") | ||
| 37 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 32 | } | 38 | } |
| 33 | } | 39 | } |
| @@ -5,11 +5,19 @@ const TAG = "SubscribeMessagePage" | @@ -5,11 +5,19 @@ const TAG = "SubscribeMessagePage" | ||
| 5 | @Entry | 5 | @Entry |
| 6 | @Component | 6 | @Component |
| 7 | struct SubscribeMessagePage { | 7 | struct SubscribeMessagePage { |
| 8 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 9 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 10 | + | ||
| 8 | 11 | ||
| 9 | build() { | 12 | build() { |
| 10 | Column(){ | 13 | Column(){ |
| 11 | - SubscribeMessageComponent() | ||
| 12 | - }.height("100%") | ||
| 13 | - .width("100%") | 14 | + Column(){ |
| 15 | + SubscribeMessageComponent() | ||
| 16 | + }.height("100%") | ||
| 17 | + .width("100%") | ||
| 18 | + }.width("100%") | ||
| 19 | + .height("100%") | ||
| 20 | + .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | ||
| 21 | + | ||
| 14 | } | 22 | } |
| 15 | } | 23 | } |
| @@ -68,7 +68,6 @@ struct VisitorCommentPage { | @@ -68,7 +68,6 @@ struct VisitorCommentPage { | ||
| 68 | .width("100%") | 68 | .width("100%") |
| 69 | .height("100%") | 69 | .height("100%") |
| 70 | .backgroundColor($r('app.color.white')) | 70 | .backgroundColor($r('app.color.white')) |
| 71 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 72 | CustomPullToRefresh({ | 71 | CustomPullToRefresh({ |
| 73 | alldata:this.data, | 72 | alldata:this.data, |
| 74 | scroller:this.scroller, | 73 | scroller:this.scroller, |
-
Please register or login to post a comment