yangchenggong1_wd

desc:fix bug关注

@@ -9,13 +9,12 @@ export default struct MinePageMoreFunctionUI { @@ -9,13 +9,12 @@ export default struct MinePageMoreFunctionUI {
9 build() { 9 build() {
10 Column() { 10 Column() {
11 Column() { 11 Column() {
12 - Text(`更多功能`)  
13 - .width('456lpx')  
14 - .height('38lpx')  
15 - .fontColor($r('app.color.color_666666')) 12 + Text("更多功能")
  13 + .fontColor($r('app.color.color_222222'))
16 .fontSize('29lpx') 14 .fontSize('29lpx')
17 .margin({ left: "31lpx" }) 15 .margin({ left: "31lpx" })
18 - .fontWeight('600lpx') 16 + .lineHeight('46lpx')
  17 + .fontWeight(FontWeight.Bold)
19 }.height('92lpx') 18 }.height('92lpx')
20 .width('100%') 19 .width('100%')
21 .justifyContent(FlexAlign.Center) 20 .justifyContent(FlexAlign.Center)
@@ -85,6 +85,7 @@ export struct FollowFirstTabsComponent{ @@ -85,6 +85,7 @@ export struct FollowFirstTabsComponent{
85 .vertical(false) 85 .vertical(false)
86 .barMode(BarMode.Scrollable) 86 .barMode(BarMode.Scrollable)
87 .barWidth('100%') 87 .barWidth('100%')
  88 + .barBackgroundColor($r('app.color.white'))
88 .barHeight('84lpx') 89 .barHeight('84lpx')
89 .animationDuration(0) 90 .animationDuration(0)
90 .onChange((index: number) => { 91 .onChange((index: number) => {
@@ -70,9 +70,15 @@ export struct FollowListDetailUI { @@ -70,9 +70,15 @@ export struct FollowListDetailUI {
70 Column() { 70 Column() {
71 if (this.count === 0) { 71 if (this.count === 0) {
72 if (this.isGetRequest == true) { 72 if (this.isGetRequest == true) {
73 - EmptyComponent({ emptyType: 14,emptyHeight:"100%" })  
74 - .layoutWeight(1)  
75 - .width('100%') 73 + if(this.creatorDirectoryId === -1){
  74 + EmptyComponent({ emptyType: 14,emptyHeight:"100%" })
  75 + .layoutWeight(1)
  76 + .width('100%')
  77 + }else{
  78 + EmptyComponent({ emptyType: 16,emptyHeight:"100%" })
  79 + .layoutWeight(1)
  80 + .width('100%')
  81 + }
76 } 82 }
77 83
78 } else { 84 } else {
1 import { FollowListItem, FollowThirdListItem } from '../../../viewmodel/FollowListItem' 1 import { FollowListItem, FollowThirdListItem } from '../../../viewmodel/FollowListItem'
2 import { FollowListDetailUI } from './FollowListDetailUI' 2 import { FollowListDetailUI } from './FollowListDetailUI'
  3 +import measure from '@ohos.measure'
3 4
4 @Component 5 @Component
5 export struct FollowThirdTabsComponent{ 6 export struct FollowThirdTabsComponent{
@@ -11,8 +12,8 @@ export struct FollowThirdTabsComponent{ @@ -11,8 +12,8 @@ export struct FollowThirdTabsComponent{
11 12
12 13
13 private controller: TabsController = new TabsController() 14 private controller: TabsController = new TabsController()
14 - fontColor: string = '#999999'  
15 - selectedFontColor: string = '#000000' 15 + fontColor: string = '#666666'
  16 + selectedFontColor: string = '#222222'
16 17
17 build(){ 18 build(){
18 if(this.data != null){ 19 if(this.data != null){
@@ -26,32 +27,44 @@ export struct FollowThirdTabsComponent{ @@ -26,32 +27,44 @@ export struct FollowThirdTabsComponent{
26 27
27 @Builder TabBuilder(index: number, item: FollowThirdListItem) { 28 @Builder TabBuilder(index: number, item: FollowThirdListItem) {
28 Column(){ 29 Column(){
29 - Text(item.directoryName)  
30 - .fontSize('30lpx')  
31 - .textAlign(TextAlign.Center)  
32 - .fontWeight(this.currentIndex === index ? 600 : 400)  
33 - .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)  
34 - .lineHeight('38lpx')  
35 - .backgroundColor($r('app.color.color_F9F9F9'))  
36 - .padding('13lpx')  
37 - .maxLines(1) 30 + Row(){
  31 + 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')))
  32 + .width(index === 0?"19lpx":"35lpx")
  33 + .height('61lpx')
  34 + .objectFit(ImageFit.Fill)
  35 +
  36 + Text(item.directoryName)
  37 + .fontSize('27lpx')
  38 + .fontWeight(this.currentIndex === index ? "600lpx" : "400lpx")
  39 + .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
  40 + .lineHeight('35lpx')
  41 + .backgroundImage($r('app.media.ic_collect_mid'))
  42 + .backgroundImageSize(ImageSize.Cover)
  43 + .padding({top:"13lpx",bottom:"13lpx"})
  44 +
  45 + 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')))
  46 + .width(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?"19lpx":"35lpx")
  47 + .height('61lpx')
  48 + .objectFit(ImageFit.Fill)
  49 + }
38 } 50 }
39 .onClick(()=>{ 51 .onClick(()=>{
40 this.currentIndex = index 52 this.currentIndex = index
41 this.controller.changeIndex(this.currentIndex) 53 this.controller.changeIndex(this.currentIndex)
42 }) 54 })
43 - .height('84lpx')  
44 - .margin({right:'9lpx'})  
45 - .padding({left:'20lpx',right:index === this.data[this.firstIndex].children[this.secondIndex].children.length-1?"20lpx":"0lpx"})  
46 - .justifyContent(FlexAlign.Center) 55 + .offset({x:index === 0?"0lpx":"-5lpx"})
  56 + .height('80lpx')
  57 + .justifyContent(FlexAlign.End)
47 } 58 }
48 59
  60 +
  61 +
49 @Builder FollowThirdUI(){ 62 @Builder FollowThirdUI(){
50 63
51 Column(){ 64 Column(){
52 Column() { 65 Column() {
53 // 页签 66 // 页签
54 - Row({ space: 7 }) { 67 + Row() {
55 Scroll() { 68 Scroll() {
56 Row() { 69 Row() {
57 ForEach(this.data[this.firstIndex].children[this.secondIndex].children, (item: FollowThirdListItem, index: number ) => { 70 ForEach(this.data[this.firstIndex].children[this.secondIndex].children, (item: FollowThirdListItem, index: number ) => {
@@ -63,8 +76,8 @@ export struct FollowThirdTabsComponent{ @@ -63,8 +76,8 @@ export struct FollowThirdTabsComponent{
63 .align(Alignment.Start) 76 .align(Alignment.Start)
64 .scrollable(ScrollDirection.Horizontal) 77 .scrollable(ScrollDirection.Horizontal)
65 .scrollBar(BarState.Off) 78 .scrollBar(BarState.Off)
66 - .width('90%')  
67 - .padding({left:'11lpx'}) 79 + .width('100%')
  80 + .padding({left:'31lpx',right:'48lpx'})
68 } 81 }
69 .alignItems(VerticalAlign.Bottom) 82 .alignItems(VerticalAlign.Bottom)
70 .width('100%') 83 .width('100%')
@@ -77,11 +90,6 @@ export struct FollowThirdTabsComponent{ @@ -77,11 +90,6 @@ export struct FollowThirdTabsComponent{
77 ForEach(this.data[this.firstIndex].children[this.secondIndex].children, (item: FollowThirdListItem, index: number ) => { 90 ForEach(this.data[this.firstIndex].children[this.secondIndex].children, (item: FollowThirdListItem, index: number ) => {
78 TabContent(){ 91 TabContent(){
79 Column(){ 92 Column(){
80 - Divider().width('100%')  
81 - .height('2lpx')  
82 - .strokeWidth('1lpx')  
83 - .backgroundColor($r('app.color.color_EDEDED'))  
84 - .margin({left:'20lpx'})  
85 FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].children[this.secondIndex].children[index].id}) 93 FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].children[this.secondIndex].children[index].id})
86 } 94 }
87 } 95 }
@@ -99,4 +107,19 @@ export struct FollowThirdTabsComponent{ @@ -99,4 +107,19 @@ export struct FollowThirdTabsComponent{
99 } 107 }
100 } 108 }
101 109
  110 + getMeasureText(text: string,index:number) {
  111 + let width = measure.measureText({
  112 + textContent: text,
  113 + fontSize: px2fp(27),
  114 + lineHeight: px2fp(35)
  115 + })
  116 + if(index === 0){
  117 + return width + 19+ 35
  118 + }else if(index === this.data[this.firstIndex].children[this.secondIndex].children.length-1){
  119 + return width + 35+ 35
  120 + }else{
  121 + return width + 35+ 19
  122 + }
  123 + }
  124 +
102 } 125 }
1 -import { ContentDTO, Params } from 'wdBean';  
2 import { DateTimeUtils, LazyDataSource, SPHelper,UserDataLocal } from 'wdKit'; 1 import { DateTimeUtils, LazyDataSource, SPHelper,UserDataLocal } from 'wdKit';
3 -import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter'; 2 +import { WDRouterPage, WDRouterRule } from 'wdRouter';
4 import MinePageDatasModel from '../../../model/MinePageDatasModel'; 3 import MinePageDatasModel from '../../../model/MinePageDatasModel';
5 import { CommentListItem } from '../../../viewmodel/CommentListItem'; 4 import { CommentListItem } from '../../../viewmodel/CommentListItem';
6 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'; 5 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem';
@@ -106,6 +105,7 @@ export struct HomePageBottomComponent{ @@ -106,6 +105,7 @@ export struct HomePageBottomComponent{
106 EmptyComponent({emptyType:14}) 105 EmptyComponent({emptyType:14})
107 .layoutWeight(1) 106 .layoutWeight(1)
108 .width('100%') 107 .width('100%')
  108 + .offset({y:"-200lpx"})
109 } 109 }
110 }.layoutWeight(1) 110 }.layoutWeight(1)
111 .justifyContent(FlexAlign.Start) 111 .justifyContent(FlexAlign.Start)
@@ -114,6 +114,7 @@ export struct HomePageBottomComponent{ @@ -114,6 +114,7 @@ export struct HomePageBottomComponent{
114 EmptyComponent({emptyType:11}) 114 EmptyComponent({emptyType:11})
115 .layoutWeight(1) 115 .layoutWeight(1)
116 .width('100%') 116 .width('100%')
  117 + .offset({y:"-200lpx"})
117 } 118 }
118 } 119 }
119 }else{ 120 }else{