Showing
4 changed files
with
33 additions
and
6 deletions
| @@ -63,7 +63,7 @@ export struct LiveFollowComponent { | @@ -63,7 +63,7 @@ export struct LiveFollowComponent { | ||
| 63 | bottom: 0, | 63 | bottom: 0, |
| 64 | }) | 64 | }) |
| 65 | //号主名称 | 65 | //号主名称 |
| 66 | - Text(this.rmhInfo.rmhName) | 66 | + Text(this.getRmhName()) |
| 67 | .fontColor(Color.White) | 67 | .fontColor(Color.White) |
| 68 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 68 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 69 | .maxLines(1) | 69 | .maxLines(1) |
| @@ -151,4 +151,11 @@ export struct LiveFollowComponent { | @@ -151,4 +151,11 @@ export struct LiveFollowComponent { | ||
| 151 | } | 151 | } |
| 152 | }) | 152 | }) |
| 153 | } | 153 | } |
| 154 | + | ||
| 155 | + getRmhName() { | ||
| 156 | + if (this.rmhInfo.rmhName.length > 7) { | ||
| 157 | + return this.rmhInfo.rmhName.substring(0, 7) + "..." | ||
| 158 | + } | ||
| 159 | + return this.rmhInfo.rmhName | ||
| 160 | + } | ||
| 154 | } | 161 | } |
| @@ -832,7 +832,7 @@ struct commentFooterView { | @@ -832,7 +832,7 @@ struct commentFooterView { | ||
| 832 | if (this.item.id) { // 审核通过的才显示点赞 | 832 | if (this.item.id) { // 审核通过的才显示点赞 |
| 833 | Row({ space: 6 }) { | 833 | Row({ space: 6 }) { |
| 834 | Text(this.item.likeNum) | 834 | Text(this.item.likeNum) |
| 835 | - .fontColor($r('app.color.color_666666')) | 835 | + .fontColor(this.item.api_status?$r('app.color.color_ED2800') : $r('app.color.color_666666')) |
| 836 | .fontSize(14) | 836 | .fontSize(14) |
| 837 | 837 | ||
| 838 | Image(this.item.api_status ? $r('app.media.comment_like_select') : $r('app.media.comment_like_normal')) | 838 | Image(this.item.api_status ? $r('app.media.comment_like_select') : $r('app.media.comment_like_normal')) |
| @@ -159,7 +159,7 @@ export struct ChildCommentComponent { | @@ -159,7 +159,7 @@ export struct ChildCommentComponent { | ||
| 159 | .width('100%') | 159 | .width('100%') |
| 160 | .height(0.5) | 160 | .height(0.5) |
| 161 | .strokeWidth(0.5) | 161 | .strokeWidth(0.5) |
| 162 | - .backgroundColor($r('app.color.color_EDEDED')) | 162 | + .color($r('app.color.color_EDEDED')) |
| 163 | .margin({ top: 10, bottom: 10 }) | 163 | .margin({ top: 10, bottom: 10 }) |
| 164 | } | 164 | } |
| 165 | 165 |
| 1 | import font from '@ohos.font' | 1 | import font from '@ohos.font' |
| 2 | import { ContentDetailDTO } from 'wdBean/Index' | 2 | import { ContentDetailDTO } from 'wdBean/Index' |
| 3 | -import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index' | 3 | +import { CustomToast, DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index' |
| 4 | import { LiveViewModel } from '../../viewModel/LiveViewModel' | 4 | import { LiveViewModel } from '../../viewModel/LiveViewModel' |
| 5 | import { HttpUtils } from 'wdNetwork/Index' | 5 | import { HttpUtils } from 'wdNetwork/Index' |
| 6 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' | 6 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' |
| @@ -22,6 +22,24 @@ export struct LiveCountdownComponent { | @@ -22,6 +22,24 @@ export struct LiveCountdownComponent { | ||
| 22 | liveViewModel: LiveViewModel = new LiveViewModel() | 22 | liveViewModel: LiveViewModel = new LiveViewModel() |
| 23 | pageParam: ParamType = {} | 23 | pageParam: ParamType = {} |
| 24 | 24 | ||
| 25 | + @State toastText: ResourceStr = "" | ||
| 26 | + dialogToast: CustomDialogController = new CustomDialogController({ | ||
| 27 | + builder: CustomToast({ | ||
| 28 | + bgColor: 0xB3000000, | ||
| 29 | + opacityValue: 1, | ||
| 30 | + msg: this.toastText, | ||
| 31 | + }), | ||
| 32 | + autoCancel: false, | ||
| 33 | + alignment: DialogAlignment.Center, | ||
| 34 | + customStyle: true, | ||
| 35 | + maskColor: "#00000000" | ||
| 36 | + }) | ||
| 37 | + | ||
| 38 | + showToastTip(msg: ResourceStr) { | ||
| 39 | + this.toastText = msg | ||
| 40 | + this.dialogToast.open() | ||
| 41 | + } | ||
| 42 | + | ||
| 25 | aboutToAppear(): void { | 43 | aboutToAppear(): void { |
| 26 | //注册字体 | 44 | //注册字体 |
| 27 | font.registerFont({ | 45 | font.registerFont({ |
| @@ -187,11 +205,13 @@ export struct LiveCountdownComponent { | @@ -187,11 +205,13 @@ export struct LiveCountdownComponent { | ||
| 187 | if (data.success) { | 205 | if (data.success) { |
| 188 | this.isAppointmentLive = !this.isAppointmentLive | 206 | this.isAppointmentLive = !this.isAppointmentLive |
| 189 | if (this.isAppointmentLive) { | 207 | if (this.isAppointmentLive) { |
| 190 | - ToastUtils.showToast('预约成功', 1000) | 208 | + // ToastUtils.showToast('预约成功', 1000) |
| 209 | + this.showToastTip('预约成功') | ||
| 191 | TrackingContent.subscribeClick(true, TrackConstants.PageName.Live_Detail, | 210 | TrackingContent.subscribeClick(true, TrackConstants.PageName.Live_Detail, |
| 192 | TrackConstants.PageName.Live_Detail, this.pageParam) | 211 | TrackConstants.PageName.Live_Detail, this.pageParam) |
| 193 | } else { | 212 | } else { |
| 194 | - ToastUtils.showToast('取消预约成功', 1000) | 213 | + // ToastUtils.showToast('取消预约成功', 1000) |
| 214 | + this.showToastTip('取消预约成功') | ||
| 195 | TrackingContent.subscribeClick(false, TrackConstants.PageName.Live_Detail, | 215 | TrackingContent.subscribeClick(false, TrackConstants.PageName.Live_Detail, |
| 196 | TrackConstants.PageName.Live_Detail, this.pageParam) | 216 | TrackConstants.PageName.Live_Detail, this.pageParam) |
| 197 | } | 217 | } |
-
Please register or login to post a comment