Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
wangliang_wd
2024-06-05 10:54:53 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5c390b717b82c61912f6059a306eec5bf70f4db7
5c390b71
1 parent
88dbd389
feat:编辑资料全屏适配,优化我的收藏展示
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
24 deletions
sight_harmony/features/wdComponent/src/main/ets/components/CardParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserInfoPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserIntroductionPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserNikeNamePage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/InteractMessagePage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/MyCollectionListPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/CardParser.ets
View file @
5c390b7
import { CompStyle } from 'wdConstant';
import { CompDTO, ContentDTO } from 'wdBean';
import { Card2Component } from './cardview/Card2Component';
//
import { Card3Component } from './cardview/Card3Component';
import { Card3Component } from './cardview/Card3Component';
import { Card4Component } from './cardview/Card4Component';
import { Card5Component } from './cardview/Card5Component';
import { Card6Component } from './cardview/Card6Component';
...
...
@@ -61,10 +61,12 @@ export struct CardParser {
if (contentDTO.appStyle === CompStyle.Card_02) {
Card2Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
} else if (contentDTO.appStyle === CompStyle.Card_04) {
Card3Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
}else if (contentDTO.appStyle === CompStyle.Card_03) {
Card4Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
} else if (contentDTO.appStyle === CompStyle.Card_05) {
}
else if (contentDTO.appStyle === CompStyle.Card_05) {
Card5Component({ compDTO: this.compDTO, contentDTO, titleShowPolicy: this.compDTO.titleShowPolicy, pageId: this.pageId, pageName: this.pageName})
} else if (contentDTO.appStyle === CompStyle.Card_06 ) {
} else if (contentDTO.appStyle === CompStyle.Card_06
|| contentDTO.appStyle === CompStyle.Card_13
) {
Card6Component({ compDTO: this.compDTO, contentDTO: this.contentDTO, pageId: this.pageId, pageName: this.pageName })
} else if (contentDTO.appStyle === CompStyle.Card_10) {
Card10Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserInfoPage.ets
View file @
5c390b7
...
...
@@ -19,7 +19,8 @@ struct EditUserInfoPage {
@State headerImg: string = ''
@State dataSource: AreaListModel[] = []
@State currentUserInfo: editModel = new editModel()
@State bottomSafeHeight: number = 0;
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
dialogController: CustomDialogController = new CustomDialogController({
builder: AreaPickerDialog({dataSource:this.dataSource,
...
...
@@ -34,10 +35,7 @@ struct EditUserInfoPage {
}),
alignment: DialogAlignment.Bottom,
customStyle: true,
offset: {
dx: 0,
dy: -this.bottomSafeHeight
},
closeAnimation:{duration:0}
})
dateDialogController: CustomDialogController = new CustomDialogController({
...
...
@@ -53,10 +51,7 @@ struct EditUserInfoPage {
}),
alignment: DialogAlignment.Bottom,
customStyle: true,
offset: {
dx: 0,
dy: -this.bottomSafeHeight
},
closeAnimation:{duration:0}
})
sexDialogController: CustomDialogController = new CustomDialogController({
...
...
@@ -69,15 +64,10 @@ struct EditUserInfoPage {
}),
alignment: DialogAlignment.Bottom,
customStyle: true,
offset: {
dx: 0,
dy: -this.bottomSafeHeight
},
closeAnimation:{duration:0}
})
async aboutToAppear() {
let windowHight: window.Window = await window.getLastWindow(getContext(this));
this.bottomSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height)
aboutToAppear() {
this.getAccountOwnerInfo()
this.getAreaList()
}
...
...
@@ -142,6 +132,7 @@ struct EditUserInfoPage {
}
.width('100%')
.height('100%')
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
@Builder
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserIntroductionPage.ets
View file @
5c390b7
...
...
@@ -9,6 +9,8 @@ struct EditUserIntroductionPage {
@State textColor : string = '#222222'
@State introduction: string = ''
@State params:editModelParams = router.getParams() as editModelParams;
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
build() {
Column(){
CustomTitleUI({titleName:'修改简介'})
...
...
@@ -63,6 +65,7 @@ struct EditUserIntroductionPage {
this.updateEditModel()
})
}
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/EditUserNikeNamePage.ets
View file @
5c390b7
...
...
@@ -12,6 +12,8 @@ struct EditUserNikeNamePage {
@State textColor : string = '#222222'
@State nikeName: string = ''
@State params:editModelParams = router.getParams() as editModelParams;
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
build() {
Column(){
CustomTitleUI({titleName:'修改昵称'})
...
...
@@ -66,7 +68,7 @@ struct EditUserNikeNamePage {
///内部更新
this.updateEditModel()
})
}
}
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
async updateEditModel(){
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/InteractMessagePage.ets
View file @
5c390b7
...
...
@@ -20,6 +20,8 @@ struct InteractMessagePage {
private scroller: Scroller = new Scroller();
@State likeNum: number = 0
@State currentPage: number = 1;
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
aboutToAppear(){
this.getData()
...
...
@@ -58,6 +60,8 @@ struct InteractMessagePage {
}
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
@Builder ListLayout() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/MyCollectionListPage.ets
View file @
5c390b7
...
...
@@ -34,6 +34,8 @@ struct MyCollectionListPage {
@State currentPage: number = 1;
private scroller: Scroller = new Scroller();
emptyType: WDViewDefaultType = WDViewDefaultType.WDViewDefaultType_Default
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
dialogController: CustomDialogController = new CustomDialogController({
builder: MyCustomDialog({
...
...
@@ -120,6 +122,8 @@ struct MyCollectionListPage {
.backgroundColor('#FFFFFF')
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
@Builder ListLayout() {
...
...
@@ -149,16 +153,14 @@ struct MyCollectionListPage {
selectCallback:(isOn)=>{
this.addCompDTO(isOn,compDTO)
}
})
.margin({left:16})
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 });
}).margin({left:16})
}
Column() {
BigPicCardComponent({compDTO:new CompDTO,contentDTO:compDTO,pageId:TrackConstants.PageName.My_Collect,pageName:TrackConstants.PageName.My_Collect})
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 });
}
}.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
if (isVisible) {
if (isVisible
&& !this.isEditState
) {
TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect, TrackParamConvert.program(compDTO))
}
})
...
...
@@ -291,6 +293,7 @@ struct MyCollectionListPage {
compDTO.interactData = this.commentList[index]
datas.push(compDTO)
}
this.allDatas = []
this.allDatas.push(...datas)
} catch (exception) {
}
...
...
Please
register
or
login
to post a comment