yangchenggong1_wd

desc:fix bug关注

... ... @@ -9,13 +9,12 @@ export default struct MinePageMoreFunctionUI {
build() {
Column() {
Column() {
Text(`更多功能`)
.width('456lpx')
.height('38lpx')
.fontColor($r('app.color.color_666666'))
Text("更多功能")
.fontColor($r('app.color.color_222222'))
.fontSize('29lpx')
.margin({ left: "31lpx" })
.fontWeight('600lpx')
.lineHeight('46lpx')
.fontWeight(FontWeight.Bold)
}.height('92lpx')
.width('100%')
.justifyContent(FlexAlign.Center)
... ...
... ... @@ -85,6 +85,7 @@ export struct FollowFirstTabsComponent{
.vertical(false)
.barMode(BarMode.Scrollable)
.barWidth('100%')
.barBackgroundColor($r('app.color.white'))
.barHeight('84lpx')
.animationDuration(0)
.onChange((index: number) => {
... ...
... ... @@ -70,9 +70,15 @@ export struct FollowListDetailUI {
Column() {
if (this.count === 0) {
if (this.isGetRequest == true) {
EmptyComponent({ emptyType: 14,emptyHeight:"100%" })
.layoutWeight(1)
.width('100%')
if(this.creatorDirectoryId === -1){
EmptyComponent({ emptyType: 14,emptyHeight:"100%" })
.layoutWeight(1)
.width('100%')
}else{
EmptyComponent({ emptyType: 16,emptyHeight:"100%" })
.layoutWeight(1)
.width('100%')
}
}
} else {
... ...
import { FollowListItem, FollowThirdListItem } from '../../../viewmodel/FollowListItem'
import { FollowListDetailUI } from './FollowListDetailUI'
import measure from '@ohos.measure'
@Component
export struct FollowThirdTabsComponent{
... ... @@ -11,8 +12,8 @@ export struct FollowThirdTabsComponent{
private controller: TabsController = new TabsController()
fontColor: string = '#999999'
selectedFontColor: string = '#000000'
fontColor: string = '#666666'
selectedFontColor: string = '#222222'
build(){
if(this.data != null){
... ... @@ -26,32 +27,44 @@ export struct FollowThirdTabsComponent{
@Builder TabBuilder(index: number, item: FollowThirdListItem) {
Column(){
Text(item.directoryName)
.fontSize('30lpx')
.textAlign(TextAlign.Center)
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight('38lpx')
.backgroundColor($r('app.color.color_F9F9F9'))
.padding('13lpx')
.maxLines(1)
Row(){
Image(index === 0?$r("app.media.ic_collect_left_left"):(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?$r('app.media.ic_collect_right_left'):$r('app.media.ic_collect_mid_left')))
.width(index === 0?"19lpx":"35lpx")
.height('61lpx')
.objectFit(ImageFit.Fill)
Text(item.directoryName)
.fontSize('27lpx')
.fontWeight(this.currentIndex === index ? "600lpx" : "400lpx")
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight('35lpx')
.backgroundImage($r('app.media.ic_collect_mid'))
.backgroundImageSize(ImageSize.Cover)
.padding({top:"13lpx",bottom:"13lpx"})
Image(index === 0?$r("app.media.ic_collect_left_right"):(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?$r('app.media.ic_collect_right_right'):$r('app.media.ic_collect_mid_right')))
.width(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?"19lpx":"35lpx")
.height('61lpx')
.objectFit(ImageFit.Fill)
}
}
.onClick(()=>{
this.currentIndex = index
this.controller.changeIndex(this.currentIndex)
})
.height('84lpx')
.margin({right:'9lpx'})
.padding({left:'20lpx',right:index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?"20lpx":"0lpx"})
.justifyContent(FlexAlign.Center)
.offset({x:index === 0?"0lpx":"-5lpx"})
.height('80lpx')
.justifyContent(FlexAlign.End)
}
@Builder FollowThirdUI(){
Column(){
Column() {
// 页签
Row({ space: 7 }) {
Row() {
Scroll() {
Row() {
ForEach(this.data[this.firstIndex].children[this.secondIndex].children, (item: FollowThirdListItem, index: number ) => {
... ... @@ -63,8 +76,8 @@ export struct FollowThirdTabsComponent{
.align(Alignment.Start)
.scrollable(ScrollDirection.Horizontal)
.scrollBar(BarState.Off)
.width('90%')
.padding({left:'11lpx'})
.width('100%')
.padding({left:'31lpx',right:'48lpx'})
}
.alignItems(VerticalAlign.Bottom)
.width('100%')
... ... @@ -77,11 +90,6 @@ export struct FollowThirdTabsComponent{
ForEach(this.data[this.firstIndex].children[this.secondIndex].children, (item: FollowThirdListItem, index: number ) => {
TabContent(){
Column(){
Divider().width('100%')
.height('2lpx')
.strokeWidth('1lpx')
.backgroundColor($r('app.color.color_EDEDED'))
.margin({left:'20lpx'})
FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].children[this.secondIndex].children[index].id})
}
}
... ... @@ -99,4 +107,19 @@ export struct FollowThirdTabsComponent{
}
}
getMeasureText(text: string,index:number) {
let width = measure.measureText({
textContent: text,
fontSize: px2fp(27),
lineHeight: px2fp(35)
})
if(index === 0){
return width + 19+ 35
}else if(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1){
return width + 35+ 35
}else{
return width + 35+ 19
}
}
}
\ No newline at end of file
... ...
import { ContentDTO, Params } from 'wdBean';
import { DateTimeUtils, LazyDataSource, SPHelper,UserDataLocal } from 'wdKit';
import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter';
import { WDRouterPage, WDRouterRule } from 'wdRouter';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
import { CommentListItem } from '../../../viewmodel/CommentListItem';
import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem';
... ... @@ -106,6 +105,7 @@ export struct HomePageBottomComponent{
EmptyComponent({emptyType:14})
.layoutWeight(1)
.width('100%')
.offset({y:"-200lpx"})
}
}.layoutWeight(1)
.justifyContent(FlexAlign.Start)
... ... @@ -114,6 +114,7 @@ export struct HomePageBottomComponent{
EmptyComponent({emptyType:11})
.layoutWeight(1)
.width('100%')
.offset({y:"-200lpx"})
}
}
}else{
... ...