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-04 16:18:04 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
1dd38fda69f5dcf3f513ecb1cb81e5e5647da9bd
1dd38fda
2 parents
a30acb6b
03cdcde7
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
365 additions
and
313 deletions
sight_harmony/features/wdComponent/src/main/ets/components/CardParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowFirstTabsComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowListDetailUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowSecondTabsComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowThirdTabsComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/message/MessageListUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/message/subscribe/SubscribeMessageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/AppointmentListPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/FollowListPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/MinePageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PeopleShipHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PrivacySettingPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/SettingAboutPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/SettingPage.ets
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/pages/MineMessagePage.ets
sight_harmony/features/wdComponent/src/main/ets/pages/MultiPictureListPage.ets
sight_harmony/features/wdComponent/src/main/ets/pages/OtherNormalUserHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/pages/SearchPage.ets
sight_harmony/features/wdComponent/src/main/ets/pages/SubscribeMessagePage.ets
sight_harmony/features/wdComponent/src/main/ets/pages/VisitorCommentPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/CardParser.ets
View file @
1dd38fd
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';
...
...
@@ -60,8 +60,6 @@ export struct CardParser {
} else {
if (contentDTO.appStyle === CompStyle.Card_02) {
Card2Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
} else if (contentDTO.appStyle === CompStyle.Card_03) {
Card3Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
} else if (contentDTO.appStyle === CompStyle.Card_04) {
Card4Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
} else if (contentDTO.appStyle === CompStyle.Card_05) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
1dd38fd
...
...
@@ -4,6 +4,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import PageModel from '../viewmodel/PageModel';
import { CardParser } from './CardParser';
import { Card2Component } from './cardview/Card2Component';
import { Card3Component } from './cardview/Card3Component';
import { Card9Component } from './cardview/Card9Component';
import { Card6Component } from './cardview/Card6Component';
import { Card5Component } from './cardview/Card5Component';
...
...
@@ -72,7 +73,7 @@ export struct CompParser {
build() {
Column() {
//
Text(JSON.stringify(this.compDTO.compStyle))
//
Text(JSON.stringify(this.compDTO.compStyle))
this.componentBuilder();
}
}
...
...
@@ -142,11 +143,13 @@ export struct CompParser {
//时间链卡
Card9Component({ compDTO: this.compDTO, contentDTO:this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if(this.compDTO.compStyle === CompStyle
.Card_13){
} else if(this.compDTO.compStyle === CompStyle.Card_13){
Card6Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
} else if(this.compDTO.compStyle === CompStyle.Card_03){
Card3Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
}else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListUI.ets
View file @
1dd38fd
...
...
@@ -63,7 +63,6 @@ export struct AppointmentListUI {
.width("100%")
.height("100%")
.backgroundColor($r('app.color.color_F9F9F9'))
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
CustomPullToRefresh({
alldata:this.data,
scroller:this.scroller,
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowFirstTabsComponent.ets
View file @
1dd38fd
...
...
@@ -120,12 +120,11 @@ export struct FollowFirstTabsComponent{
this.listScroller.scrollToIndex(index, true, ScrollAlign.CENTER)
})
.width('100%')
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
.layoutWeight(1)
.loop(false)
.indicator(false)
.effectMode(EdgeEffect.None)
}
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
}
}
}.width('100%')
.height("100%")
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowListDetailUI.ets
View file @
1dd38fd
...
...
@@ -101,7 +101,6 @@ export struct FollowListDetailUI {
.margin({bottom:"40lpx"})
}
}
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
.edgeEffect(EdgeEffect.None)
.cachedCount(5)
.padding({ left: '31lpx', right: '31lpx' })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowSecondTabsComponent.ets
View file @
1dd38fd
...
...
@@ -27,7 +27,6 @@ export struct FollowSecondTabsComponent{
.width("100%")
.height("100%")
.backgroundColor($r('app.color.color_transparent'))
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].id,type:1})
.height("100%")
...
...
@@ -40,7 +39,6 @@ export struct FollowSecondTabsComponent{
.width("100%")
.height("100%")
.backgroundColor($r('app.color.color_transparent'))
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
this.FollowSecondUI()
}.width("100%")
...
...
@@ -50,7 +48,6 @@ export struct FollowSecondTabsComponent{
}
.width('100%')
.layoutWeight(1)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
}
@Builder FollowSecondUI(){
...
...
@@ -89,7 +86,6 @@ export struct FollowSecondTabsComponent{
.effectMode(EdgeEffect.None)
.height('100%')
.layoutWeight(1)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
}.width('100%')
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowThirdTabsComponent.ets
View file @
1dd38fd
...
...
@@ -122,7 +122,6 @@ export struct FollowThirdTabsComponent{
})
.width('100%')
.layoutWeight(1)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/message/MessageListUI.ets
View file @
1dd38fd
import { DateTimeUtils
, StringUtils, ToastUtils
} from 'wdKit/Index'
import { DateTimeUtils } from 'wdKit/Index'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
import { Remark, WDMessageCenterMessageType } from '../../../model/InteractMessageModel'
import MinePageDatasModel from '../../../model/MinePageDatasModel'
...
...
@@ -7,7 +7,6 @@ import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh'
import { CustomTitleUI } from '../../reusable/CustomTitleUI'
import { MessageListItemUI } from './MessageListItemUI'
import {TrackingButton,TrackConstants}from 'wdTracking/Index'
import TrackingPageBrowseUtils from '../../../utils/TrackingPageBrowseUtils'
const TAG = "MessageListUI"
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/message/subscribe/SubscribeMessageComponent.ets
View file @
1dd38fd
...
...
@@ -57,33 +57,40 @@ export struct SubscribeMessageComponent{
}
}
} else {
CustomPullToRefresh({
alldata:this.data,
scroller:this.scroller,
customList:()=>{
this.ListLayout()
},
onRefresh:(resolve)=>{
this.curPageNum = 1;
this.hasMore = true
this.isGetRequest = false
this.data.clear()
if (!this.isLoading) {
this.getNewPageData()
}
if(resolve) resolve('刷新成功')
},
onLoadMore:(resolve)=> {
if (!this.isLoading) {
//加载分页数据
this.getNewPageData()
Stack(){
Row()
.width("100%")
.height("100%")
.backgroundColor($r('app.color.color_F9F9F9'))
CustomPullToRefresh({
alldata:this.data,
scroller:this.scroller,
customList:()=>{
this.ListLayout()
},
onRefresh:(resolve)=>{
this.curPageNum = 1;
this.hasMore = true
this.isGetRequest = false
this.data.clear()
if (!this.isLoading) {
this.getNewPageData()
}
if(resolve) resolve('刷新成功')
},
onLoadMore:(resolve)=> {
if (!this.isLoading) {
//加载分页数据
this.getNewPageData()
}
}
}
})
.width('100%')
})
.width('100%')
}
}
}
.backgroundColor($r('app.color.color_
F9F9F9
'))
.backgroundColor($r('app.color.color_
transparent
'))
.height('100%')
.width('100%')
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/AppointmentListPage.ets
View file @
1dd38fd
...
...
@@ -9,6 +9,9 @@ const TAG = "AppointmentListPage"
struct AppointmentListPage {
pageShowTime:number = 0;
pageHideTime:number = 0;
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
onPageShow() {
this.pageShowTime = DateTimeUtils.getTimeStamp()
...
...
@@ -23,7 +26,12 @@ struct AppointmentListPage {
build() {
Column(){
AppointmentListUI()
}
Column(){
AppointmentListUI()
}
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/FollowListPage.ets
View file @
1dd38fd
...
...
@@ -11,6 +11,8 @@ struct FollowListPage {
@State curIndex: string = '0';
pageShowTime:number = 0;
pageHideTime:number = 0;
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
onPageShow() {
this.curIndex = this.params?.['index'];
...
...
@@ -25,12 +27,16 @@ struct FollowListPage {
}
build() {
Column() {
//Tab 详情
FollowFirstTabsComponent({changeIndex:Number(this.curIndex)})
}
.backgroundColor($r('app.color.white'))
.height('100%')
.width('100%')
Column(){
Column() {
//Tab 详情
FollowFirstTabsComponent({changeIndex:Number(this.curIndex)})
}
.backgroundColor($r('app.color.white'))
.height('100%')
.width('100%')
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/MinePageComponent.ets
View file @
1dd38fd
...
...
@@ -19,7 +19,6 @@ const TAG = 'MinePageComponent';
*/
@Component
export struct MinePageComponent {
private topRectHeight: string = AppStorage.get<number>('topSafeHeight') + 'px';
//是否是创作者
@State isCreator:boolean = false
@State isLogin:boolean = false //默认 false 测试放开
...
...
@@ -63,6 +62,8 @@ export struct MinePageComponent {
@StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm';
private breakpointSystem = new BreakpointSystem();
@State percent:number = 1
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
currentChanged(){
if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){
...
...
@@ -154,22 +155,25 @@ export struct MinePageComponent {
}
build() {
Scroll(this.scroller){
Stack(){
Image($r('app.media.mine_head_bg'))
.width('100%')
.height(`${657 * this.percent}lpx`)
.objectFit(ImageFit.Auto)
this.MinePageUI()
Column(){
Scroll(this.scroller){
Stack(){
Image($r('app.media.mine_head_bg'))
.width('100%')
.height(`${657 * this.percent}lpx`)
.objectFit(ImageFit.Auto)
this.MinePageUI()
}
.alignContent(Alignment.Top)
}
.alignContent(Alignment.Top)
}
.setFullWidthAndHeight()
.backgroundColor($r('app.color.color_F9F9F9'))
.scrollable(ScrollDirection.Vertical)
.scrollBar(BarState.Off)
// 预留状态栏、导航栏高度
.margin({ top: this.topRectHeight})
.setFullWidthAndHeight()
.backgroundColor($r('app.color.color_F9F9F9'))
.scrollable(ScrollDirection.Vertical)
.scrollBar(BarState.Off)
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/PeopleShipHomePage.ets
View file @
1dd38fd
...
...
@@ -70,7 +70,6 @@ struct PeopleShipHomePage {
.objectRepeat(ImageRepeat.NoRepeat)
.backgroundColor(Color.White)
.visibility(this.isLoading ? Visibility.None : Visibility.Visible)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
Row()
.height(px2vp(this.topSafeHeight))
...
...
@@ -78,7 +77,6 @@ struct PeopleShipHomePage {
.backgroundColor($r('app.color.white'))
.visibility(this.topOpacity > 0 ? Visibility.Visible : Visibility.None)
.opacity(this.topOpacity )
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
}
Column(){
...
...
@@ -141,10 +139,10 @@ struct PeopleShipHomePage {
})
}
}
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
.alignItems(HorizontalAlign.Start)
.justifyContent(FlexAlign.Start)
.width('100%')
.margin({top:px2vp(this.topSafeHeight)})
}
.width('100%')
}else{
...
...
@@ -165,7 +163,6 @@ struct PeopleShipHomePage {
}
aboutToAppear() {
WindowModel.shared.setWindowLayoutFullScreen(false)
this.getData()
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/PrivacySettingPage.ets
View file @
1dd38fd
...
...
@@ -22,6 +22,8 @@ export struct PrivacySettingPage {
@StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm';
private breakpointSystem = new BreakpointSystem();
@State percent:number = 1
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
currentChanged(){
if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){
...
...
@@ -76,13 +78,17 @@ export struct PrivacySettingPage {
build() {
Column(){
TitleBackComponent({title:"隐私设置"})
//滑动区域
this.PrivacySettingComponentsUI()
}.backgroundColor('#F8F8F8')
.width("100%")
Column(){
TitleBackComponent({title:"隐私设置"})
//滑动区域
this.PrivacySettingComponentsUI()
}.backgroundColor('#F8F8F8')
.width("100%")
.height("100%")
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/SettingAboutPage.ets
View file @
1dd38fd
...
...
@@ -7,6 +7,8 @@ import { AboutPageUI } from '../setting/AboutPageUI';
struct SettingAboutPage {
pageShowTime:number = 0;
pageHideTime:number = 0;
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
onPageShow() {
this.pageShowTime = DateTimeUtils.getTimeStamp()
...
...
@@ -22,7 +24,12 @@ struct SettingAboutPage {
build() {
Column(){
AboutPageUI()
}.backgroundColor($r('app.color.white'))
Column(){
AboutPageUI()
}.backgroundColor($r('app.color.white'))
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/SettingPage.ets
View file @
1dd38fd
...
...
@@ -16,6 +16,8 @@ struct SettingPage {
pageShowSettingTime:number = 0;
pageHideSettingTime:number = 0;
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
onPageShow() {
...
...
@@ -44,14 +46,19 @@ struct SettingPage {
}
build() {
Column() {
if (this.pageType == 'mainSetting') {
MineSettingComponent()
} else {
AccountAndSecurityLayout({enterActivityTime:this.enterActivityTime})
}
}.setFullWidth()
.backgroundColor($r("app.color.white"))
Column(){
Column() {
if (this.pageType == 'mainSetting') {
MineSettingComponent()
} else {
AccountAndSecurityLayout({enterActivityTime:this.enterActivityTime})
}
}.setFullWidth()
.backgroundColor($r("app.color.white"))
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
// 私有方法
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
View file @
1dd38fd
...
...
@@ -38,6 +38,7 @@ struct MineHomePage {
@State isCommentEnter:string = "";
@State isConnectNetwork : boolean = NetworkUtil.isNetConnected()
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
pageShowTime:number = 0;
pageHideTime:number = 0;
...
...
@@ -62,248 +63,248 @@ struct MineHomePage {
}
build() {
if(this.isConnectNetwork){
Stack({ alignContent: Alignment.Top }){
if(this.isConnectNetwork){
Stack({ alignContent: Alignment.Top }){
Image($r('app.media.title_bg'))
.width('100%')
.height('355lpx')
.objectFit(ImageFit.Cover)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
Row()
.height(px2vp(this.topSafeHeight))
.width("100%")
.backgroundColor($r('app.color.white'))
.visibility(this.tileOpacity > 0 ? 0 : 1)
.opacity(this.tileOpacity )
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
}
Column(){
Stack({ alignContent: Alignment.Top }){
this.MineHomeTitleTransparent()
this.MineHomeTitleWhite()
Image($r('app.media.title_bg'))
.width('100%')
.height('355lpx')
.objectFit(ImageFit.Cover)
Row()
.height(px2vp(this.topSafeHeight))
.width("100%")
.backgroundColor($r('app.color.white'))
.visibility(this.tileOpacity > 0 ? 0 : 1)
.opacity(this.tileOpacity )
}
Scroll(this.scroller) {
Column() {
//用户信息区域
Row() {
Stack(){
Image(this.headPhotoUrl)
.alt($r('app.media.default_head'))
.width('115lpx')
.height('115lpx')
.objectFit(ImageFit.Auto)
.clip(new Circle({ width: '115lpx', height: '115lpx' }))
Image(this.levelHead)
.width('165lpx')
.height('165lpx')
.objectFit(ImageFit.Auto)
}.onClick(()=>{
let params = {'headPhotoUrl': this.headPhotoUrl} as Record<string, string>;
WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
}).width('165lpx')
.height('165lpx')
Column(){
Stack({ alignContent: Alignment.Top }){
this.MineHomeTitleTransparent()
this.MineHomeTitleWhite()
}
Scroll(this.scroller) {
Column() {
//用户信息区域
Row() {
Stack(){
Image(this.headPhotoUrl)
.alt($r('app.media.default_head'))
.width('115lpx')
.height('115lpx')
.objectFit(ImageFit.Auto)
.clip(new Circle({ width: '115lpx', height: '115lpx' }))
Image(this.levelHead)
.width('165lpx')
.height('165lpx')
.objectFit(ImageFit.Auto)
}.onClick(()=>{
let params = {'headPhotoUrl': this.headPhotoUrl} as Record<string, string>;
WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
}).width('165lpx')
.height('165lpx')
Column() {
Row() {
Text(`${this.userName}`)
.fontColor($r('app.color.white'))
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize('38lpx')
.lineHeight('50lpx')
.fontWeight('500lpx')
.onClick(()=>{
let params: editModelParams = {
editContent: this.userName
}
WDRouterRule.jumpWithPage(WDRouterPage.editUserNikeNamePage,params)
})
if(this.levelId>0){
Text(`等级${this.levelId}`)
.fontColor($r('app.color.color_ED2800'))
.fontSize('23lpx')
.fontWeight(500)
.margin({ left: '10lpx' })
.backgroundImage($r("app.media.my_grade_bg"))
.backgroundImageSize(ImageSize.Cover)
.padding({left:"17lpx",right:"8lpx"})
.height('35lpx')
.borderRadius({topRight:2,bottomRight:2})
}
Blank()
}.width('507lpx')
Row() {
Row() {
Text(`${this.browseNum}`)
.textStyle()
Text("阅读")
.textStyle2()
}
.margin({ right: '15lpx' })
Divider()
.height('19lpx')
.width('2lpx')
.color($r('app.color.white'))
.vertical(true)
.opacity(0.4)
Row() {
Text(`${this.commentNum}`)
.textStyle()
Text("评论")
.textStyle2()
}.margin({ right: '15lpx', left: '15lpx' })
Divider()
.height('19lpx')
.width('2lpx')
.color($r('app.color.white'))
.vertical(true)
.opacity(0.4)
Row() {
Text(`${this.attentionNum}`)
.textStyle()
Text("关注")
.textStyle2()
}.margin({ left: '15lpx' })
}.margin({ top: '23lpx' })
}.alignItems(HorizontalAlign.Start)
.margin({ left: StringUtils.isEmpty(this.levelHead)?'32lpx':"3lpx" })
}
.onAreaChange((oldValue: Area, newValue: Area) => {
if (this.firstPositionY === 0) {
this.firstPositionY = newValue.globalPosition.y as number
}else{
let persent = (this.firstPositionY - Number(newValue.globalPosition.y)) / (this.firstPositionY * 0.3)
if(persent > 1){
persent = 1
}
this.tileOpacity = persent
}
})
.backgroundColor($r('app.color.color_transparent'))
.height('184lpx')
.width('100%')
.padding({ left: '6lpx' })
//用户简介区域
Column() {
Row() {
Text(`${this.userName}`)
.fontColor($r('app.color.white'))
.maxLines(1)
Text(this.isHasIntroduction?"简介:"+this.desc:this.desc)
.fontSize('27lpx')
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize('38lpx')
.lineHeight('50lpx')
.fontWeight('500lpx')
.lineHeight('40lpx')
.fontWeight('400lpx')
.fontColor(this.isHasIntroduction?$r('app.color.color_222222'):$r('app.color.color_999999'))
.textAlign(TextAlign.Start)
.onClick(()=>{
let params: editModelParams = {
editContent: this.
userName
editContent: this.
isHasIntroduction?this.desc:''
}
WDRouterRule.jumpWithPage(WDRouterPage.editUser
NikeName
Page,params)
WDRouterRule.jumpWithPage(WDRouterPage.editUser
Introduction
Page,params)
})
if(this.levelId>0){
Text(`等级${this.levelId}`)
.fontColor($r('app.color.color_ED2800'))
.fontSize('23lpx')
.fontWeight(500)
.margin({ left: '10lpx' })
.backgroundImage($r("app.media.my_grade_bg"))
.backgroundImageSize(ImageSize.Cover)
.padding({left:"17lpx",right:"8lpx"})
.height('35lpx')
.borderRadius({topRight:2,bottomRight:2})
}
Blank()
}.width('507lpx')
Row() {
Row() {
Text(`${this.browseNum}`)
.textStyle()
Text("阅读")
.textStyle2()
if(!this.isHasIntroduction){
Image($r('app.media.user_info_edit_icon'))
.width('27lpx')
.height('27lpx')
.interpolation(ImageInterpolation.High)
.objectFit(ImageFit.Auto)
}
.margin({ right: '15lpx' })
Divider()
.height('19lpx')
.width('2lpx')
.color($r('app.color.white'))
.vertical(true)
.opacity(0.4)
Row() {
Text(`${this.commentNum}`)
.textStyle()
Text("评论")
.textStyle2()
}.margin({ right: '15lpx', left: '15lpx' })
Divider()
.height('19lpx')
.width('2lpx')
.color($r('app.color.white'))
.vertical(true)
.opacity(0.4)
Row() {
Text(`${this.attentionNum}`)
.textStyle()
Text("关注")
.textStyle2()
}.margin({ left: '15lpx' })
}.margin({ top: '23lpx' })
}.alignItems(HorizontalAlign.Start)
.margin({ left: StringUtils.isEmpty(this.levelHead)?'32lpx':"3lpx" })
}
.onAreaChange((oldValue: Area, newValue: Area) => {
if (this.firstPositionY === 0) {
this.firstPositionY = newValue.globalPosition.y as number
}else{
let persent = (this.firstPositionY - Number(newValue.globalPosition.y)) / (this.firstPositionY * 0.3)
if(persent > 1){
persent = 1
}
this.tileOpacity = persent
}
})
.backgroundColor($r('app.color.color_transparent'))
.height('184lpx')
.width('100%')
.padding({ left: '6lpx' })
//用户简介区域
Column() {
Row() {
Text(this.isHasIntroduction?"简介:"+this.desc:this.desc)
.fontSize('27lpx')
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.lineHeight('40lpx')
Text(`来到人民日报${this.registerTimeForDay}天`)
.fontSize('23lpx')
.lineHeight('25lpx')
.fontWeight('400lpx')
.fontColor(
this.isHasIntroduction?$r('app.color.color_222222'):
$r('app.color.color_999999'))
.fontColor($r('app.color.color_999999'))
.textAlign(TextAlign.Start)
.onClick(()=>{
let params: editModelParams = {
editContent: this.isHasIntroduction?this.desc:''
}
WDRouterRule.jumpWithPage(WDRouterPage.editUserIntroductionPage,params)
})
if(!this.isHasIntroduction){
Image($r('app.media.user_info_edit_icon'))
.width('27lpx')
.height('27lpx')
.interpolation(ImageInterpolation.High)
.objectFit(ImageFit.Auto)
}
}
.margin({ top: '15lpx' })
}.padding({ left: '31lpx',right:'31lpx',top:'19lpx',bottom:'31lpx'})
.alignItems(HorizontalAlign.Start)
.justifyContent(FlexAlign.Center)
.width('100%')
.backgroundColor($r('app.color.white'))
//间隔符
Text(`来到人民日报${this.registerTimeForDay}天`)
.fontSize('23lpx')
.lineHeight('25lpx')
.fontWeight('400lpx')
.fontColor($r('app.color.color_999999'))
.textAlign(TextAlign.Start)
.margin({ top: '15lpx' })
}.padding({ left: '31lpx',right:'31lpx',top:'19lpx',bottom:'31lpx'})
.alignItems(HorizontalAlign.Start)
.justifyContent(FlexAlign.Center)
.width('100%')
.backgroundColor($r('app.color.white'))
//间隔符
Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx')
Divider().width('100%').height('12lpx').color($r('app.color.color_F5F5F5')).strokeWidth('12lpx')
//tab 页面
Stack({ alignContent: Alignment.Top }){
Tabs({controller: this.controller}) {
TabContent() {
HomePageBottomCommentComponent({commentNum:$commentNum})
}
TabContent() {
HomePageBottomFollowComponent()
//tab 页面
Stack({ alignContent: Alignment.Top }){
Tabs({controller: this.controller}) {
TabContent() {
HomePageBottomCommentComponent({commentNum:$commentNum})
}
TabContent() {
HomePageBottomFollowComponent()
}
}
}
.backgroundColor($r('app.color.white'))
.animationDuration(0)
.onChange((index: number) => {
this.currentIndex = index
trackTabFirstClick(index === 0 ? "评论":"关注")
})
.vertical(false)
.barHeight("77lpx")
Column() {
// 页签
Row({ space: 7 }) {
Scroll() {
Row() {
this.TabBuilder(0,"评论")
this.TabBuilder(1,"关注")
.backgroundColor($r('app.color.white'))
.animationDuration(0)
.onChange((index: number) => {
this.currentIndex = index
trackTabFirstClick(index === 0 ? "评论":"关注")
})
.vertical(false)
.barHeight("77lpx")
Column() {
// 页签
Row({ space: 7 }) {
Scroll() {
Row() {
this.TabBuilder(0,"评论")
this.TabBuilder(1,"关注")
}
.justifyContent(FlexAlign.Start)
}
.justifyContent(FlexAlign.Start)
.align(Alignment.Start)
.scrollable(ScrollDirection.Horizontal)
.scrollBar(BarState.Off)
.width('100%')
.padding({left:'31lpx'})
}
.align(Alignment.Start)
.scrollable(ScrollDirection.Horizontal)
.scrollBar(BarState.Off)
.alignItems(VerticalAlign.Bottom)
.width('100%')
.padding({left:'31lpx'})
}
.alignItems(VerticalAlign.Bottom)
.backgroundColor($r('app.color.white'))
.alignItems(HorizontalAlign.Start)
.width('100%')
.height('77lpx')
}
.backgroundColor($r('app.color.white'))
.alignItems(HorizontalAlign.Start)
.width('100%')
.height('77lpx')
}
}.width("100%")
}
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.width('100%')
.layoutWeight(1)
}.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
}.width('100%')
.layoutWeight(1)
}else{
Column(){
CustomTitleUI({ titleName: "" })
EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => {
this.isConnectNetwork = NetworkUtil.isNetConnected()
if(this.isConnectNetwork){
this.getUserInfo()
}.width("100%")
}
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.width('100%')
.layoutWeight(1)
}
},})
.layoutWeight(1)
.width('100%')
.margin({top:px2vp(this.topSafeHeight)})
}.width('100%')
.padding({bottom:px2vp(this.bottomSafeHeight)})
.layoutWeight(1)
}else{
Column(){
CustomTitleUI({ titleName: "" })
EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => {
this.isConnectNetwork = NetworkUtil.isNetConnected()
if(this.isConnectNetwork){
this.getUserInfo()
}
},})
.layoutWeight(1)
.width('100%')
}
}
}
}
@Builder MineHomeTitleTransparent() {
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/MineMessagePage.ets
View file @
1dd38fd
...
...
@@ -4,6 +4,8 @@ import TrackingPageBrowseUtils from '../utils/TrackingPageBrowseUtils'
@Entry
@Component
struct MineMessagePage {
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
onPageShow(): void {
TrackingPageBrowseUtils.TrackingPageBrowseExposureStart()
...
...
@@ -15,7 +17,12 @@ struct MineMessagePage {
build() {
Column(){
MessageListUI()
}
Column(){
MessageListUI()
}
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/MultiPictureListPage.ets
View file @
1dd38fd
...
...
@@ -140,7 +140,6 @@ export struct MultiPictureListPage {
.id('e_picture_container')
// 设置顶部绘制延伸到状态栏
// 设置底部绘制延伸到导航条
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
}
/**
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/OtherNormalUserHomePage.ets
View file @
1dd38fd
...
...
@@ -70,7 +70,6 @@ struct OtherNormalUserHomePage {
.width('100%')
.height('355lpx')
.objectFit(ImageFit.Cover)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
Row()
.height(px2vp(this.topSafeHeight))
...
...
@@ -78,7 +77,6 @@ struct OtherNormalUserHomePage {
.backgroundColor($r('app.color.white'))
.visibility(this.tileOpacity > 0 ? 0 : 1)
.opacity(this.tileOpacity )
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
}
Column(){
...
...
@@ -254,7 +252,7 @@ struct OtherNormalUserHomePage {
.scrollBar(BarState.Off)
.width('100%')
.layoutWeight(1)
}
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
}
}.width('100%')
.layoutWeight(1)
}else{
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/SearchPage.ets
View file @
1dd38fd
...
...
@@ -10,6 +10,8 @@ struct SearchPage {
@State fromTabName: string = 'NEWS';
pageShowTime:number = 0;
pageHideTime:number = 0;
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
onPageShow() {
this.fromTabName = this.params?.['tabName'];
...
...
@@ -25,9 +27,13 @@ struct SearchPage {
build() {
Column(){
SearchComponent({fromTabName:$fromTabName})
}.height('100%')
.width('100%')
.backgroundColor($r('app.color.white'))
Column(){
SearchComponent({fromTabName:$fromTabName})
}.height('100%')
.width('100%')
.backgroundColor($r('app.color.white'))
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/SubscribeMessagePage.ets
View file @
1dd38fd
...
...
@@ -5,11 +5,19 @@ const TAG = "SubscribeMessagePage"
@Entry
@Component
struct SubscribeMessagePage {
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
build() {
Column(){
SubscribeMessageComponent()
}.height("100%")
.width("100%")
Column(){
SubscribeMessageComponent()
}.height("100%")
.width("100%")
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/VisitorCommentPage.ets
View file @
1dd38fd
...
...
@@ -68,7 +68,6 @@ struct VisitorCommentPage {
.width("100%")
.height("100%")
.backgroundColor($r('app.color.white'))
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
CustomPullToRefresh({
alldata:this.data,
scroller:this.scroller,
...
...
Please
register
or
login
to post a comment