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
张善主
2024-06-27 10:57:53 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
91f0372621f293a6c9f4fb67966d27dcdb5ef66e
91f03726
2 parents
55b37d8b
49e8dac4
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
14 deletions
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/lottie/LottieView.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePagePersonFunctionUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/PagePersonFunction.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/MinePageComponent.ets
sight_harmony/products/phone/src/main/ets/pages/view/BottomNavigationComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
91f0372
...
...
@@ -217,7 +217,7 @@ export struct CompParser {
} else {
Divider().strokeWidth(5).color('#f5f5f5')
}
} else if (this.compDTO.compType === 'appStyle') {
} else if (this.compDTO.compType === 'appStyle'
|| this.compDTO.compStyle === CompStyle.Zh_Single_Row_01
) {
if (
this.nextCompDTO.compStyle === CompStyle.Card_09 ||
this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10 ||
...
...
sight_harmony/features/wdComponent/src/main/ets/components/lottie/LottieView.ets
View file @
91f0372
...
...
@@ -71,8 +71,8 @@ export struct LottieView {
this.onDestroyAnimation()
})
.onAppear(()=>{
this.loadAnimation();
})
this.loadAnimation();
})
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePagePersonFunctionUI.ets
View file @
91f0372
import { BottomNavDTO } from 'wdBean/Index'
import { WDRouterRule, WDRouterPage } from 'wdRouter'
import { TrackConstants } from 'wdTracking/src/main/ets/common/TrackConstants'
import { TrackingButton } from 'wdTracking/src/main/ets/tracking/TrackingButton'
...
...
@@ -12,12 +13,13 @@ export default struct MinePagePersonFunctionUI {
@Link personalData:MinePagePersonalFunctionsItem[]
@Prop isLogin:boolean
@Link percent:number
navItem: BottomNavDTO = {} as BottomNavDTO
build() {
Grid(){
ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{
GridItem(){
PagePersonFunction({ item: item, noDivider : (index % 5 < 4 && index != this.personalData.length-1) ? false : true,percent:$percent})
PagePersonFunction({ item: item, noDivider : (index % 5 < 4 && index != this.personalData.length-1) ? false : true,percent:$percent
,navItem:this.navItem
})
}.onClick(()=>{
console.log(index+"")
switch (item.msg){
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
View file @
91f0372
import { BottomNavDTO } from 'wdBean/Index'
import { SpConstants } from 'wdConstant/Index'
import { SPHelper, StringUtils, UserDataLocal } from 'wdKit'
import { WDRouterPage, WDRouterRule } from 'wdRouter'
...
...
@@ -15,6 +16,7 @@ export default struct MinePageUserSimpleInfoUI {
@State levelHead:string = ""
@State levelId:number = 0
@Link percent:number
navItem: BottomNavDTO = {} as BottomNavDTO
loginStateChange(){
if(this.isLogin){
...
...
@@ -62,6 +64,7 @@ export default struct MinePageUserSimpleInfoUI {
Column(){
Row(){
Text(this.userName)
// .fontColor(this.navItem?.homePageColor.length > 0?this.navItem.homePageColor:$r('app.color.color_222222'))
.fontColor($r('app.color.color_222222'))
.maxLines(1)
.fontWeight(FontWeight.Medium)
...
...
@@ -72,6 +75,8 @@ export default struct MinePageUserSimpleInfoUI {
Image($r('app.media.mine_user_edit'))
.width(`${this.calcHeight(27)}lpx`)
.height(`${this.calcHeight(27)}lpx`)
// .colorBlend(this.navItem?.homePageColor.length > 0?this.navItem?.homePageColor:null)
.colorBlend(Color.Red)
.margin({left:`${this.calcHeight(15)}lpx`})
.objectFit(ImageFit.Cover)
Blank()
...
...
@@ -137,7 +142,7 @@ export default struct MinePageUserSimpleInfoUI {
.height(`${this.calcHeight(50)}lpx`)
}.width('131lpx')
.visibility(Visibility.Hidden)
}
.backgroundColor($r('app.color.white'))
}
.setFullWidth()
.padding({top:'31lpx',left:'46lpx'})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/PagePersonFunction.ets
View file @
91f0372
import { BottomNavDTO } from 'wdBean/Index'
import MinePagePersonalFunctionsItem from '../../viewmodel/MinePagePersonalFunctionsItem'
@Component
...
...
@@ -5,12 +6,13 @@ export struct PagePersonFunction{
@ObjectLink item: MinePagePersonalFunctionsItem
@State noDivider:boolean = false
@Link percent:number
navItem: BottomNavDTO = {} as BottomNavDTO
build() {
Row(){
Column(){
Stack({ alignContent: Alignment.TopEnd }){
Image(this.item.imgSrc)
// .colorBlend(this.navItem?.homePageColor.length > 0?this.navItem.homePageColor:null)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
if (this.item.isShowRedPoint) {
...
...
@@ -26,6 +28,7 @@ export struct PagePersonFunction{
Text(`${this.item.msg}`)
.margin({top:`${this.calcHeight(8)}lpx`})
.height(`${this.calcHeight(23)}lpx`)
// .fontColor(this.navItem?.homePageColor.length > 0?this.navItem.homePageColor:$r('app.color.color_222222'))
.fontColor($r('app.color.color_222222'))
.fontSize(`${this.calcHeight(23)}lpx`)
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/MinePageComponent.ets
View file @
91f0372
...
...
@@ -11,6 +11,7 @@ import dataPreferences from '@ohos.data.preferences';
import { MergeRecordDialog } from '../../dialog/MergeRecordDialog'
import { TrackingPageBrowse } from 'wdTracking/src/main/ets/tracking/TrackingPageBrowse'
import { TrackConstants } from 'wdTracking/src/main/ets/common/TrackConstants'
import { BottomNavDTO } from 'wdBean/Index'
const TAG = 'MinePageComponent';
...
...
@@ -27,6 +28,11 @@ export struct MinePageComponent {
@State moreData:MinePageMoreFunctionModel[] = []
scroller: Scroller = new Scroller()
preferences: dataPreferences.Preferences | null = null;
/**
* 我的 底导 某个tab 对象
*/
navItem: BottomNavDTO = {} as BottomNavDTO
observer = (key: string) => {
if(key == SpConstants.USER_ID){
if(StringUtils.isEmpty(SPHelper.default.getSync(SpConstants.USER_ID,""))){
...
...
@@ -158,12 +164,12 @@ export struct MinePageComponent {
Column(){
Scroll(this.scroller){
Stack(){
Image(
$r('app.media.mine_head_bg')
)
Image(
this.navItem?.backgroundUrl??''
)
.width('100%')
.height(`${657 * this.percent}lpx`)
.objectFit(ImageFit.
Auto
)
.objectFit(ImageFit.
Cover
)
this.MinePageUI()
}
}
.height('100%')
.alignContent(Alignment.Top)
}
.setFullWidthAndHeight()
...
...
@@ -173,16 +179,15 @@ export struct MinePageComponent {
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
}
@Builder MinePageUI(){
Column(){
//头像层
MinePageUserSimpleInfoUI({isLogin:this.isLogin,percent:$percent})
MinePageUserSimpleInfoUI({isLogin:this.isLogin,percent:$percent
,navItem:this.navItem
})
//Grid 区域
MinePagePersonFunctionUI({personalData:$personalData,isLogin:this.isLogin,percent:$percent})
MinePagePersonFunctionUI({personalData:$personalData,isLogin:this.isLogin,percent:$percent
,navItem:this.navItem
})
//Card
//MinePageCardUI()
//创作者区域
...
...
@@ -192,6 +197,7 @@ export struct MinePageComponent {
MinePageMoreFunctionUI({moreData:$moreData,percent:$percent})
}.width('100%')
.height('100%')
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
.justifyContent(FlexAlign.Start)
}
...
...
sight_harmony/products/phone/src/main/ets/pages/view/BottomNavigationComponent.ets
View file @
91f0372
...
...
@@ -83,7 +83,7 @@ export struct BottomNavigationComponent {
TabContent() {
if (CompUtils.isMine(navItem)) {
// 我的页面组件数据列表
MinePageComponent({ isMinePage: this.currentNavIndex === this.bottomNavList.length - 1 })
MinePageComponent({ isMinePage: this.currentNavIndex === this.bottomNavList.length - 1
, navItem:navItem
})
} else if (CompUtils.isVideo(navItem)) {
// 视频频道,包含视频和直播
VideoChannelPage({
...
...
Please
register
or
login
to post a comment