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
yuzhilin
2024-05-08 17:11:05 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
069192934bd8d49a2f67eea18c37a92eb2d02a52
06919293
1 parent
03c9d2af
fix:点赞数
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
View file @
0691929
...
...
@@ -58,7 +58,7 @@ export struct WdWebLocalComponent {
.onlineImageAccess(true)
.enableNativeEmbedMode(true)
.layoutMode(WebLayoutMode.FIT_CONTENT)
.nestedScroll({ scrollForward: NestedScrollMode.SELF_FIRST, scrollBackward: NestedScrollMode.PARENT_FIRST })
//
.nestedScroll({ scrollForward: NestedScrollMode.SELF_FIRST, scrollBackward: NestedScrollMode.PARENT_FIRST })
// .height(this.webHeight)
.onPageBegin((event) => {
this.onPageBegin(event?.url);
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
0691929
...
...
@@ -50,7 +50,7 @@ export struct ImageAndTextPageComponent {
@State operationButtonList: string[] = ['comment', 'collect', 'share']
@State isNetConnected: boolean = true
@State info: Area | null = null
@State likeNum: number = 0
build() {
Column() {
// 发布时间
...
...
@@ -106,8 +106,8 @@ export struct ImageAndTextPageComponent {
.width(24)
.height(24)
}
if (this.interactData?.likeNum != 0) {
Text(NumberFormatterUtils.formatNumberWithWan(this.interactData?.likeNum))
if (this.likeNum > 0) {
Text(NumberFormatterUtils.formatNumberWithWan(this.likeNum))
.fontSize(16)
.fontColor(this.newsStatusOfUser?.likeStatus === '1' ? '#ED2800' : '#999999')
.fontWeight(500)
...
...
@@ -303,7 +303,7 @@ export struct ImageAndTextPageComponent {
}
PageRepository.getContentInteract(params).then(res => {
if (res.data) {
this.
interactData.likeNum = res.data[0]?.likeNum
this.
likeNum = Number(res.data[0]?.likeNum) || 0
}
})
}
...
...
Please
register
or
login
to post a comment