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
zhenghy
2024-04-26 16:25:16 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
17dea420df9b12a59ac8ff5ad9dc27f0e94ca125
17dea420
1 parent
e7840d65
修复频道页双击
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
17 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/BottomNavigationComponent.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerRightView.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/BottomNavigationComponent.ets
View file @
17dea42
...
...
@@ -115,6 +115,15 @@ export struct BottomNavigationComponent {
.height(CommonConstants.FULL_PARENT)
.padding({ bottom: 15, left: 10, right: 10, top: 2 })
.aspectRatio(this.ASPECT_RATIO_1_1)
.gesture(
TapGesture({ count: 2 })
.onAction((event: GestureEvent) => {
if (this.currentNavIndex === index) {
// 当前tab,双击事件
this.autoRefresh++
}
})
)
Text(navItem.name)
.margin({ bottom: $r('app.float.bottom_navigation_margin_bottom') })
...
...
@@ -126,16 +135,6 @@ export struct BottomNavigationComponent {
}
.height($r('app.float.bottom_navigation_barHeight'))
.hoverEffect(HoverEffect.Highlight)
.gesture(
TapGesture({ count: 2 })
.onAction((event: GestureEvent) => {
AlertDialog.show({ message: 'aa' })
if (this.currentNavIndex === index) {
// 当前tab,双击事件
this.autoRefresh++
}
})
)
.onClick(() => {
if (navItem.name === '我的') {
this.barBackgroundColor = Color.White
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerRightView.ets
View file @
17dea42
...
...
@@ -12,9 +12,14 @@ import { WDPlayerController } from 'wdPlayer/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { SpConstants } from 'wdConstant/Index'
interface ILikeStyleResp {
url: Resource;
name: string;
}
const TAG = 'PlayerRightView';
//视频点播页右侧操作栏:点赞/收藏/评论/分享 竖着排列
@Component
export struct PlayerRightView {
...
...
@@ -210,15 +215,26 @@ export struct PlayerRightView {
/**
* 将点赞样式转换为icon
*/
transLikeStyle
2Icon(): Resource
{
transLikeStyle
(): ILikeStyleResp
{
if (this.likesStyle === 1) {
return this.newsStatusOfUser.likeStatus === '1' ? $r(`app.media.ic_like_check`) : $r(`app.media.ic_like_uncheck`)
return {
url: this.newsStatusOfUser.likeStatus === '1' ? $r(`app.media.ic_like_check`) : $r(`app.media.ic_like_uncheck`),
name: '点赞'
}
} else if (this.likesStyle === 2) {
return this.newsStatusOfUser.likeStatus === '1' ? $r(`app.media.ic_thub_check`) : $r(`app.media.ic_thub_uncheck`)
return {
url: this.newsStatusOfUser.likeStatus === '1' ? $r(`app.media.ic_thub_check`) : $r(`app.media.ic_thub_uncheck`),
name: '祈祷'
}
} else if (this.likesStyle === 3) {
return this.newsStatusOfUser.likeStatus === '1' ? $r(`app.media.ic_candle_check`) : $r(`app.media.ic_candle_uncheck`)
return {
url: this.newsStatusOfUser.likeStatus === '1' ? $r(`app.media.ic_candle_check`) : $r(`app.media.ic_candle_uncheck`),
name: '默哀'
}
}
return {
url: $r(`app.media.icon_like_ckeck`), name: '点赞'
}
return $r(`app.media.icon_like_ckeck`)
}
transNum2String(name: 'likeNum' | 'collectNum' | 'commentNum') {
...
...
@@ -238,14 +254,14 @@ export struct PlayerRightView {
@Builder
likeBuilderView() {
Column() {
Image(this.transLikeStyle
2Icon()
)
Image(this.transLikeStyle
().url
)
.width(32)
.aspectRatio(1)
.onClick(() => {
// TODO:点赞动画
this.toggleLikeStatus()
})
Text(this.transNum2String('likeNum') ||
'赞'
)
Text(this.transNum2String('likeNum') ||
this.transLikeStyle().name
)
.width('100%')
.fontWeight(500)
.textAlign(TextAlign.Center)
...
...
@@ -253,6 +269,7 @@ export struct PlayerRightView {
.fontColor('#FFFFFF')
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ top: 2 })
}
.margin({ bottom: 20 })
.visibility(this.likesStyle !== 4 ? Visibility.Visible : Visibility.None)
...
...
@@ -278,6 +295,7 @@ export struct PlayerRightView {
.fontColor('#FFFFFF')
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ top: 2 })
}
.margin({ bottom: 20 })
}
...
...
@@ -302,6 +320,7 @@ export struct PlayerRightView {
.fontColor('#FFFFFF')
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ top: 2 })
}
.margin({ bottom: 20 })
}
...
...
@@ -326,6 +345,7 @@ export struct PlayerRightView {
.fontColor('#FFFFFF')
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ top: 2 })
}
.margin({ bottom: 20 })
}
...
...
Please
register
or
login
to post a comment