Showing
2 changed files
with
5 additions
and
5 deletions
| @@ -58,7 +58,7 @@ export struct WdWebLocalComponent { | @@ -58,7 +58,7 @@ export struct WdWebLocalComponent { | ||
| 58 | .onlineImageAccess(true) | 58 | .onlineImageAccess(true) |
| 59 | .enableNativeEmbedMode(true) | 59 | .enableNativeEmbedMode(true) |
| 60 | .layoutMode(WebLayoutMode.FIT_CONTENT) | 60 | .layoutMode(WebLayoutMode.FIT_CONTENT) |
| 61 | - .nestedScroll({ scrollForward: NestedScrollMode.SELF_FIRST, scrollBackward: NestedScrollMode.PARENT_FIRST }) | 61 | + // .nestedScroll({ scrollForward: NestedScrollMode.SELF_FIRST, scrollBackward: NestedScrollMode.PARENT_FIRST }) |
| 62 | // .height(this.webHeight) | 62 | // .height(this.webHeight) |
| 63 | .onPageBegin((event) => { | 63 | .onPageBegin((event) => { |
| 64 | this.onPageBegin(event?.url); | 64 | this.onPageBegin(event?.url); |
| @@ -50,7 +50,7 @@ export struct ImageAndTextPageComponent { | @@ -50,7 +50,7 @@ export struct ImageAndTextPageComponent { | ||
| 50 | @State operationButtonList: string[] = ['comment', 'collect', 'share'] | 50 | @State operationButtonList: string[] = ['comment', 'collect', 'share'] |
| 51 | @State isNetConnected: boolean = true | 51 | @State isNetConnected: boolean = true |
| 52 | @State info: Area | null = null | 52 | @State info: Area | null = null |
| 53 | - | 53 | + @State likeNum: number = 0 |
| 54 | build() { | 54 | build() { |
| 55 | Column() { | 55 | Column() { |
| 56 | // 发布时间 | 56 | // 发布时间 |
| @@ -106,8 +106,8 @@ export struct ImageAndTextPageComponent { | @@ -106,8 +106,8 @@ export struct ImageAndTextPageComponent { | ||
| 106 | .width(24) | 106 | .width(24) |
| 107 | .height(24) | 107 | .height(24) |
| 108 | } | 108 | } |
| 109 | - if (this.interactData?.likeNum != 0) { | ||
| 110 | - Text(NumberFormatterUtils.formatNumberWithWan(this.interactData?.likeNum)) | 109 | + if (this.likeNum > 0) { |
| 110 | + Text(NumberFormatterUtils.formatNumberWithWan(this.likeNum)) | ||
| 111 | .fontSize(16) | 111 | .fontSize(16) |
| 112 | .fontColor(this.newsStatusOfUser?.likeStatus === '1' ? '#ED2800' : '#999999') | 112 | .fontColor(this.newsStatusOfUser?.likeStatus === '1' ? '#ED2800' : '#999999') |
| 113 | .fontWeight(500) | 113 | .fontWeight(500) |
| @@ -303,7 +303,7 @@ export struct ImageAndTextPageComponent { | @@ -303,7 +303,7 @@ export struct ImageAndTextPageComponent { | ||
| 303 | } | 303 | } |
| 304 | PageRepository.getContentInteract(params).then(res => { | 304 | PageRepository.getContentInteract(params).then(res => { |
| 305 | if (res.data) { | 305 | if (res.data) { |
| 306 | - this.interactData.likeNum = res.data[0]?.likeNum | 306 | + this.likeNum = Number(res.data[0]?.likeNum) || 0 |
| 307 | } | 307 | } |
| 308 | }) | 308 | }) |
| 309 | } | 309 | } |
-
Please register or login to post a comment