王士厅

fix: '我的'个人信息ui修改,更新版本号7.3.9.6

... ... @@ -2,8 +2,8 @@
"app": {
"bundleName": "com.peopledailychina.hosactivity",
"vendor": "$string:app_vendor",
"versionCode": 7395,
"versionName": "7.3.9.5",
"versionCode": 7396,
"versionName": "7.3.9.6",
"icon": "$media:app_icon",
"label": "$string:app_name"
}
... ...
... ... @@ -31,62 +31,44 @@ export struct FollowChildComponent{
Stack({alignContent: Alignment.Bottom}){
Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.icon_default_head_mater'):this.data.headPhotoUrl)
.objectFit(ImageFit.Auto)
// .width('92lpx')
.width(92)
// .height('92lpx')
.height(92)
.width(48)
.height(48)
.borderRadius(50)
// .borderWidth('1lpx')
.borderWidth(1)
.borderColor($r('app.color.color_0D000000'))
Row(){
Image(this.data.authIcon)
// .width('32lpx')
.width(32)
// .height('32lpx')
.height(32)
.width(16.89)
.height(16.89)
.objectFit(ImageFit.Cover)
}
// .width('92lpx')
.width(92)
.width(48)
.justifyContent(FlexAlign.End)
}
// .width('92lpx')
.width(92)
// .height('92lpx')
.height(92)
// .margin({right:'15lpx'})
.margin({right: 15})
.width(48)
.height(48)
.margin({right: 11})
Column(){
Text(this.data.cnUserName)
// .fontWeight('400lpx')
.fontWeight(400)
// .fontSize('31lpx')
.fontSize(31)
// .lineHeight('38lpx')
.lineHeight(38)
.fontSize(18)
.lineHeight(22)
.fontColor($r('app.color.color_222222'))
.maxLines(1)
// .margin({bottom:'8lpx'})
.margin({bottom: 8})
.margin({bottom: 2})
Text(`粉丝${this.data.cnFansNum}`)
.fontColor($r('app.color.color_B0B0B0'))
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('400lpx')
.fontSize(12)
.fontWeight(400)
// .lineHeight('31lpx')
.lineHeight(31)
// .margin({bottom:'8lpx'})
.margin({bottom: 8})
.lineHeight(16)
Text(`${this.data.introduction}`)
.fontColor($r('app.color.color_B0B0B0'))
// .fontSize('23lpx')
.fontSize(23)
.fontSize(12)
.lineHeight(16)
.maxLines(2)
.textAlign(TextAlign.Start)
.textOverflow({ overflow: TextOverflow.Ellipsis })
... ... @@ -110,30 +92,23 @@ export struct FollowChildComponent{
}else {
Text(`已关注`)
.fontColor($r('app.color.color_CCCCCC'))
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('500lpx')
.fontSize(12)
.fontWeight(500)
// .lineHeight('35lpx')
.lineHeight(35)
.lineHeight(18)
}
}
.justifyContent(FlexAlign.Center)
// .width('100lpx')
.width(100)
.width(52)
.backgroundColor($r("app.color.color_F5F5F5"))
// .borderRadius("6lpx")
.borderRadius(6)
// .height('46lpx')
.height(46)
.borderRadius(3)
.height(24)
.onClick(()=>{
if (this.isLoadingAttention) return
this.isLoadingAttention = true
this.followOperation()
})
// .margin({top:'29lpx'})
.margin({top: 29})
.margin({top: 26})
}else{
Row(){
if(this.isLoadingAttention) {
... ... @@ -141,36 +116,25 @@ export struct FollowChildComponent{
.width(20)
.height(20)
.color($r('app.color.main_red'))
}else {
} else {
Image($r('app.media.follow_icon'))
// .margin({right:'4lpx'})
.margin({right: 4})
// .width('23lpx')
.width(23)
// .height('23lpx')
.height(23)
.margin({right: 2})
.width(12)
.height(12)
Text(`关注`)
.fontColor($r('app.color.color_ED2800'))
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('500lpx')
.fontSize(12)
.fontWeight(500)
// .lineHeight('35lpx')
.lineHeight(35)
.lineHeight(18)
}
}.borderColor($r('app.color.color_1AED2800'))
// .borderRadius('6lpx')
.borderRadius(6)
// .borderWidth('2lpx')
.borderWidth(2)
.borderRadius(3)
.borderWidth(1)
.justifyContent(FlexAlign.Center)
// .width('100lpx')
.width(100)
// .height('46lpx')
.height(46)
// .margin({top:'29lpx'})
.margin({top: 29})
.width(52)
.height(24)
.margin({top: 26})
.onClick(()=>{
if (this.isLoadingAttention) return
this.isLoadingAttention = true
... ... @@ -179,23 +143,19 @@ export struct FollowChildComponent{
})
}
}
// .padding({top:'27lpx'})
.padding({top: 27})
.padding({top: 14})
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
.alignItems(VerticalAlign.Top)
}
// .height(`${this.columnHeight}lpx`)
.height(`${this.columnHeight}`)
.justifyContent(FlexAlign.Start)
Divider()
.width('100%')
// .height('2lpx')
.height(2)
.height(1)
.color($r('app.color.color_F5F5F5'))
// .strokeWidth('1lpx')
.strokeWidth(1)
}.width('100%')
... ... @@ -208,65 +168,51 @@ export struct FollowChildComponent{
Stack({alignContent: Alignment.Bottom}){
Image(StringUtils.isEmpty(this.data.headPhotoUrl)?$r('app.media.icon_default_head_mater'):this.data.headPhotoUrl)
.objectFit(ImageFit.Auto)
// .width('92lpx')
.width(92)
// .height('92lpx')
.height(92)
.width(48)
.height(48)
.borderRadius(50)
// .borderWidth('1lpx')
.borderWidth(1)
.borderColor($r('app.color.color_0D000000'))
Row(){
Image(this.data.authIcon)
// .width('32lpx')
.width(32)
// .height('32lpx')
.height(32)
.width(16.89)
.height(16.89)
.objectFit(ImageFit.Cover)
}
// .width('92lpx')
.width(92)
.width(48)
.justifyContent(FlexAlign.End)
}
// .width('92lpx')
.width(92)
// .height('92lpx')
.height(92)
// .margin({right:'15lpx'})
.margin({right: 15})
.width(48)
.height(48)
.margin({right: 11})
Column(){
Text(this.data.cnUserName)
// .fontWeight('400lpx')
.fontWeight(400)
// .fontSize('31lpx')
.fontSize(31)
// .lineHeight('38lpx')
.lineHeight(38)
.fontSize(18)
.lineHeight(22)
.fontColor($r('app.color.color_222222'))
.maxLines(1)
// .margin({bottom:'12lpx'})
.margin({bottom: 12})
.margin({bottom: 2})
Row(){
if(this.data.cnFansNum!="0"){
Text(`粉丝${this.data.cnFansNum}`)
.fontColor($r('app.color.color_B0B0B0'))
// .fontSize('23lpx')
.fontSize(23)
.fontSize(12)
.fontWeight(400)
.lineHeight(16)
}
if(this.data.cnFansNum!="0" && StringUtils.isNotEmpty(this.data.introduction)){
Image($r("app.media.point"))
// .width('31lpx')
.width(31)
// .height('31lpx')
.height(31)
.width(16)
.height(16)
.objectFit(ImageFit.Auto)
}
Text(`${this.data.introduction}`)
.fontColor($r('app.color.color_B0B0B0'))
// .fontSize('23lpx')
.fontSize(23)
.fontSize(12)
.lineHeight(16)
.layoutWeight(1)
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
... ... @@ -292,22 +238,16 @@ export struct FollowChildComponent{
}else {
Text(`已关注`)
.fontColor($r('app.color.color_CCCCCC'))
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('500lpx')
.fontSize(12)
.fontWeight(500)
// .lineHeight('35lpx')
.lineHeight(35)
.lineHeight(18)
}
}
.backgroundColor($r("app.color.color_F5F5F5"))
.justifyContent(FlexAlign.Center)
// .borderRadius("6lpx")
.borderRadius(6)
// .width('100lpx')
.width(100)
// .height('46lpx')
.height(46)
.borderRadius(3)
.width(52)
.height(24)
.onClick(()=>{
if (this.isLoadingAttention) return
this.isLoadingAttention = true
... ... @@ -323,31 +263,21 @@ export struct FollowChildComponent{
.color($r('app.color.main_red'))
}else {
Image($r('app.media.follow_icon'))
// .margin({right:'4lpx'})
.margin({right: 4})
// .width('23lpx')
.width(23)
// .height('23lpx')
.height(23)
.margin({right: 2})
.width(12)
.height(12)
Text(`关注`)
.fontColor($r('app.color.color_ED2800'))
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('500lpx')
.fontSize(12)
.fontWeight(500)
// .lineHeight('35lpx')
.lineHeight(35)
.lineHeight(18)
}
}.borderColor($r('app.color.color_1AED2800'))
// .borderRadius('6lpx')
.borderRadius(6)
// .borderWidth('2lpx')
.borderWidth(2)
.borderRadius(3)
.borderWidth(1)
.justifyContent(FlexAlign.Center)
// .width('100lpx')
.width(100)
// .height('46lpx')
.height(46)
.width(52)
.height(24)
.onClick(()=>{
if (this.isLoadingAttention) return
this.isLoadingAttention = true
... ... @@ -358,21 +288,16 @@ export struct FollowChildComponent{
}
}
.width('100%')
// .height('92lpx')
.height(92)
.justifyContent(FlexAlign.SpaceBetween)
}
// .height('146lpx')
.height(146)
.height(76)
.justifyContent(FlexAlign.Center)
Divider()
.width('100%')
// .height('2lpx')
.height(2)
.height(1)
.color($r('app.color.color_F5F5F5'))
// .strokeWidth('1lpx')
.strokeWidth(1)
}.width('100%')
... ...
... ... @@ -24,45 +24,31 @@ export struct ChildCommentComponent {
Image(this.data.fromUserHeader&&this.data.fromUserHeader.length>0?this.data.fromUserHeader:(this.data.fromUserType === 1?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon')))
.alt($r('app.media.default_head'))
.objectFit(ImageFit.Auto)
// .width('69lpx')
.width(69)
// .height('69lpx')
.height(69)
.width(35.47)
.height(35.47)
.borderRadius(50)
Image(this.levelHead)
// .width('89lpx')
.width(89)
// .height('89lpx')
.height(89)
.width(54)
.height(54)
.objectFit(ImageFit.Cover)
.borderRadius(50)
}
// .width('89lpx')
.width(89)
// .height('89lpx')
.height(89)
// .margin({ right: '3lpx' })
.margin({ right: 3 })
.width(54)
.height(54)
.margin({ right: 5 })
Column() {
Text(this.data.fromUserName)
// .fontSize('25lpx')
.fontSize(25)
// .lineHeight('35lpx')
.lineHeight(35)
// .fontWeight('600lpx')
.fontSize(15)
.lineHeight(21)
.fontWeight(600)
.fontColor($r('app.color.color_222222'))
// .margin({ bottom: '6lpx' })
.margin({ bottom: 6 })
.margin({ bottom: 1 })
.maxLines(1)
Text(`${this.data.createTime}`)
.fontColor($r('app.color.color_B0B0B0'))
// .fontSize('23lpx')
.fontSize(23)
// .lineHeight('31lpx')
.lineHeight(31)
// .fontWeight('400lpx')
.fontSize(12)
.lineHeight(16)
.fontWeight(400)
.maxLines(1)
}.layoutWeight(1)
... ... @@ -72,21 +58,15 @@ export struct ChildCommentComponent {
if (this.data.checkStatus != 3) {
Row() {
Text(this.data.likeNum.toString())
// .fontWeight("500lpx")
.fontWeight(500)
// .fontSize("27lpx")
.fontSize(27)
// .lineHeight("31lpx")
.lineHeight(31)
.fontSize(14)
.lineHeight(16)
.fontColor(this.data.like_status === 0 ? $r('app.color.color_666666') : $r('app.color.color_ED2800'))
// .margin({ right: '8lpx' })
.margin({ right: 8 })
.margin({ right: 4 })
.visibility(this.data.likeNum <= 0||StringUtils.isEmpty(this.data.likeNum.toString()) ? Visibility.Hidden : Visibility.Visible)
Image(this.data.like_status === 0 ? $r('app.media.like_default_status') : $r('app.media.liked_status'))
// .width('31lpx')
.width(31)
// .height('31lpx')
.height(31)
.width(16)
.height(16)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.Medium)
.borderRadius(50)
... ... @@ -95,13 +75,10 @@ export struct ChildCommentComponent {
})
}
}
// .margin({ bottom: '5lpx' })
.margin({ bottom: 5 })
.width('100%')
// .height('108lpx')
.height(108)
// .padding({ left: '31lpx', right: '31lpx' })
.padding({ left: 31, right: 31 })
.height(56)
.padding({ left: 11, right: 15 })
Row() {
if (this.isExpand) {
... ... @@ -124,11 +101,11 @@ export struct ChildCommentComponent {
.textStyle()
}
}
// .padding({ left: '31lpx', right: '31lpx' })
.padding({ left: 31, right: 31 })
.padding({ left: 15, right: 15 })
.width('100%')
Column() {
Column(){
if (StringUtils.isNotEmpty(this.data.parentCommentContent)) {
//父评论
Row() {
... ... @@ -136,20 +113,14 @@ export struct ChildCommentComponent {
Text() {
Span(`@${this.data.parentCommentUserName}:`)
.fontColor($r('app.color.color_000000'))
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('27lpx')
.fontSize(27)
// .lineHeight('40lpx')
.lineHeight(40)
.fontSize(14)
.lineHeight(21)
Span(this.data.parentCommentContent)
.fontColor($r('app.color.color_000000'))
// .fontWeight('400lpx')
.fontWeight(400)
// .fontSize('27lpx')
.fontSize(27)
// .lineHeight('40lpx')
.lineHeight(40)
.fontSize(14)
.lineHeight(21)
}
.width('100%')
.textAlign(TextAlign.Start)
... ... @@ -157,24 +128,21 @@ export struct ChildCommentComponent {
Text() {
Span(`@${this.data.parentCommentUserName}:`)
.fontColor($r('app.color.color_000000'))
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('27lpx')
.fontSize(27)
// .lineHeight('40lpx')
.lineHeight(40)
.fontWeight(400)
.fontSize(14)
.lineHeight(21)
Span(this.clipText(this.data.parentCommentContent, 31, 5, 630, 1))
.fontColor($r('app.color.color_000000'))
// .fontWeight('400lpx')
.fontWeight(400)
// .fontSize('27lpx')
.fontSize(27)
// .lineHeight('40lpx')
.lineHeight(40)
.fontSize(14)
.lineHeight(21)
if (this.isOverLinesParent) {
Span('...展开')
Span('... 展开')
.fontColor($r('app.color.color_999999'))
.fontWeight(400)
.fontSize(14)
.lineHeight(21)
.onClick(() => {
this.isExpandParent = true
})
... ... @@ -186,18 +154,13 @@ export struct ChildCommentComponent {
}
}
.width('100%')
// .padding({ top: '23lpx', bottom: '15lpx', right: '23lpx' })
.padding({ top: 23, bottom: 15, right: 23 })
Divider()
.width('100%')
// .height('1lpx')
.height(1)
// .strokeWidth('1lpx')
.strokeWidth(1)
.height(0.5)
.strokeWidth(0.5)
.backgroundColor($r('app.color.color_EDEDED'))
// .margin({ top: '4lpx', bottom: '4lpx' })
.margin({ top: 4, bottom: 4 })
.margin({ top: 10, bottom: 10 })
}
Column() {
... ... @@ -205,23 +168,17 @@ export struct ChildCommentComponent {
Row() {
Image($r('app.media.comment_link_icon'))
.objectFit(ImageFit.Auto)
// .width('31lpx')
.width(31)
// .height('31lpx')
.height(31)
// .margin({ right: '10lpx' })
.margin({ right: 10 })
.width(16)
.height(16)
.margin({ right: 5 })
Column() {
Row() {
Text(`${this.data.targetTitle}`)
// .fontWeight('400lpx')
.fontWeight(400)
.fontColor($r('app.color.color_666666'))
// .lineHeight('38lpx')
.lineHeight(38)
// .fontSize('27lpx')
.fontSize(27)
.lineHeight(20)
.fontSize(14)
.layoutWeight(1)
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
... ... @@ -232,17 +189,10 @@ export struct ChildCommentComponent {
}.layoutWeight(1)
Image($r('app.media.arrow_icon_right'))
// .margin({ right: '4lpx' })
.margin({ right: 4 })
// .width('23lpx')
.width(23)
// .height('23lpx')
.height(23)
.margin({right: 23})
.width(12)
.height(12)
}
.width('100%')
// .height('69lpx')
.height(69)
.justifyContent(FlexAlign.SpaceBetween)
.onClick(()=>{
let content = getParams(this.data)
... ... @@ -251,24 +201,19 @@ export struct ChildCommentComponent {
})
}
// .height('69lpx')
.height(69)
.justifyContent(FlexAlign.Center)
}
// .margin({ top: '19lpx', bottom: '31lpx', left: '31lpx', right: '31lpx' })
.margin({ top: 19, bottom: 31, left: 31, right: 31 })
// .padding({ left: '23lpx' })
.padding({ left: 23 })
// .width('662lpx')
.width(662)
.backgroundColor($r('app.color.color_F5F5F5'))
.padding(12)
.width("100%")
}
.width("100%")
.padding({ top: 10, bottom: 16, left: 15, right: 15 })
if (!this.isLastItem) {
Divider().width('100%')
// .height('12lpx')
.height(12)
// .strokeWidth('12lpx')
.strokeWidth(12)
.height(6)
.strokeWidth(6)
.color($r('app.color.color_F5F5F5'))
}
}
... ... @@ -334,15 +279,10 @@ export struct ChildCommentComponent {
@Extend(Text)
function textStyle() {
// .width('630lpx')
.width(630)
// .fontSize('31lpx')
.fontSize(31)
// .fontWeight('400lpx')
.fontSize(16)
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
// .lineHeight('46lpx')
.lineHeight(46)
.lineHeight(24)
}
function getParams(item: CommentListItem) : ContentDTO{
... ...
... ... @@ -37,7 +37,6 @@ export struct HomePageBottomCommentComponent {
if (this.isGetRequest == true) {
Text().backgroundColor($r('app.color.color_EDEDED'))
.width('100%')
// .height('2lpx')
.height(2)
}
if (this.count === 0) {
... ... @@ -45,7 +44,6 @@ export struct HomePageBottomCommentComponent {
EmptyComponent({ emptyType: 11 })
.layoutWeight(1)
.width('100%')
// .offset({ y: "-200lpx" })
.offset({ y: -200 })
}
} else {
... ... @@ -67,7 +65,7 @@ export struct HomePageBottomCommentComponent {
}
},
onLoadMore:(resolve)=> {
console.log(TAG, "触底了");
// console.log(TAG, "触底了");
if (!this.isLoading) {
this.isLoading = true
//加载分页数据
... ... @@ -138,7 +136,7 @@ export struct HomePageBottomCommentComponent {
this.getCommentListStatus(value)
}
}).catch((err: Error) => {
console.log(TAG, "请求失败")
// console.log(TAG, "请求失败")
this.isLoading = false
this.isGetRequest = true
})
... ... @@ -236,7 +234,7 @@ export struct HomePageBottomCommentComponent {
this.isLoading = false
this.isGetRequest = true
}).catch((err: Error) => {
console.log(TAG, "请求失败")
// console.log(TAG, "请求失败")
this.isLoading = false
this.isGetRequest = true
})
... ...
... ... @@ -71,7 +71,6 @@ export struct HomePageBottomFollowComponent {
if (this.isGetRequest == true) {
Text().backgroundColor($r('app.color.color_EDEDED'))
.width('100%')
// .height('2lpx')
.height(2)
}
... ... @@ -81,38 +80,28 @@ export struct HomePageBottomFollowComponent {
EmptyComponent({ emptyType: 14 })
.layoutWeight(1)
.width('100%')
// .offset({ y: "-200lpx" })
.offset({ y: -200 })
}
Row() {
Text("关注更多人民号")
// .fontWeight('400lpx')
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
// .lineHeight('38lpx')
.lineHeight(38)
// .fontSize('27lpx')
.fontSize(27)
.lineHeight(20)
.fontSize(14)
.textAlign(TextAlign.Center)
// .margin({ right: '4lpx' })
.margin({ right: 4 })
.margin({ right: 2 })
Image($r('app.media.arrow_icon_right'))
.objectFit(ImageFit.Auto)
// .width('27lpx')
.width(27)
// .height('27lpx')
.height(27)
.width(14)
.height(14)
}
// .height('69lpx')
.height(69)
// .width('659lpx')
.width(659)
.height(36)
.width(343)
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
.backgroundColor($r('app.color.color_F5F5F5'))
// .margin({ top: '31lpx', bottom: '4lpx' })
.margin({ top: 31, bottom: 4 })
.margin({ top: 10, bottom: 2 })
.onClick(() => {
let params = { 'index': "1" } as Record<string, string>
WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params)
... ... @@ -137,7 +126,7 @@ export struct HomePageBottomFollowComponent {
}
},
onLoadMore:(resolve)=> {
console.log(TAG, "触底了");
// console.log(TAG, "触底了");
if (!this.isLoading) {
this.isLoading = true
//加载分页数据
... ... @@ -157,32 +146,23 @@ export struct HomePageBottomFollowComponent {
ListItem() {
Row() {
Text("关注更多人民号")
// .fontWeight('400lpx')
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
// .lineHeight('38lpx')
.lineHeight(38)
// .fontSize('27lpx')
.fontSize(27)
.lineHeight(20)
.fontSize(14)
.textAlign(TextAlign.Center)
// .margin({ right: '4lpx' })
.margin({ right: 4 })
.margin({ right: 2 })
Image($r('app.media.arrow_icon_right'))
.objectFit(ImageFit.Auto)
// .width('27lpx')
.width(27)
// .height('27lpx')
.height(27)
.width(14)
.height(14)
}
// .height('69lpx')
.height(69)
// .width('659lpx')
.width(659)
.height(36)
.width(343)
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
.backgroundColor($r('app.color.color_F5F5F5'))
// .margin({ top: '31lpx', bottom: '4lpx' })
.margin({ top: 31, bottom: 4 })
.margin({ top: 10, bottom: 2 })
}.onClick(() => {
let params = { 'index': "1" } as Record<string, string>
WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params)
... ... @@ -202,8 +182,7 @@ export struct HomePageBottomFollowComponent {
}
}
.cachedCount(5)
// .padding({ left: '31lpx', right: '31lpx' })
.padding({ left: 31, right: 31 })
.padding({ left: 16, right: 16 })
.layoutWeight(1)
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
... ...
... ... @@ -7,29 +7,27 @@ export struct ListHasNoMoreDataUI{
Row(){
Text("已显示全部内容")
.fontColor($r('app.color.color_999999'))
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('23lpx')
.fontSize(23)
.fontWeight(400)
.fontSize(14)
.lineHeight(20)
}.justifyContent(FlexAlign.Center)
.width('100%')
// .margin({top:'20lpx',bottom:'20lpx'})
.margin({top: 20,bottom: 20})
.margin({top: 24,bottom: 24})
}else if (this.style === 2){
Column(){
Image($r('app.media.empty_icon'))
// .width('200lpx')
.width(200)
// .height('200lpx')
.height(200)
.width(160)
.height(112)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
Text("暂无内容")
.fontColor($r('app.color.color_999999'))
// .fontWeight('500lpx')
.fontWeight(500)
// .fontSize('23lpx')
.fontSize(23)
.fontWeight(400)
.fontSize(14)
.lineHeight(20)
.margin({
top: 6
})
}
.justifyContent(FlexAlign.Center)
.width('100%')
... ...
... ... @@ -103,24 +103,20 @@ struct MineHomePage {
Stack(){
Image(this.headPhotoUrl&&this.headPhotoUrl.length>0?this.headPhotoUrl:(this.userType === "1"?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon')))
.alt($r('app.media.default_head'))
.width(60)
.height(60)
.width(64)
.height(64)
.objectFit(ImageFit.Auto)
.clip(new Circle({ width: 60, height: 60 }))
.clip(new Circle({ width: 64, height: 64 }))
Image(this.levelHead)
// .width('165lpx')
.width(165)
// .height('165lpx')
.height(165)
.width(90)
.height(90)
.objectFit(ImageFit.Auto)
}.onClick(()=>{
let params = {'headPhotoUrl': this.headPhotoUrl} as Record<string, string>;
WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
})
// .width('165lpx')
.width(165)
// .height('165lpx')
.height(165)
.width(90)
.height(90)
Column() {
Row() {
... ... @@ -128,11 +124,8 @@ struct MineHomePage {
.fontColor($r('app.color.white'))
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
// .fontSize('38lpx')
.fontSize(38)
// .lineHeight('50lpx')
.lineHeight(50)
// .fontWeight('500lpx')
.fontSize(20)
.lineHeight(26)
.fontWeight(500)
.onClick(()=>{
let params: editModelParams = {
... ... @@ -144,24 +137,19 @@ struct MineHomePage {
if(this.levelId>0){
Text(`等级${this.levelId}`)
.fontColor($r('app.color.color_ED2800'))
// .fontSize('23lpx')
.fontSize(23)
.fontSize(12)
.lineHeight(18)
.fontWeight(500)
// .margin({ left: '10lpx' })
.margin({ left: 10 })
.margin({ left: 6 })
.backgroundImage($r("app.media.my_grade_bg"))
.backgroundImageSize(ImageSize.Cover)
// .padding({left:"17lpx",right:"8lpx"})
.padding({left: 17,right: 8})
// .height('35lpx')
.height(35)
.padding({left: 6,right: 6})
.height(18)
.borderRadius({topRight:2,bottomRight:2})
}
Blank()
}
// .width('507lpx')
.width(507)
Row() {
Row() {
... ... @@ -170,14 +158,11 @@ struct MineHomePage {
Text("阅读")
.textStyle2()
}
// .margin({ right: '15lpx' })
.margin({ right: 15 })
.margin({ right: 8 })
Divider()
// .height('19lpx')
.height(19)
// .width('2lpx')
.width(2)
.height(10)
.width(1)
.color($r('app.color.white'))
.vertical(true)
.opacity(0.4)
... ... @@ -187,14 +172,11 @@ struct MineHomePage {
Text("评论")
.textStyle2()
}
// .margin({ right: '15lpx', left: '15lpx' })
.margin({ right: 15, left: 15 })
.margin({ right: 8, left: 8 })
Divider()
// .height('19lpx')
.height(19)
// .width('2lpx')
.width(2)
.height(10)
.width(1)
.color($r('app.color.white'))
.vertical(true)
.opacity(0.4)
... ... @@ -204,14 +186,11 @@ struct MineHomePage {
Text("关注")
.textStyle2()
}
// .margin({ left: '15lpx' })
.margin({ left: 15 })
.margin({ left: 8 })
}
// .margin({ top: '23lpx' })
.margin({ top: 23 })
.margin({ top: 12 })
}.alignItems(HorizontalAlign.Start)
// .margin({ left: StringUtils.isEmpty(this.levelHead)?'32lpx':"3lpx" })
.margin({ left: StringUtils.isEmpty(this.levelHead) ? 32 : 3 })
.margin({ left: StringUtils.isEmpty(this.levelHead) ? 16 : 3 })
}
.onAreaChange((oldValue: Area, newValue: Area) => {
if (this.firstPositionY === 0) {
... ... @@ -225,36 +204,32 @@ struct MineHomePage {
}
})
.backgroundColor($r('app.color.color_transparent'))
// .height('184lpx')
.height(184)
.height(86)
.width('100%')
// .padding({ left: '6lpx' })
.padding({ left: 6 })
.padding({ left: 16 })
//用户简介区域
Column() {
Row() {
Text(this.isHasIntroduction?"简介:"+this.desc:this.desc)
// .fontSize('27lpx')
.fontSize(27)
.fontSize(14)
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
// .lineHeight('40lpx')
.lineHeight(40)
// .fontWeight('400lpx')
.lineHeight(21)
.fontWeight(400)
.fontColor(this.isHasIntroduction?$r('app.color.color_222222'):$r('app.color.color_999999'))
.textAlign(TextAlign.Start)
if(!this.isHasIntroduction){
Image($r('app.media.user_info_edit_icon'))
// .width('27lpx')
.width(27)
// .height('27lpx')
.height(27)
.width(14)
.height(14)
.interpolation(ImageInterpolation.High)
.objectFit(ImageFit.Auto)
.margin({
left: 6
})
}
}.onClick(()=>{
let params: editModelParams = {
... ... @@ -265,28 +240,22 @@ struct MineHomePage {
Text(`来到人民日报${this.registerTimeForDay}天`)
// .fontSize('23lpx')
.fontSize(23)
// .lineHeight('25lpx')
.lineHeight(25)
// .fontWeight('400lpx')
.fontSize(12)
.lineHeight(13)
.fontWeight(400)
.fontColor($r('app.color.color_999999'))
.textAlign(TextAlign.Start)
// .margin({ top: '15lpx' })
.margin({ top: 15 })
.margin({ top: 10 })
}
// .padding({ left: '31lpx',right:'31lpx',top:'19lpx',bottom:'31lpx'})
.padding({ left: 31,right: 31,top: 19,bottom: 31})
.padding({ left: 16,right: 16,top: 12,bottom: 12})
.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(12).color($r('app.color.color_F5F5F5')).strokeWidth(12)
Divider().width('100%').height(6).color($r('app.color.color_F5F5F5')).strokeWidth(6)
//tab 页面
Stack({ alignContent: Alignment.Top }){
... ... @@ -305,12 +274,11 @@ struct MineHomePage {
trackTabFirstClick(index === 0 ? "评论":"关注")
})
.vertical(false)
// .barHeight("77lpx")
.barHeight(77)
.barHeight(44)
Column() {
// 页签
Row({ space: 7 }) {
Row({ space: 30 }) {
Scroll() {
Row() {
this.TabBuilder(0,"评论")
... ... @@ -322,8 +290,7 @@ struct MineHomePage {
.scrollable(ScrollDirection.Horizontal)
.scrollBar(BarState.Off)
.width('100%')
// .padding({left:'31lpx'})
.padding({left: 31})
.padding({left: 16})
}
.alignItems(VerticalAlign.Bottom)
.width('100%')
... ... @@ -331,8 +298,7 @@ struct MineHomePage {
.backgroundColor($r('app.color.white'))
.alignItems(HorizontalAlign.Start)
.width('100%')
// .height('77lpx')
.height(77)
.height(44)
}
}.width("100%")
}
... ... @@ -343,7 +309,6 @@ struct MineHomePage {
}
.margin({top:px2vp(this.topSafeHeight)})
}.width('100%')
// .padding({bottom:px2vp(this.bottomSafeHeight)})
.layoutWeight(1)
} else {
Column(){
... ... @@ -477,26 +442,19 @@ struct MineHomePage {
@Builder TabBuilder(index: number, title: string) {
Stack(){
Text(title)
// .height('38lpx')
.height(38)
// .fontSize('33lpx')
.fontSize(33)
.fontWeight(this.currentIndex === index ? 600 : 400)
.height(20)
.fontSize(18)
.fontWeight(this.currentIndex === index ? 500 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
// .lineHeight('38lpx')
.lineHeight(38)
.lineHeight(20)
if(this.currentIndex === index){
Divider()
// .width('31lpx')
.width(31)
// .height('4lpx')
.height(4)
.width(14.2)
.height(2)
.color('#ED2800')
// .strokeWidth('4lpx')
.strokeWidth(4)
// .margin({top:'50lpx'})
.margin({top: 50})
.strokeWidth(2)
.margin({top: 35})
.id("divTag")
}
}.onClick(()=>{
... ... @@ -504,12 +462,9 @@ struct MineHomePage {
this.controller.changeIndex(this.currentIndex)
trackTabFirstClick(index === 0 ? "评论":"关注")
})
// .height('77lpx')
.height(77)
// .width('70lpx')
.width(70)
// .margin({right:'29lpx'})
.margin({right: 29})
.height(35)
.width(36)
.margin({right: 30})
}
/**
... ... @@ -589,8 +544,7 @@ struct MineHomePage {
@Extend(Text) function textStyle() {
.fontColor($r('app.color.white'))
.textStyleDefault()
// .margin({ right: '10lpx' })
.margin({ right: 10 })
.margin({ right: 6 })
}
@Extend(Text) function textStyle2() {
... ... @@ -600,12 +554,9 @@ struct MineHomePage {
@Extend(Text) function textStyleDefault() {
.textAlign(TextAlign.Start)
// .fontSize('23lpx')
.fontSize(23)
// .fontWeight('400lpx')
.fontSize(12)
.fontWeight(400)
// .lineHeight('31lpx')
.lineHeight(31)
.lineHeight(16)
}
function trackTabFirstClick(firstLevelTabName: string){
... ...