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
wuyanan
2024-09-19 10:59:14 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fd1f8001b7c0ebe8a2a484573d417c4c8018fd53
fd1f8001
1 parent
8a2365bb
ref |> 调整直播详情预约/取消预约toast样式
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
3 deletions
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/LiveCountdownComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/LiveCountdownComponent.ets
View file @
fd1f800
import font from '@ohos.font'
import { ContentDetailDTO } from 'wdBean/Index'
import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index'
import {
CustomToast,
DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index'
import { LiveViewModel } from '../../viewModel/LiveViewModel'
import { HttpUtils } from 'wdNetwork/Index'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
...
...
@@ -22,6 +22,24 @@ export struct LiveCountdownComponent {
liveViewModel: LiveViewModel = new LiveViewModel()
pageParam: ParamType = {}
@State toastText: ResourceStr = ""
dialogToast: CustomDialogController = new CustomDialogController({
builder: CustomToast({
bgColor: 0xB3000000,
opacityValue: 1,
msg: this.toastText,
}),
autoCancel: false,
alignment: DialogAlignment.Center,
customStyle: true,
maskColor: "#00000000"
})
showToastTip(msg: ResourceStr) {
this.toastText = msg
this.dialogToast.open()
}
aboutToAppear(): void {
//注册字体
font.registerFont({
...
...
@@ -187,11 +205,13 @@ export struct LiveCountdownComponent {
if (data.success) {
this.isAppointmentLive = !this.isAppointmentLive
if (this.isAppointmentLive) {
ToastUtils.showToast('预约成功', 1000)
// ToastUtils.showToast('预约成功', 1000)
this.showToastTip('预约成功')
TrackingContent.subscribeClick(true, TrackConstants.PageName.Live_Detail,
TrackConstants.PageName.Live_Detail, this.pageParam)
} else {
ToastUtils.showToast('取消预约成功', 1000)
// ToastUtils.showToast('取消预约成功', 1000)
this.showToastTip('取消预约成功')
TrackingContent.subscribeClick(false, TrackConstants.PageName.Live_Detail,
TrackConstants.PageName.Live_Detail, this.pageParam)
}
...
...
Please
register
or
login
to post a comment