chenjun1_wd

沉浸式频道(P0)

1、全屏图标距离左侧间距偏小改为16
2、关注图标偏大改为24(已经是24了)
3、间距改为 8
4、标题字号改为16 行高 22
5、间距偏大改为 8
6、间距改为 8
7、滑块和进度条没有垂直居中
8、头部缺少背景蒙层(?)
9、底部缺少背景蒙层(?)
10、未选中文字颜色不对(?)
11、搜索图标颜色不对(?)
12、进度拖拽颜色不对(?)
13、全文按钮颜色不对,点击范围太小(?)
14、评论弹窗推起视频区域缩小动效有问题
15、评论弹窗去掉圆角(bindSheet导致)
16、缺省文案颜色不对改为#999999
17、数字标签和图标位置关系不对
@@ -13,7 +13,7 @@ import { PlayerBottomView } from '../view/PlayerBottomView'; @@ -13,7 +13,7 @@ import { PlayerBottomView } from '../view/PlayerBottomView';
13 import { PlayerRightView } from '../view/PlayerRightView'; 13 import { PlayerRightView } from '../view/PlayerRightView';
14 import { DisplayDirection } from 'wdConstant/Index'; 14 import { DisplayDirection } from 'wdConstant/Index';
15 import { CommentDialogView } from '../view/CommentDialogView'; 15 import { CommentDialogView } from '../view/CommentDialogView';
16 -import { componentUtils, window } from '@kit.ArkUI'; 16 +import { window } from '@kit.ArkUI';
17 import { PlayerFullScreenView } from '../view/PlayerFullScreenView'; 17 import { PlayerFullScreenView } from '../view/PlayerFullScreenView';
18 import { OperRowListView, publishCommentModel } from 'wdComponent/Index'; 18 import { OperRowListView, publishCommentModel } from 'wdComponent/Index';
19 import { ParamType, TrackConstants } from 'wdTracking/Index'; 19 import { ParamType, TrackConstants } from 'wdTracking/Index';
@@ -44,7 +44,7 @@ export struct DetailPlayShortVideoPage { @@ -44,7 +44,7 @@ export struct DetailPlayShortVideoPage {
44 @Consume @Watch("showCommentListChanged") showCommentList: boolean 44 @Consume @Watch("showCommentListChanged") showCommentList: boolean
45 @Consume displayDirection: DisplayDirection 45 @Consume displayDirection: DisplayDirection
46 @Consume @Watch('videoStatusChange') switchVideoStatus: boolean 46 @Consume @Watch('videoStatusChange') switchVideoStatus: boolean
47 - @State isPlay: boolean = true // 视频手动播放暂停 47 + @State isPlay: boolean = true // 视频手动播放暂停
48 @Consume @Watch('pageShowChange') pageShow: number 48 @Consume @Watch('pageShowChange') pageShow: number
49 @Consume windowWidth: number 49 @Consume windowWidth: number
50 @Consume windowHeight: number 50 @Consume windowHeight: number
@@ -59,16 +59,14 @@ export struct DetailPlayShortVideoPage { @@ -59,16 +59,14 @@ export struct DetailPlayShortVideoPage {
59 @State toastText: ResourceStr = "正在使用非WI-FI网络,播放将产生流量费用" 59 @State toastText: ResourceStr = "正在使用非WI-FI网络,播放将产生流量费用"
60 @Consume onlyWifiLoadVideo: boolean 60 @Consume onlyWifiLoadVideo: boolean
61 @Consume toastTextVisible: boolean 61 @Consume toastTextVisible: boolean
  62 + @StorageProp('currentBreakpoint') @Watch("currentChanged") currentBreakpoint: string = 'sm';
  63 + @State isPad: boolean = this.currentBreakpoint == "md" || this.currentBreakpoint == "lg" ? true : false
62 64
63 -  
64 - @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm';  
65 - @State isPad:boolean = this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"?true:false  
66 -  
67 - currentChanged(){  
68 - if(this.currentBreakpoint == "md" || this.currentBreakpoint == "lg"){ 65 + currentChanged() {
  66 + if (this.currentBreakpoint == "md" || this.currentBreakpoint == "lg") {
69 //大屏幕 折叠屏 或者ipad 67 //大屏幕 折叠屏 或者ipad
70 this.isPad = true 68 this.isPad = true
71 - }else { 69 + } else {
72 this.isPad = false 70 this.isPad = false
73 } 71 }
74 } 72 }
@@ -199,8 +197,9 @@ export struct DetailPlayShortVideoPage { @@ -199,8 +197,9 @@ export struct DetailPlayShortVideoPage {
199 197
200 this.videoLandScape = this.contentDetailData.videoInfo[0]?.videoLandScape 198 this.videoLandScape = this.contentDetailData.videoInfo[0]?.videoLandScape
201 this.ratio = this.videoLandScape == 2 ? (this.contentDetailData.videoInfo[0]?.resolutionWidth || 9) / 199 this.ratio = this.videoLandScape == 2 ? (this.contentDetailData.videoInfo[0]?.resolutionWidth || 9) /
202 - (this.contentDetailData.videoInfo[0]?.resolutionHeight || 16):(this.contentDetailData.videoInfo[0]?.resolutionWidth || 16) /  
203 - (this.contentDetailData.videoInfo[0]?.resolutionHeight || 9) 200 + (this.contentDetailData.videoInfo[0]?.resolutionHeight || 16) :
  201 + (this.contentDetailData.videoInfo[0]?.resolutionWidth || 16) /
  202 + (this.contentDetailData.videoInfo[0]?.resolutionHeight || 9)
204 this.playerController.onCanplay = async () => { 203 this.playerController.onCanplay = async () => {
205 this.ratio = this.playerController.videoWidth / this.playerController.videoHeight 204 this.ratio = this.playerController.videoWidth / this.playerController.videoHeight
206 if ((this.index == 0 || this.currentIndex === this.index) && this.switchVideoStatus) { 205 if ((this.index == 0 || this.currentIndex === this.index) && this.switchVideoStatus) {
@@ -300,11 +299,13 @@ export struct DetailPlayShortVideoPage { @@ -300,11 +299,13 @@ export struct DetailPlayShortVideoPage {
300 onHeightDidChange: (height: number) => { 299 onHeightDidChange: (height: number) => {
301 this.playerWidth = px2vp(this.windowWidth) 300 this.playerWidth = px2vp(this.windowWidth)
302 this.playerHeight = px2vp(this.windowHeight - height) 301 this.playerHeight = px2vp(this.windowHeight - height)
303 - Logger.debug(TAG, "height: " + px2vp(height) + " ===> 视频高度: " + this.playerHeight + " window height: " + px2vp(this.windowHeight)) 302 + Logger.debug(TAG,
  303 + "height: " + px2vp(height) + " ===> 视频高度: " + this.playerHeight + " window height: " +
  304 + px2vp(this.windowHeight))
304 } 305 }
305 }) 306 })
306 this.playerViewBuilder() 307 this.playerViewBuilder()
307 - if(this.index === this.currentIndex) { 308 + if (this.index === this.currentIndex) {
308 PlayerBottomView({ 309 PlayerBottomView({
309 playerController: this.playerController 310 playerController: this.playerController
310 }) 311 })
@@ -327,7 +328,7 @@ export struct DetailPlayShortVideoPage { @@ -327,7 +328,7 @@ export struct DetailPlayShortVideoPage {
327 this.status = status 328 this.status = status
328 if (status === PlayerConstants.STATUS_PAUSE) { 329 if (status === PlayerConstants.STATUS_PAUSE) {
329 this.isPlay = false 330 this.isPlay = false
330 - } else if(status === PlayerConstants.STATUS_START) { 331 + } else if (status === PlayerConstants.STATUS_START) {
331 this.isPlay = true 332 this.isPlay = true
332 } 333 }
333 } 334 }
@@ -364,8 +365,8 @@ export struct DetailPlayShortVideoPage { @@ -364,8 +365,8 @@ export struct DetailPlayShortVideoPage {
364 @Builder 365 @Builder
365 buildContent() { 366 buildContent() {
366 Row() { 367 Row() {
367 - Column(){  
368 - Column(){ 368 + Column() {
  369 + Column() {
369 Text(this.toastText) 370 Text(this.toastText)
370 .fontFamily('PingFang SC-Regular') 371 .fontFamily('PingFang SC-Regular')
371 .fontWeight(FontWeight.Regular) 372 .fontWeight(FontWeight.Regular)
@@ -374,6 +375,7 @@ export struct DetailPlayShortVideoPage { @@ -374,6 +375,7 @@ export struct DetailPlayShortVideoPage {
374 .lineHeight(20) 375 .lineHeight(20)
375 .textAlign(TextAlign.Center) 376 .textAlign(TextAlign.Center)
376 } 377 }
  378 +
377 Column() { 379 Column() {
378 Text("使用流量播放") 380 Text("使用流量播放")
379 .fontFamily('PingFang SC-Regular') 381 .fontFamily('PingFang SC-Regular')
@@ -450,7 +452,8 @@ export struct DetailPlayShortVideoPage { @@ -450,7 +452,8 @@ export struct DetailPlayShortVideoPage {
450 452
451 // 横屏-全屏观看 453 // 横屏-全屏观看
452 // 点击查看详情 不展示 454 // 点击查看详情 不展示
453 - if (this.videoLandScape === 1 && !this.isOpenDetail && this.displayDirection === DisplayDirection.VERTICAL && !this.showCommentList && !this.isPad) { 455 + if (this.videoLandScape === 1 && !this.isOpenDetail && this.displayDirection === DisplayDirection.VERTICAL &&
  456 + !this.showCommentList && !this.isPad) {
454 this.playerFullscreenBuilder() 457 this.playerFullscreenBuilder()
455 } 458 }
456 459
@@ -467,13 +470,14 @@ export struct DetailPlayShortVideoPage { @@ -467,13 +470,14 @@ export struct DetailPlayShortVideoPage {
467 } 470 }
468 471
469 @Builder 472 @Builder
  473 + //全屏按钮
470 playerFullscreenBuilder() { 474 playerFullscreenBuilder() {
471 Row() { 475 Row() {
472 Image($r('app.media.ic_switch_orientation')) 476 Image($r('app.media.ic_switch_orientation'))
473 .width(24) 477 .width(24)
474 .aspectRatio(1) 478 .aspectRatio(1)
475 .objectFit(ImageFit.Contain) 479 .objectFit(ImageFit.Contain)
476 - .margin({ left: 8, right: 4 }) 480 + .margin({ left: 16, right: 4 })
477 // Text("全屏观看") 481 // Text("全屏观看")
478 // .fontColor(Color.White) 482 // .fontColor(Color.White)
479 // .fontWeight(400) 483 // .fontWeight(400)
@@ -25,7 +25,7 @@ export struct PlayerProgressView { @@ -25,7 +25,7 @@ export struct PlayerProgressView {
25 } 25 }
26 26
27 this.playerController.onLoaded = (loaded: number) => { 27 this.playerController.onLoaded = (loaded: number) => {
28 - if(loaded == 1) { 28 + if (loaded == 1) {
29 this.loadingWidth = '95%' 29 this.loadingWidth = '95%'
30 if (this.onlyWifiLoadVideo) { 30 if (this.onlyWifiLoadVideo) {
31 this.showLoading = true 31 this.showLoading = true
@@ -60,20 +60,26 @@ export struct PlayerProgressView { @@ -60,20 +60,26 @@ export struct PlayerProgressView {
60 .backgroundColor(Color.Gray) 60 .backgroundColor(Color.Gray)
61 .width(this.loadingWidth) 61 .width(this.loadingWidth)
62 .height(1) 62 .height(1)
63 - .animation({ duration: 500, curve: Curve.Ease, iterations: -1, playMode: PlayMode.Normal }) 63 + .animation({
  64 + duration: 500,
  65 + curve: Curve.Ease,
  66 + iterations: -1,
  67 + playMode: PlayMode.Normal
  68 + })
64 } 69 }
65 .width('100%') 70 .width('100%')
66 .zIndex(2000) 71 .zIndex(2000)
67 .height(10) 72 .height(10)
68 - .visibility(this.showLoading ? Visibility.Visible: Visibility.Hidden) 73 + .visibility(this.showLoading ? Visibility.Visible : Visibility.Hidden)
69 .margin({ bottom: 10 }) 74 .margin({ bottom: 10 })
  75 +
70 // .markAnchor({ x: 0, y: '100%' }) 76 // .markAnchor({ x: 0, y: '100%' })
71 } 77 }
72 78
73 build() { 79 build() {
74 Stack() { 80 Stack() {
75 this.playerLoadingBuilder() 81 this.playerLoadingBuilder()
76 - if(!this.showLoading) { 82 + if (!this.showLoading) {
77 Column() { 83 Column() {
78 Text() { 84 Text() {
79 Span(DateTimeUtils.secondToTime(Math.floor(this.progressVal / 100 * this.videoDuration))) 85 Span(DateTimeUtils.secondToTime(Math.floor(this.progressVal / 100 * this.videoDuration)))
@@ -89,38 +95,45 @@ export struct PlayerProgressView { @@ -89,38 +95,45 @@ export struct PlayerProgressView {
89 .margin({ bottom: 30 }) 95 .margin({ bottom: 30 })
90 .visibility(this.isDragging ? Visibility.Visible : Visibility.None) 96 .visibility(this.isDragging ? Visibility.Visible : Visibility.None)
91 97
92 - Slider({  
93 - value: this.progressVal,  
94 - step: 0.01,  
95 - // style: SliderStyle.OutSet  
96 - })  
97 - .blockColor(this.status === PlayerConstants.STATUS_PAUSE || this.isDragging ? $r('app.color.play_block_color') :  
98 - Color.Transparent)  
99 - .trackColor(this.status === PlayerConstants.STATUS_PAUSE || this.isDragging ?  
100 - $r('app.color.pause_track_color') : $r('app.color.play_track_color'))  
101 - .selectedColor(this.status === PlayerConstants.STATUS_PAUSE || this.isDragging ?  
102 - $r('app.color.pause_selected_color') : $r('app.color.play_selected_color'))  
103 - .trackThickness(this.status === PlayerConstants.STATUS_PAUSE || this.isDragging ? 4 : 1)  
104 - .blockStyle({  
105 - type: this.status === PlayerConstants.STATUS_PAUSE || this.isDragging ? SliderBlockType.IMAGE :  
106 - SliderBlockType.DEFAULT,  
107 - image: $r('app.media.ic_player_block') 98 + Row() {
  99 + Slider({
  100 + value: this.progressVal,
  101 + step: 0.01,
  102 + // style: SliderStyle.OutSet
108 }) 103 })
109 - .blockSize({ width: 18, height: 12 })  
110 - .width('100%')  
111 - .height(19)  
112 - .onChange((value: number, mode: SliderChangeMode) => {  
113 - this.progressVal = value  
114 - if (mode === SliderChangeMode.Moving) {  
115 - this.isDragging = true  
116 - }  
117 - if (mode === SliderChangeMode.End) {  
118 - this.isDragging = false  
119 - }  
120 - this.playerController?.setSeekTime(value, mode);  
121 - console.log('slider onChange:', value, mode) 104 + .blockColor(this.status === PlayerConstants.STATUS_PAUSE || this.isDragging ?
  105 + $r('app.color.play_block_color') :
  106 + Color.Transparent)
  107 + .trackColor(this.status === PlayerConstants.STATUS_PAUSE || this.isDragging ?
  108 + $r('app.color.pause_track_color') : $r('app.color.play_track_color'))
  109 + .selectedColor(this.status === PlayerConstants.STATUS_PAUSE || this.isDragging ?
  110 + $r('app.color.pause_selected_color') : $r('app.color.play_selected_color'))
  111 + .trackThickness(this.status === PlayerConstants.STATUS_PAUSE || this.isDragging ? 4 : 1)
  112 + .blockStyle({
  113 + type: this.status === PlayerConstants.STATUS_PAUSE || this.isDragging ? SliderBlockType.IMAGE :
  114 + SliderBlockType.DEFAULT,
  115 + image: $r('app.media.ic_player_block')
  116 + })
  117 + .blockSize({ width: 18, height: 12 })
  118 + .width('100%')
  119 + .height(24)
  120 + .onChange((value: number, mode: SliderChangeMode) => {
  121 + this.progressVal = value
  122 + if (mode === SliderChangeMode.Moving) {
  123 + this.isDragging = true
  124 + }
  125 + if (mode === SliderChangeMode.End) {
  126 + this.isDragging = false
  127 + }
  128 + this.playerController?.setSeekTime(value, mode);
  129 + console.log('slider onChange:', value, mode)
  130 +
  131 + })
  132 + }
  133 + .width('100%')
  134 + .height(24)
  135 + .justifyContent(FlexAlign.Center)
122 136
123 - })  
124 } 137 }
125 .visibility(this.isOpenDetail ? Visibility.None : Visibility.Visible) 138 .visibility(this.isOpenDetail ? Visibility.None : Visibility.Visible)
126 } 139 }
@@ -8,13 +8,13 @@ import { @@ -8,13 +8,13 @@ import {
8 postInteractAccentionOperateParams 8 postInteractAccentionOperateParams
9 } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest'; 9 } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
10 10
11 -import { SPHelper, ToastUtils, NumberFormatterUtils } from 'wdKit'; 11 +import { NumberFormatterUtils, SPHelper, ToastUtils } from 'wdKit';
12 import { WDPlayerController } from 'wdPlayer/Index'; 12 import { WDPlayerController } from 'wdPlayer/Index';
13 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; 13 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
14 -import { DisplayDirection, SpConstants } from 'wdConstant/Index'  
15 -import { WDShare } from "wdShare" 14 +import { DisplayDirection, SpConstants } from 'wdConstant/Index';
  15 +import { WDShare } from 'wdShare';
16 import { publishCommentModel } from 'wdComponent/Index'; 16 import { publishCommentModel } from 'wdComponent/Index';
17 -import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index'; 17 +import { ParamType, TrackingContent } from 'wdTracking/Index';
18 18
19 interface ILikeStyleResp { 19 interface ILikeStyleResp {
20 url: Resource; 20 url: Resource;
@@ -54,7 +54,8 @@ export struct PlayerRightView { @@ -54,7 +54,8 @@ export struct PlayerRightView {
54 // console.log(TAG, 'this.openLikes', this.openLikes) 54 // console.log(TAG, 'this.openLikes', this.openLikes)
55 this.contentTrackingDict() 55 this.contentTrackingDict()
56 } 56 }
57 - contentTrackingDict(){ 57 +
  58 + contentTrackingDict() {
58 this.pageParam = { 59 this.pageParam = {
59 'contentType': `${this.contentDetailData.newsType}`, 60 'contentType': `${this.contentDetailData.newsType}`,
60 'contentId': `${this.contentDetailData.newsId}`, 61 'contentId': `${this.contentDetailData.newsId}`,
@@ -63,6 +64,7 @@ export struct PlayerRightView { @@ -63,6 +64,7 @@ export struct PlayerRightView {
63 this.followUserId = this.contentDetailData?.rmhInfo?.rmhId || '' 64 this.followUserId = this.contentDetailData?.rmhInfo?.rmhId || ''
64 this.followUserName = this.contentDetailData?.rmhInfo?.rmhName || '' 65 this.followUserName = this.contentDetailData?.rmhInfo?.rmhName || ''
65 } 66 }
  67 +
66 /** 68 /**
67 * 点赞、取消点赞 69 * 点赞、取消点赞
68 */ 70 */
@@ -92,11 +94,11 @@ export struct PlayerRightView { @@ -92,11 +94,11 @@ export struct PlayerRightView {
92 this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1' 94 this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1'
93 if (this.newsStatusOfUser.likeStatus == '1') { 95 if (this.newsStatusOfUser.likeStatus == '1') {
94 this.interactData.likeNum = Number(this.interactData.likeNum || 0) + 1 96 this.interactData.likeNum = Number(this.interactData.likeNum || 0) + 1
95 - TrackingContent.like(true,this.pageId,this.pageName,this.pageParam) 97 + TrackingContent.like(true, this.pageId, this.pageName, this.pageParam)
96 console.log(TAG, '点赞') 98 console.log(TAG, '点赞')
97 } else { 99 } else {
98 this.interactData.likeNum = Math.max(0, Number(this.interactData.likeNum || 0) - 1) 100 this.interactData.likeNum = Math.max(0, Number(this.interactData.likeNum || 0) - 1)
99 - TrackingContent.like(false,this.pageId,this.pageName,this.pageParam) 101 + TrackingContent.like(false, this.pageId, this.pageName, this.pageParam)
100 console.log(TAG, '取消点赞') 102 console.log(TAG, '取消点赞')
101 } 103 }
102 console.log(TAG, '点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactData?.likeNum) 104 console.log(TAG, '点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactData?.likeNum)
@@ -132,11 +134,11 @@ export struct PlayerRightView { @@ -132,11 +134,11 @@ export struct PlayerRightView {
132 // this.queryContentInteractCount() 134 // this.queryContentInteractCount()
133 if (this.newsStatusOfUser.collectStatus === 1) { 135 if (this.newsStatusOfUser.collectStatus === 1) {
134 this.interactData.collectNum = Number(this.interactData.collectNum || 0) + 1 136 this.interactData.collectNum = Number(this.interactData.collectNum || 0) + 1
135 - TrackingContent.collect(true,this.pageId,this.pageName,this.pageParam) 137 + TrackingContent.collect(true, this.pageId, this.pageName, this.pageParam)
136 console.log(TAG, '收藏') 138 console.log(TAG, '收藏')
137 } else { 139 } else {
138 this.interactData.collectNum = Math.max(0, Number(this.interactData.collectNum || 0) - 1) 140 this.interactData.collectNum = Math.max(0, Number(this.interactData.collectNum || 0) - 1)
139 - TrackingContent.collect(false,this.pageId,this.pageName,this.pageParam) 141 + TrackingContent.collect(false, this.pageId, this.pageName, this.pageParam)
140 console.log(TAG, '取消收藏') 142 console.log(TAG, '取消收藏')
141 } 143 }
142 console.log(TAG, '收藏、取消收藏==', this.newsStatusOfUser?.collectStatus, this.interactData?.collectNum) 144 console.log(TAG, '收藏、取消收藏==', this.newsStatusOfUser?.collectStatus, this.interactData?.collectNum)
@@ -200,7 +202,7 @@ export struct PlayerRightView { @@ -200,7 +202,7 @@ export struct PlayerRightView {
200 } 202 }
201 }) 203 })
202 console.log(TAG, '关注号主') 204 console.log(TAG, '关注号主')
203 - TrackingContent.follow(true,this.followUserId,this.followUserName,this.pageId,this.pageName,this.pageParam) 205 + TrackingContent.follow(true, this.followUserId, this.followUserName, this.pageId, this.pageName, this.pageParam)
204 } 206 }
205 }) 207 })
206 } 208 }
@@ -215,7 +217,7 @@ export struct PlayerRightView { @@ -215,7 +217,7 @@ export struct PlayerRightView {
215 if (this.contentDetailData?.openComment == 1) { 217 if (this.contentDetailData?.openComment == 1) {
216 this.commentBuilderView() 218 this.commentBuilderView()
217 } 219 }
218 - if(this.contentDetailData?.shareInfo?.shareOpen == 1) { 220 + if (this.contentDetailData?.shareInfo?.shareOpen == 1) {
219 this.shareBuilderView() 221 this.shareBuilderView()
220 } 222 }
221 } 223 }
@@ -253,7 +255,7 @@ export struct PlayerRightView { @@ -253,7 +255,7 @@ export struct PlayerRightView {
253 ToastUtils.showToast("暂时无法查看该创作者主页", 2000); 255 ToastUtils.showToast("暂时无法查看该创作者主页", 2000);
254 } 256 }
255 }) 257 })
256 - 258 + //添加关注
257 Image($r('app.media.ic_add')) 259 Image($r('app.media.ic_add'))
258 .width(24) 260 .width(24)
259 .borderRadius(12) 261 .borderRadius(12)
@@ -335,7 +337,8 @@ export struct PlayerRightView { @@ -335,7 +337,8 @@ export struct PlayerRightView {
335 .margin({ top: 2 }) 337 .margin({ top: 2 })
336 } 338 }
337 .margin({ bottom: 20 }) 339 .margin({ bottom: 20 })
338 - .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible) 340 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None :
  341 + Visibility.Visible)
339 .onClick(() => { 342 .onClick(() => {
340 // TODO:点赞动画 343 // TODO:点赞动画
341 this.toggleLikeStatus() 344 this.toggleLikeStatus()
@@ -49,6 +49,8 @@ export struct PlayerTitleView { @@ -49,6 +49,8 @@ export struct PlayerTitleView {
49 } 49 }
50 50
51 getTitle(): string { 51 getTitle(): string {
  52 + //console.info(`cj2024 newsTitle = ${this.contentDetailData?.newsTitle}`)
  53 + //console.info(`cj2024 summary = ${this.summary}`)
52 return this.contentDetailData?.newsTitle || '' 54 return this.contentDetailData?.newsTitle || ''
53 } 55 }
54 56
@@ -97,10 +99,10 @@ export struct PlayerTitleView { @@ -97,10 +99,10 @@ export struct PlayerTitleView {
97 } 99 }
98 100
99 /** 101 /**
100 - * 截断文本 102 + * 截断this.title文本
101 * @param {string} str 要截断的文本 '啊啊啊啊啊' 103 * @param {string} str 要截断的文本 '啊啊啊啊啊'
102 * @param {number} fontSize 字体大小(px) 104 * @param {number} fontSize 字体大小(px)
103 - * @param {number} maxLines 最大行数 3 105 + * @param {number} maxLines 最大行数 4
104 * @param {number} textWidth 文本宽度(px) vp 需要转换vp2px() 106 * @param {number} textWidth 文本宽度(px) vp 需要转换vp2px()
105 * @returns {string} clipStr 截断后的文本 '啊啊' 107 * @returns {string} clipStr 截断后的文本 '啊啊'
106 */ 108 */
@@ -111,7 +113,7 @@ export struct PlayerTitleView { @@ -111,7 +113,7 @@ export struct PlayerTitleView {
111 textContent: truncateContent, 113 textContent: truncateContent,
112 fontSize: fontSize, 114 fontSize: fontSize,
113 fontWeight: 600, 115 fontWeight: 600,
114 - lineHeight: 20, 116 + lineHeight: 22,
115 wordBreak: WordBreak.BREAK_ALL 117 wordBreak: WordBreak.BREAK_ALL
116 }) 118 })
117 let clipStr: string = '' 119 let clipStr: string = ''
@@ -120,7 +122,7 @@ export struct PlayerTitleView { @@ -120,7 +122,7 @@ export struct PlayerTitleView {
120 textContent: clipStr, 122 textContent: clipStr,
121 fontSize: fontSize, 123 fontSize: fontSize,
122 fontWeight: 600, 124 fontWeight: 600,
123 - lineHeight: 20, 125 + lineHeight: 22,
124 wordBreak: WordBreak.BREAK_ALL 126 wordBreak: WordBreak.BREAK_ALL
125 }) >= textWidth * maxLines - measureTruncateWidth) { 127 }) >= textWidth * maxLines - measureTruncateWidth) {
126 this.isTitleOverLines = true 128 this.isTitleOverLines = true
@@ -136,9 +138,9 @@ export struct PlayerTitleView { @@ -136,9 +138,9 @@ export struct PlayerTitleView {
136 this.rmhPlatform = this.contentDetailData?.rmhPlatform || 0 138 this.rmhPlatform = this.contentDetailData?.rmhPlatform || 0
137 const info = measure.measureTextSize({ 139 const info = measure.measureTextSize({
138 textContent: this.getTitle(), 140 textContent: this.getTitle(),
139 - fontSize: 15, 141 + fontSize: 16,
140 fontWeight: 400, 142 fontWeight: 400,
141 - lineHeight: 20, 143 + lineHeight: 22,
142 constraintWidth: this.windowWidth - 150 - 16 - 22 + 'px', 144 constraintWidth: this.windowWidth - 150 - 16 - 22 + 'px',
143 145
144 }) 146 })
@@ -150,7 +152,8 @@ export struct PlayerTitleView { @@ -150,7 +152,8 @@ export struct PlayerTitleView {
150 152
151 private updateSummaryLines() { 153 private updateSummaryLines() {
152 this.summaryLines = Math.max(1, 4 - this.titleLines) 154 this.summaryLines = Math.max(1, 4 - this.titleLines)
153 - // console.info(`cj2024 titleLines = ${this.titleLines}`) 155 + //console.info(`cj2024 titleLines = ${this.titleLines}`)
  156 + //console.info(`cj2024 summaryLines = ${this.summaryLines}`)
154 this.isOverLines = this.summary.length > 157 this.isOverLines = this.summary.length >
155 this.clipText(this.summary, 14, this.summaryLines, this.windowWidth - 150 - vp2px(50)).length 158 this.clipText(this.summary, 14, this.summaryLines, this.windowWidth - 150 - vp2px(50)).length
156 } 159 }
@@ -222,6 +225,10 @@ export struct PlayerTitleView { @@ -222,6 +225,10 @@ export struct PlayerTitleView {
222 .lineHeight(21) 225 .lineHeight(21)
223 .fontWeight(400) 226 .fontWeight(400)
224 .fontFamily('PingFang SC-Regular') 227 .fontFamily('PingFang SC-Regular')
  228 + .onClick(() => {
  229 + this.isOpenDetail = true
  230 + this.dialogController?.open()
  231 + })
225 if (this.isOverLines) { 232 if (this.isOverLines) {
226 Span('... 全文') 233 Span('... 全文')
227 .fontColor('#888888') 234 .fontColor('#888888')
@@ -251,7 +258,7 @@ export struct PlayerTitleView { @@ -251,7 +258,7 @@ export struct PlayerTitleView {
251 left: 0, //6 258 left: 0, //6
252 right: 6, 259 right: 6,
253 top: 0, //4 260 top: 0, //4
254 - bottom: 4 261 + bottom: 8
255 }) 262 })
256 263
257 } 264 }
@@ -276,10 +283,10 @@ export struct PlayerTitleView { @@ -276,10 +283,10 @@ export struct PlayerTitleView {
276 @Builder 283 @Builder
277 titleBuilder() { 284 titleBuilder() {
278 Text() { 285 Text() {
279 - Span(this.clipTitleText(this.getTitle(), 14, 4, this.windowWidth - 234 - vp2px(50)))  
280 - .fontSize(15) 286 + Span(this.clipTitleText(this.getTitle(), 16, 4, this.windowWidth - 234 - vp2px(50)))
  287 + .fontSize(16)
281 .fontColor(Color.White) 288 .fontColor(Color.White)
282 - .lineHeight(20) 289 + .lineHeight(22)
283 .fontWeight(600) 290 .fontWeight(600)
284 .fontFamily('PingFang SC-Regular') 291 .fontFamily('PingFang SC-Regular')
285 if (this.isTitleOverLines) { 292 if (this.isTitleOverLines) {
@@ -309,7 +316,7 @@ export struct PlayerTitleView { @@ -309,7 +316,7 @@ export struct PlayerTitleView {
309 } 316 }
310 .onAreaChange((oldArea: Area, newArea: Area) => { 317 .onAreaChange((oldArea: Area, newArea: Area) => {
311 //console.info(`cj2024 titleLines = ${newArea.height as number} line = ${(newArea.height as number) / 20}`) 318 //console.info(`cj2024 titleLines = ${newArea.height as number} line = ${(newArea.height as number) / 20}`)
312 - this.titleLines = Math.floor((newArea.height as number) / 20) // 20是行高 319 + this.titleLines = Math.floor((newArea.height as number) / 22) // 22是行高
313 //console.info(`cj2024 titleLines = ${this.titleLines}`) 320 //console.info(`cj2024 titleLines = ${this.titleLines}`)
314 this.updateSummaryLines() 321 this.updateSummaryLines()
315 }) 322 })
@@ -317,7 +324,7 @@ export struct PlayerTitleView { @@ -317,7 +324,7 @@ export struct PlayerTitleView {
317 left: 0, //6 324 left: 0, //6
318 right: 6, 325 right: 6,
319 top: 0, //4 326 top: 0, //4
320 - bottom: 4 327 + bottom: 8
321 }) 328 })
322 } 329 }
323 } 330 }