陈剑华

Merge remote-tracking branch 'origin/main'

@@ -29,6 +29,14 @@ @@ -29,6 +29,14 @@
29 "value": "14fp" 29 "value": "14fp"
30 }, 30 },
31 { 31 {
  32 + "name": "font_size_14_5",
  33 + "value": "14.5fp"
  34 + },
  35 + {
  36 + "name": "font_size_15",
  37 + "value": "15fp"
  38 + },
  39 + {
32 "name": "font_size_16", 40 "name": "font_size_16",
33 "value": "16fp" 41 "value": "16fp"
34 }, 42 },
@@ -59,6 +59,7 @@ export class ContentDTO implements BaseDTO { @@ -59,6 +59,7 @@ export class ContentDTO implements BaseDTO {
59 source: string = ''; 59 source: string = '';
60 objectId: string = ''; 60 objectId: string = '';
61 objectType: string = ''; 61 objectType: string = '';
  62 + objectLevel: string = '';
62 channelId: string = ''; 63 channelId: string = '';
63 relId: string = ''; 64 relId: string = '';
64 relType: string = ''; 65 relType: string = '';
@@ -49,10 +49,15 @@ export struct FeedBackActivity { @@ -49,10 +49,15 @@ export struct FeedBackActivity {
49 Column() { 49 Column() {
50 Text($r('app.string.feedback_opinion_type')) 50 Text($r('app.string.feedback_opinion_type'))
51 .fontColor($r('app.color.color_222222')) 51 .fontColor($r('app.color.color_222222'))
52 - .fontSize($r('app.float.font_size_16'))  
53 - .fontWeight(FontWeight.Bold) 52 + .fontSize($r('app.float.font_size_14_5'))
  53 + .fontWeight(600)
54 .width('100%') 54 .width('100%')
55 .margin({ left: 24, top: $r('app.float.vp_14') }) 55 .margin({ left: 24, top: $r('app.float.vp_14') })
  56 + Blank()
  57 + .height(0.5)
  58 + .width('94%')
  59 + .margin({ top: $r('app.float.vp_12') })
  60 + .backgroundColor($r('app.color.color_EDEDED'))
56 GridRow({ 61 GridRow({
57 columns:3, 62 columns:3,
58 }) { 63 }) {
@@ -82,15 +87,15 @@ export struct FeedBackActivity { @@ -82,15 +87,15 @@ export struct FeedBackActivity {
82 } 87 }
83 }) 88 })
84 } 89 }
85 - .width('94%') 90 + .width('90%')
86 .margin({top:$r('app.float.vp_16')}) 91 .margin({top:$r('app.float.vp_16')})
87 Blank() 92 Blank()
88 .height($r('app.float.margin_5')) 93 .height($r('app.float.margin_5'))
89 .backgroundColor($r('app.color.color_F5F5F5')) 94 .backgroundColor($r('app.color.color_F5F5F5'))
90 Text($r('app.string.feedback_opinion_tv')) 95 Text($r('app.string.feedback_opinion_tv'))
91 .fontColor($r('app.color.color_222222')) 96 .fontColor($r('app.color.color_222222'))
92 - .fontSize($r('app.float.font_size_16'))  
93 - .fontWeight(FontWeight.Bold) 97 + .fontSize($r('app.float.font_size_14_5'))
  98 + .fontWeight(600)
94 .width(CommonConstants.FULL_WIDTH) 99 .width(CommonConstants.FULL_WIDTH)
95 .margin({ left: 24, top: $r('app.float.vp_12') }) 100 .margin({ left: 24, top: $r('app.float.vp_12') })
96 Stack({ alignContent: Alignment.BottomEnd }) { 101 Stack({ alignContent: Alignment.BottomEnd }) {
@@ -191,26 +196,46 @@ export struct FeedBackActivity { @@ -191,26 +196,46 @@ export struct FeedBackActivity {
191 .fontSize($r('app.float.font_size_13_2')) 196 .fontSize($r('app.float.font_size_13_2'))
192 .width('94%') 197 .width('94%')
193 .margin({ top: $r('app.float.margin_24') }) 198 .margin({ top: $r('app.float.margin_24') })
  199 +
194 Row() { 200 Row() {
  201 + Blank().width('3%')
195 Text($r('app.string.feedback_mail')) 202 Text($r('app.string.feedback_mail'))
  203 + .height(CommonConstants.FULL_HEIGHT)
196 .fontColor($r('app.color.color_222222')) 204 .fontColor($r('app.color.color_222222'))
197 - .fontSize($r('app.float.font_size_14'))  
198 - .fontWeight(FontWeight.Bold) 205 + .fontSize($r('app.float.font_size_13_2'))
  206 + .fontWeight(600)
  207 + .padding({left: $r('app.float.margin_12') })
  208 + .backgroundColor($r('app.color.color_F5F5F5'))
  209 + .borderRadius({
  210 + topLeft: 4,
  211 + topRight: 0,
  212 + bottomLeft: 4,
  213 + bottomRight: 0,
  214 + })
  215 +
199 TextInput({ placeholder: $r('app.string.feedback_hideemail') }) 216 TextInput({ placeholder: $r('app.string.feedback_hideemail') })
200 - .width(CommonConstants.FULL_WIDTH) 217 + .width(0)
  218 + .layoutWeight(1)
201 .height(CommonConstants.FULL_HEIGHT) 219 .height(CommonConstants.FULL_HEIGHT)
202 - // .margin({left:15}) 220 + .fontColor($r('app.color.color_222222'))
  221 + .fontSize($r('app.float.font_size_13_2'))
  222 + .placeholderColor($r('app.color.color_CCCCCC'))
  223 + .placeholderFont({size:$r('app.float.font_size_13_2')})
203 .backgroundColor($r('app.color.color_F5F5F5')) 224 .backgroundColor($r('app.color.color_F5F5F5'))
  225 + .borderRadius({
  226 + topLeft: 0,
  227 + topRight: 4,
  228 + bottomLeft: 0,
  229 + bottomRight: 4,
  230 + })
204 .onChange((value) => { 231 .onChange((value) => {
205 - // Logger.debug(TAG, "onChange" + value + "/" + this.passwordContent)  
206 this.email = value 232 this.email = value
207 }) 233 })
  234 + Blank().width('3%')
208 } 235 }
209 - .height(44)  
210 - .width('94%')  
211 - .backgroundColor($r('app.color.color_F5F5F5'))  
212 - .margin({top: $r('app.float.margin_16') })  
213 - .borderRadius(4) 236 + .height(42)
  237 + .width(CommonConstants.FULL_WIDTH)
  238 + .margin({top: $r('app.float.margin_16')})
214 Blank().layoutWeight(1) 239 Blank().layoutWeight(1)
215 } 240 }
216 } 241 }
@@ -222,8 +247,8 @@ export struct FeedBackActivity { @@ -222,8 +247,8 @@ export struct FeedBackActivity {
222 Column(){ 247 Column(){
223 Text($r('app.string.submit')) 248 Text($r('app.string.submit'))
224 .textAlign(TextAlign.Center) 249 .textAlign(TextAlign.Center)
225 - .height(44)  
226 - .width('90%') 250 + .height(42)
  251 + .width('94%')
227 .fontColor(this.canSubmit ? $r('app.color.color_fff') : $r('app.color.color_FFFFFF_40')) 252 .fontColor(this.canSubmit ? $r('app.color.color_fff') : $r('app.color.color_FFFFFF_40'))
228 .fontSize($r('app.float.font_size_18')) 253 .fontSize($r('app.float.font_size_18'))
229 .backgroundColor(this.canSubmit ? $r('app.color.color_ED2800') : $r('app.color.color_ED2800_99')) 254 .backgroundColor(this.canSubmit ? $r('app.color.color_ED2800') : $r('app.color.color_ED2800_99'))
@@ -169,8 +169,8 @@ export struct SingleColumn999Component { @@ -169,8 +169,8 @@ export struct SingleColumn999Component {
169 */ 169 */
170 @Builder 170 @Builder
171 buildPaperItem(item: ContentDTO, index: number) { 171 buildPaperItem(item: ContentDTO, index: number) {
172 - ///屏蔽早晚报 音频  
173 - if (item.objectType != '13'){ 172 + ///屏蔽早晚报 音频 和 音频专题
  173 + if (item.objectType != '13'&&!(item.objectType == '5' && item.objectLevel === '22')){
174 PaperSingleColumn999CardView({ 174 PaperSingleColumn999CardView({
175 item: item, 175 item: item,
176 index: index, 176 index: index,
@@ -438,7 +438,8 @@ export struct PaperSingleColumn999CardView { @@ -438,7 +438,8 @@ export struct PaperSingleColumn999CardView {
438 Stack({ alignContent: Alignment.BottomEnd }) { 438 Stack({ alignContent: Alignment.BottomEnd }) {
439 Image(this.item?.coverUrl) 439 Image(this.item?.coverUrl)
440 .borderRadius(5) 440 .borderRadius(5)
441 - .aspectRatio(319 / 179) ///图片设计比例 441 + .objectFit(ImageFit.Fill)
  442 + .aspectRatio(16 / 10) ///图片设计比例
442 .padding({ top: 10 }) 443 .padding({ top: 10 })
443 //视频 444 //视频
444 if (this.item?.videoInfo) { 445 if (this.item?.videoInfo) {
@@ -629,7 +630,11 @@ export struct PaperSingleColumn999CardView { @@ -629,7 +630,11 @@ export struct PaperSingleColumn999CardView {
629 }else if(this.item.liveInfo.liveState === 'running'){ 630 }else if(this.item.liveInfo.liveState === 'running'){
630 contentString = '直播中' 631 contentString = '直播中'
631 }else if(this.item.liveInfo.liveState === 'end'){ 632 }else if(this.item.liveInfo.liveState === 'end'){
  633 + if (this.item.liveInfo.replayUri.length > 0) {
632 contentString = '回看' 634 contentString = '回看'
  635 + }else {
  636 + contentString = '已结束'
  637 + }
633 } 638 }
634 return contentString; 639 return contentString;
635 } 640 }
@@ -643,7 +648,10 @@ export struct PaperSingleColumn999CardView { @@ -643,7 +648,10 @@ export struct PaperSingleColumn999CardView {
643 }else if(this.item.liveInfo.liveState === 'running'){ 648 }else if(this.item.liveInfo.liveState === 'running'){
644 imageString = $r('app.media.card_live') 649 imageString = $r('app.media.card_live')
645 }else if(this.item.liveInfo.liveState === 'end'){ 650 }else if(this.item.liveInfo.liveState === 'end'){
  651 + if (this.item.liveInfo.replayUri.length > 0) {
646 imageString = $r('app.media.card_play') 652 imageString = $r('app.media.card_play')
  653 + }else {
  654 + }
647 } 655 }
648 return imageString; 656 return imageString;
649 } 657 }
@@ -28,10 +28,10 @@ export struct CustomTitleUI { @@ -28,10 +28,10 @@ export struct CustomTitleUI {
28 Text(this.titleName) 28 Text(this.titleName)
29 .maxLines(1) 29 .maxLines(1)
30 .id("title") 30 .id("title")
31 - .fontSize('35lpx') 31 + .fontSize('30lpx')
32 .fontWeight(400) 32 .fontWeight(400)
33 .fontColor($r('app.color.color_222222')) 33 .fontColor($r('app.color.color_222222'))
34 - .lineHeight('42lpx') 34 + .lineHeight('43lpx')
35 .alignRules({ 35 .alignRules({
36 center: {anchor: "__container__", align: VerticalAlign.Center}, 36 center: {anchor: "__container__", align: VerticalAlign.Center},
37 middle: {anchor: "__container__", align: HorizontalAlign.Center} 37 middle: {anchor: "__container__", align: HorizontalAlign.Center}
@@ -29,6 +29,14 @@ @@ -29,6 +29,14 @@
29 "value": "14fp" 29 "value": "14fp"
30 }, 30 },
31 { 31 {
  32 + "name": "font_size_14_5",
  33 + "value": "14.5fp"
  34 + },
  35 + {
  36 + "name": "font_size_15",
  37 + "value": "15fp"
  38 + },
  39 + {
32 "name": "font_size_16", 40 "name": "font_size_16",
33 "value": "16fp" 41 "value": "16fp"
34 }, 42 },
@@ -68,19 +68,35 @@ export struct DetailPlayLiveCommon { @@ -68,19 +68,35 @@ export struct DetailPlayLiveCommon {
68 */ 68 */
69 getContentDetail() { 69 getContentDetail() {
70 this.liveViewModel.getContentDetail(this.contentId, this.relId, this.relType) 70 this.liveViewModel.getContentDetail(this.contentId, this.relId, this.relType)
71 - .then((data: Array<ContentDetailDTO>) => { 71 + .then(async (data: Array<ContentDetailDTO>) => {
72 console.log(TAG, '查询视频详情用于评论展示 getContentDetail:', JSON.stringify(data)) 72 console.log(TAG, '查询视频详情用于评论展示 getContentDetail:', JSON.stringify(data))
73 if (data) { 73 if (data) {
  74 +
74 let detailData = data[0] 75 let detailData = data[0]
  76 + //人民号类型单独获取直播地址
  77 + if (detailData.rmhPlatform === 1) {
  78 +
  79 + let vliveId = detailData.liveInfo.vlive[0].vliveId as string
  80 + console.error(TAG, 'vliveId==' + vliveId)
  81 + let pullStreamAddressData = await this.liveViewModel.getLiveRoomPullAddress(vliveId) as GetPullAddressBean
  82 +
  83 + if (pullStreamAddressData) {
  84 + console.log(TAG, ' GetPullAddressBean:', JSON.stringify(pullStreamAddressData))
  85 + let m3u8uUrl = pullStreamAddressData.transCode[0].m3u8Url
  86 + detailData.liveInfo.vlive[0].liveUrl = m3u8uUrl
  87 + this.playUrl = m3u8uUrl
  88 + console.log(TAG, ' GetPullAddressBean:', m3u8uUrl)
  89 + }
  90 +
  91 + }
  92 +
75 this.liveLandscape = 93 this.liveLandscape =
76 - detailData?.liveInfo?.liveLandScape //String(this.contentDetailData?.liveInfo?.liveLandScape || '') 94 + detailData?.liveInfo?.liveLandScape
77 95
78 this.liveState = detailData.liveInfo?.liveState 96 this.liveState = detailData.liveInfo?.liveState
79 97
80 -  
81 this.contentDetailData = data[0] 98 this.contentDetailData = data[0]
82 99
83 - console.log(TAG, '查询视频详情用于评论展示 openComment:', detailData.openComment)  
84 this.publishCommentModel.targetId = String(detailData?.newsId || '') 100 this.publishCommentModel.targetId = String(detailData?.newsId || '')
85 this.publishCommentModel.targetRelId = String(detailData?.reLInfo?.relId || '') 101 this.publishCommentModel.targetRelId = String(detailData?.reLInfo?.relId || '')
86 this.publishCommentModel.targetTitle = detailData?.newsTitle 102 this.publishCommentModel.targetTitle = detailData?.newsTitle
@@ -100,18 +116,6 @@ export struct DetailPlayLiveCommon { @@ -100,18 +116,6 @@ export struct DetailPlayLiveCommon {
100 this.playUrl = detailData.liveInfo.vlive[0].replayUri 116 this.playUrl = detailData.liveInfo.vlive[0].replayUri
101 } 117 }
102 118
103 - //人民号类型单独获取直播地址  
104 - if (detailData.rmhPlatform === 1) {  
105 -  
106 - let vliveId = detailData.liveInfo.vlive[0].vliveId as string  
107 - console.error(TAG, 'vliveId==' + vliveId)  
108 - this.liveViewModel.getLiveRoomPullAddress(vliveId)  
109 - .then((data: GetPullAddressBean) => {  
110 - console.log(TAG, ' GetPullAddressBean:', JSON.stringify(data))  
111 -  
112 - })  
113 -  
114 - }  
115 119
116 } 120 }
117 }) 121 })
@@ -30,14 +30,7 @@ export class LiveViewModel { @@ -30,14 +30,7 @@ export class LiveViewModel {
30 30
31 } 31 }
32 32
33 - getLiveRoomPullAddress(vliveId:string){  
34 - // return new Promise<GetPullAddressBean>((success, fail) => {  
35 - // this.liveModel.getContentDetail(contentId, relId, relType).then((data) => {  
36 - // success(data)  
37 - // }).catch((message: string) => {  
38 - // fail(message)  
39 - // })  
40 - // }) 33 + async getLiveRoomPullAddress(vliveId:string) : Promise<GetPullAddressBean>{
41 34
42 return new Promise<GetPullAddressBean>((success, fail) => { 35 return new Promise<GetPullAddressBean>((success, fail) => {
43 ContentDetailRequest.getLiveRoomPullStream(vliveId).then(async (resDTO: ResponseDTO<GetPullAddressBean>) => { 36 ContentDetailRequest.getLiveRoomPullStream(vliveId).then(async (resDTO: ResponseDTO<GetPullAddressBean>) => {
@@ -15,6 +15,7 @@ export struct TopPlayComponent { @@ -15,6 +15,7 @@ export struct TopPlayComponent {
15 playerController?: WDAliPlayerController 15 playerController?: WDAliPlayerController
16 // 预告片图片/视频url 16 // 预告片图片/视频url
17 @State previewUrl: string = '' 17 @State previewUrl: string = ''
  18 + // 预告资源是否是视频资源
18 @State isVideoSource: boolean = false 19 @State isVideoSource: boolean = false
19 //未开始 20 //未开始
20 @State isWait: boolean = false 21 @State isWait: boolean = false
@@ -61,6 +62,9 @@ export struct TopPlayComponent { @@ -61,6 +62,9 @@ export struct TopPlayComponent {
61 this.updateData() 62 this.updateData()
62 } 63 }
63 64
  65 + /**
  66 + * 更新直播播放数据
  67 + */
64 updateData() { 68 updateData() {
65 // 检测等待中的直播预告是否视频资源 69 // 检测等待中的直播预告是否视频资源
66 if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewType === 1 70 if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewType === 1
@@ -91,8 +95,11 @@ export struct TopPlayComponent { @@ -91,8 +95,11 @@ export struct TopPlayComponent {
91 } 95 }
92 } 96 }
93 97
  98 +
94 this.isEnd = this.contentDetailData?.liveInfo?.liveState === 'end' && 99 this.isEnd = this.contentDetailData?.liveInfo?.liveState === 'end' &&
95 StringUtils.isEmpty(this.contentDetailData?.liveInfo?.vlive[0]?.replayUri) 100 StringUtils.isEmpty(this.contentDetailData?.liveInfo?.vlive[0]?.replayUri)
  101 +
  102 + Logger.debug(TAG, `---0------>` + this.isWait + ' ->' + this.isLoading + ' ->' + this.isEnd)
96 if (!this.isWait && this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.vlive.length > 0) { 103 if (!this.isWait && this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.vlive.length > 0) {
97 let playUrl = '' 104 let playUrl = ''
98 if (this.contentDetailData.liveInfo.liveState == 'running') { 105 if (this.contentDetailData.liveInfo.liveState == 'running') {
@@ -105,17 +112,29 @@ export struct TopPlayComponent { @@ -105,17 +112,29 @@ export struct TopPlayComponent {
105 this.playUrl = this.previewUrl 112 this.playUrl = this.previewUrl
106 this.tryToPlay() 113 this.tryToPlay()
107 } else { 114 } else {
  115 + Logger.debug(TAG, `---0------>${playUrl}`)
108 if (StringUtils.isNotEmpty(playUrl)) { 116 if (StringUtils.isNotEmpty(playUrl)) {
109 - Logger.debug(TAG, `${playUrl}`)  
110 this.playUrl = playUrl 117 this.playUrl = playUrl
111 this.tryToPlay() 118 this.tryToPlay()
112 } 119 }
113 } 120 }
  121 + }
114 122
  123 + // 文字直播 running 状态
  124 + if (this.contentDetailData?.liveInfo?.liveWay === 1 && this.contentDetailData?.liveInfo?.liveState === 'running') {
  125 + this.isWait = true
  126 + this.isLoading = true
  127 + if (this.contentDetailData.fullColumnImgUrls && this.contentDetailData.fullColumnImgUrls.length > 0) {
  128 + this.previewUrl = this.contentDetailData.fullColumnImgUrls[0].url
  129 + } else {
  130 + this.previewUrl = ''
115 } 131 }
116 } 132 }
117 133
  134 + }
  135 +
118 tryToPlay() { 136 tryToPlay() {
  137 + Logger.debug(TAG, `---1------>`)
119 if (!this.xComponentIsLoaded) { 138 if (!this.xComponentIsLoaded) {
120 Logger.debug(TAG, "需要xComponent加载完成") 139 Logger.debug(TAG, "需要xComponent加载完成")
121 return 140 return
@@ -136,6 +155,7 @@ export struct TopPlayComponent { @@ -136,6 +155,7 @@ export struct TopPlayComponent {
136 this.isLoading = false 155 this.isLoading = false
137 this.isError = false 156 this.isError = false
138 this.xComponentIsLoaded = true 157 this.xComponentIsLoaded = true
  158 + Logger.debug(TAG, `---onLoad------>`)
139 this.tryToPlay() 159 this.tryToPlay()
140 } 160 }
141 }) 161 })
@@ -149,6 +169,7 @@ export struct TopPlayComponent { @@ -149,6 +169,7 @@ export struct TopPlayComponent {
149 // 直播房间图 169 // 直播房间图
150 Image(this.previewUrl) 170 Image(this.previewUrl)
151 .objectFit(ImageFit.Cover) 171 .objectFit(ImageFit.Cover)
  172 + .alt($r('app.media.live_room_image_fail'))
152 .visibility(this.isWait || this.isEnd ? Visibility.Visible : Visibility.None) 173 .visibility(this.isWait || this.isEnd ? Visibility.Visible : Visibility.None)
153 .contrast(this.isEnd ? 0.2 : 1) 174 .contrast(this.isEnd ? 0.2 : 1)
154 .width('100%') 175 .width('100%')
@@ -16,6 +16,7 @@ export struct PlayerComponent { @@ -16,6 +16,7 @@ export struct PlayerComponent {
16 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 16 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
17 @State imgUrl: string = '' 17 @State imgUrl: string = ''
18 @State isWait: boolean = false 18 @State isWait: boolean = false
  19 + // 0-横屏流画面,1-竖屏幕流画面
19 @State liveStreamType: number | null = -1 20 @State liveStreamType: number | null = -1
20 @State playUrl: string = '' 21 @State playUrl: string = ''
21 @State isCanplay: boolean = false 22 @State isCanplay: boolean = false
@@ -95,6 +95,22 @@ struct LaunchAdvertisingPage { @@ -95,6 +95,22 @@ struct LaunchAdvertisingPage {
95 .width('100%') 95 .width('100%')
96 .height('100%') 96 .height('100%')
97 97
  98 + if (this.defaultModel.isAd === '1'){
  99 + Stack({alignContent:Alignment.TopStart}){
  100 + Text('广告')
  101 + .fontColor(Color.White)
  102 + .textAlign(TextAlign.Center)
  103 + .fontSize('24lpx')
  104 + .width('72lpx')
  105 + .height('36lpx')
  106 + .borderRadius(5)
  107 + .margin({top:'10lpx',left:'19lpx'})
  108 + .backgroundColor('#80000000')
  109 + }
  110 + .width('100%')
  111 + .height('100%')
  112 + }
  113 +
98 if(this.defaultModel.screenType != '2'){ 114 if(this.defaultModel.screenType != '2'){
99 //底部logo样式 按钮加载在背景展示图上 115 //底部logo样式 按钮加载在背景展示图上
100 Button(){ 116 Button(){