wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  fix: 1)【uat】进入栏目订阅,点击电影,没有跳转到对应频道
  fix: HOST_PRODUCT
  fix(二级栏目页面):顶部适配
  fix: 18700 UI还原问题-【uat】人民号》推荐》北京专题卡,直播状态 预约、回看图标没有显示
  fix: 18698 UI还原问题-【uat】人民号》推荐》北京专题卡,标题显示不全,看图
  fix: 进入人民号-关注页,查看“赣州消防”人民号-图集卡,鸿蒙版新包未能显示图片数量,
  fix(直播详情页):非Wifi提示
  全局规则-人民号管理端关闭稿件分享开关,号主文章、视频、图集、动态稿件不应展示分享按钮
  fix: 1)适配 直播列表和预告列表页面全屏
  漏提
  fix: 17666 UI还原问题-【uat】进入新闻-健康频道,专题banner 标题字体换行间距有问题,看图
  deviceTypes修改,只保留phone,临时修改。
  fix: 17971 小视频横滑卡-上下间隙较大
  fix: 17499 UI还原问题-【uat】进入新疆频道,轮播图广告数字字体大小偏框宽和android不一致,看图
  fix: 17260 UI还原问题-【uat】乡村振兴巡礼,直播专题,图片显示样式和android不一致,看图
  fix: 17260 UI还原问题-【uat】乡村振兴巡礼,直播专题,图片显示样式和android不一致,看图
  fix:适配全面屏
  fix: 17260 UI还原问题-【uat】乡村振兴巡礼,直播专题,图片显示样式和android不一致,看图
  fix: 17056 UI还原问题--【生产环境】直播预告字体大小显示问题
Showing 41 changed files with 280 additions and 125 deletions
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true 12 "deliveryWithInstall": true
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ] 10 ]
11 } 11 }
12 } 12 }
@@ -11,6 +11,7 @@ export struct CustomToast { @@ -11,6 +11,7 @@ export struct CustomToast {
11 fontSizeValue :number | string | Resource = "27lpx" 11 fontSizeValue :number | string | Resource = "27lpx"
12 lineHeightValue :number | string | Resource = "38lpx" 12 lineHeightValue :number | string | Resource = "38lpx"
13 controller: CustomDialogController 13 controller: CustomDialogController
  14 + marginTop :number | string | Resource = 0
14 15
15 dismiss: () => void = () => { 16 dismiss: () => void = () => {
16 } 17 }
@@ -38,5 +39,6 @@ export struct CustomToast { @@ -38,5 +39,6 @@ export struct CustomToast {
38 .padding({top:"23lpx",bottom:'23lpx',left:"35lpx",right:"35lpx"}) 39 .padding({top:"23lpx",bottom:'23lpx',left:"35lpx",right:"35lpx"})
39 .backgroundColor(this.bgColor) 40 .backgroundColor(this.bgColor)
40 .opacity(this.opacityValue) 41 .opacity(this.opacityValue)
  42 + .margin({top:this.marginTop})
41 } 43 }
42 } 44 }
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true, 12 "deliveryWithInstall": true,
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true, 12 "deliveryWithInstall": true,
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true 12 "deliveryWithInstall": true
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true, 12 "deliveryWithInstall": true,
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true 12 "deliveryWithInstall": true
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true 12 "deliveryWithInstall": true
@@ -44,7 +44,7 @@ export struct CarderInteraction { @@ -44,7 +44,7 @@ export struct CarderInteraction {
44 44
45 build() { 45 build() {
46 Row() { 46 Row() {
47 - if(this.contentDTO.shareFlag === '1'){ 47 + if(this.contentDetailData?.shareInfo?.shareOpen === 1){
48 Row() { 48 Row() {
49 Image($r('app.media.CarderInteraction_share')) 49 Image($r('app.media.CarderInteraction_share'))
50 .width(18) 50 .width(18)
@@ -60,14 +60,9 @@ export struct CarderInteraction { @@ -60,14 +60,9 @@ export struct CarderInteraction {
60 }) 60 })
61 } 61 }
62 62
63 - if(this.contentDTO.rmhInfo != null){  
64 - if(this.contentDTO.shareInfo != null && 1 == this.contentDTO.shareInfo.shareOpen && 1 == this.contentDTO.rmhInfo.cnShareControl){ 63 + if(this.contentDetailData?.openComment == 1){
65 this.commentLayout() 64 this.commentLayout()
66 } 65 }
67 - }else{  
68 - this.commentLayout()  
69 - }  
70 -  
71 this.builderLike() 66 this.builderLike()
72 } 67 }
73 .width('100%') 68 .width('100%')
@@ -12,7 +12,8 @@ import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed @@ -12,7 +12,8 @@ import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed
12 const TAG = 'Card16Component'; 12 const TAG = 'Card16Component';
13 13
14 interface fullColumnImgUrlItem { 14 interface fullColumnImgUrlItem {
15 - url: string 15 + url: string,
  16 + fullUrl: string
16 } 17 }
17 18
18 19
@@ -81,16 +82,46 @@ export struct Card16Component { @@ -81,16 +82,46 @@ export struct Card16Component {
81 .lineHeight(25) 82 .lineHeight(25)
82 } 83 }
83 if (this.contentDTO.fullColumnImgUrls?.length > 0) { 84 if (this.contentDTO.fullColumnImgUrls?.length > 0) {
84 - Flex() { 85 + //三图
  86 + Stack(){
  87 + Row() {
  88 + GridRow({ gutter: 2 }) {
85 ForEach(this.contentDTO.fullColumnImgUrls.slice(0, 3), (item: fullColumnImgUrlItem, index: number) => { 89 ForEach(this.contentDTO.fullColumnImgUrls.slice(0, 3), (item: fullColumnImgUrlItem, index: number) => {
86 - Image(this.loadImg ? item.url : '') 90 + if (index < 3) {
  91 + GridCol({ span: { xs: 4 } }) {
  92 + Image(this.loadImg ? item.url || item.fullUrl : '')
87 .backgroundColor(0xf5f5f5) 93 .backgroundColor(0xf5f5f5)
88 - .flexBasis(113)  
89 - .height(75)  
90 - .margin({ right: index > 1 ? 0 : 2 }) 94 + .width('100%')
  95 + .aspectRatio(113 / 75)
  96 + .borderRadius({
  97 + topLeft: index === 0 ? $r('app.float.image_border_radius') : 0,
  98 + topRight: index === 2 ? $r('app.float.image_border_radius') : 0,
  99 + bottomLeft: index === 0 ? $r('app.float.image_border_radius') : 0,
  100 + bottomRight: index === 2 ? $r('app.float.image_border_radius') : 0,
91 }) 101 })
92 } 102 }
93 } 103 }
  104 + })
  105 + }
  106 + }
  107 + .width(CommonConstants.FULL_PARENT)
  108 + .margin({ top: 8 })
  109 + CardMediaInfo({
  110 + contentDTO: this.contentDTO
  111 + })
  112 + }
  113 + .width(CommonConstants.FULL_PARENT)
  114 + .alignContent(Alignment.BottomEnd)
  115 + // Flex() {
  116 + // ForEach(this.contentDTO.fullColumnImgUrls.slice(0, 3), (item: fullColumnImgUrlItem, index: number) => {
  117 + // Image(this.loadImg ? item.url : '')
  118 + // .backgroundColor(0xf5f5f5)
  119 + // .flexBasis(113)
  120 + // .height(75)
  121 + // .margin({ right: index > 1 ? 0 : 2 })
  122 + // })
  123 + // }
  124 + }
94 CarderInteraction({contentDTO: this.contentDTO}) 125 CarderInteraction({contentDTO: this.contentDTO})
95 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 126 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
96 } 127 }
@@ -53,7 +53,7 @@ export struct Card5Component { @@ -53,7 +53,7 @@ export struct Card5Component {
53 } 53 }
54 ) 54 )
55 .aspectRatio(343 / 225) 55 .aspectRatio(343 / 225)
56 - if (!!this.titleShowPolicy) { 56 + if (!!this.titleShowPolicy || this.titleShowPolicy === null ) {
57 Row() 57 Row()
58 .borderRadius( 58 .borderRadius(
59 { 59 {
@@ -273,14 +273,14 @@ struct indicatorAnimations { @@ -273,14 +273,14 @@ struct indicatorAnimations {
273 if (this.isAutoPlay) { 273 if (this.isAutoPlay) {
274 setTimeout(() => { 274 setTimeout(() => {
275 this.leftW = '100%' 275 this.leftW = '100%'
276 - this.centerFontSize = 11 276 + this.centerFontSize = 10
277 }, 0) 277 }, 0)
278 setTimeout(() => { 278 setTimeout(() => {
279 this.rightW = '100%' 279 this.rightW = '100%'
280 }, 1500) 280 }, 1500)
281 } else { 281 } else {
282 this.leftW = '100%' 282 this.leftW = '100%'
283 - this.centerFontSize = 11 283 + this.centerFontSize = 10
284 this.rightW = '100%' 284 this.rightW = '100%'
285 } 285 }
286 286
@@ -307,7 +307,7 @@ struct indicatorAnimations { @@ -307,7 +307,7 @@ struct indicatorAnimations {
307 Text(this.index + 1 < 10 ? `0${this.index + 1}` : `${this.index + 1}`) 307 Text(this.index + 1 < 10 ? `0${this.index + 1}` : `${this.index + 1}`)
308 .fontSize(this.centerFontSize) 308 .fontSize(this.centerFontSize)
309 .fontColor($r('app.color.white')) 309 .fontColor($r('app.color.white'))
310 - .width(16) 310 + .width(11)
311 .textAlign(TextAlign.Center) 311 .textAlign(TextAlign.Center)
312 .margin({ 312 .margin({
313 bottom: -2 313 bottom: -2
@@ -153,8 +153,8 @@ export struct ZhSingleRow02 { @@ -153,8 +153,8 @@ export struct ZhSingleRow02 {
153 .padding({ 153 .padding({
154 left: $r('app.float.card_comp_pagePadding_lf'), 154 left: $r('app.float.card_comp_pagePadding_lf'),
155 // right: $r('app.float.card_comp_pagePadding_lf'), 155 // right: $r('app.float.card_comp_pagePadding_lf'),
156 - top: $r('app.float.card_comp_pagePadding_tb'),  
157 - bottom: $r('app.float.card_comp_pagePadding_tb') 156 + top: 8,
  157 + bottom: 8
158 }) 158 })
159 .backgroundColor($r('app.color.white')) 159 .backgroundColor($r('app.color.white'))
160 .margin({ bottom: 8 }) 160 .margin({ bottom: 8 })
@@ -244,6 +244,7 @@ export struct ZhSingleRow03 { @@ -244,6 +244,7 @@ export struct ZhSingleRow03 {
244 .width(154) 244 .width(154)
245 .height(60) 245 .height(60)
246 .maxLines(3) 246 .maxLines(3)
  247 + .fontSize(15)
247 .textOverflow({overflow: TextOverflow.Ellipsis}) 248 .textOverflow({overflow: TextOverflow.Ellipsis})
248 } 249 }
249 .margin({bottom: 16}) 250 .margin({bottom: 16})
@@ -254,8 +255,10 @@ export struct ZhSingleRow03 { @@ -254,8 +255,10 @@ export struct ZhSingleRow03 {
254 Text(this.format(new Date(item.liveInfo.liveStartTime).getTime())) 255 Text(this.format(new Date(item.liveInfo.liveStartTime).getTime()))
255 .margin({right: 6}) 256 .margin({right: 6})
256 .fontColor(0x000000) 257 .fontColor(0x000000)
257 - .fontSize(13) 258 + .fontSize(12)
258 .textAlign(TextAlign.Start) 259 .textAlign(TextAlign.Start)
  260 + .fontFamily('PingFang SC-Semibold')
  261 + .fontWeight(600)
259 Image($r('app.media.timeline_rect')) 262 Image($r('app.media.timeline_rect'))
260 .width(4) 263 .width(4)
261 .height(3) 264 .height(3)
@@ -263,10 +266,13 @@ export struct ZhSingleRow03 { @@ -263,10 +266,13 @@ export struct ZhSingleRow03 {
263 Text(item.liveInfo.liveStartTime.split(' ')[1].slice(0, 5)) 266 Text(item.liveInfo.liveStartTime.split(' ')[1].slice(0, 5))
264 .margin({right: 6}) 267 .margin({right: 6})
265 .fontColor(0x000000) 268 .fontColor(0x000000)
266 - .fontSize(13) 269 + .fontSize(12)
  270 + .fontFamily('PingFang SC-Semibold')
  271 + .fontWeight(600)
267 Text('开始直播') 272 Text('开始直播')
268 .fontColor(0xC8C8C8) 273 .fontColor(0xC8C8C8)
269 - .fontSize(13) 274 + .fontSize(12)
  275 + .fontFamily('PingFang SC-Semibold')
270 } 276 }
271 277
272 Row() { 278 Row() {
@@ -14,15 +14,16 @@ export struct LottieView { @@ -14,15 +14,16 @@ export struct LottieView {
14 private politeChickyController: CanvasRenderingContext2D = 14 private politeChickyController: CanvasRenderingContext2D =
15 new CanvasRenderingContext2D(); // CanvasRenderingContext2D对象 15 new CanvasRenderingContext2D(); // CanvasRenderingContext2D对象
16 private animateItem: AnimationItem | null = null; // 初始化loadAnimation接口的返回对象 16 private animateItem: AnimationItem | null = null; // 初始化loadAnimation接口的返回对象
  17 + @Prop title: string
17 18
18 // 页面隐藏销毁动画 19 // 页面隐藏销毁动画
19 - onPageHide(): void {  
20 - this.animateItem?.destroy()  
21 -  
22 - if (this.onComplete) {  
23 - this.animateItem?.removeEventListener('complete', this.onComplete)  
24 - }  
25 - } 20 + // onPageHide(): void {
  21 + // this.animateItem?.destroy()
  22 + //
  23 + // if (this.onComplete) {
  24 + // this.animateItem?.removeEventListener('complete', this.onComplete)
  25 + // }
  26 + // }
26 27
27 /** 28 /**
28 * 加载动画 29 * 加载动画
@@ -31,7 +32,7 @@ export struct LottieView { @@ -31,7 +32,7 @@ export struct LottieView {
31 loadAnimation() { 32 loadAnimation() {
32 // 销毁动画,减少缓存 33 // 销毁动画,减少缓存
33 if (this.animateItem !== null) { 34 if (this.animateItem !== null) {
34 - this.animateItem.destroy(); 35 + this.animateItem.destroy(this.name);
35 this.animateItem = null; 36 this.animateItem = null;
36 } 37 }
37 38
@@ -54,6 +55,32 @@ export struct LottieView { @@ -54,6 +55,32 @@ export struct LottieView {
54 55
55 } 56 }
56 57
  58 + aboutToAppear(): void {
  59 + // console.error('XXXXZZZZ', '-------aboutToAppear-------' + this.title)
  60 + //lottie?.play()
  61 +
  62 + // if(this.init){
  63 + // if(this.animateItem = null){
  64 + // this.loadAnimation();
  65 + // }
  66 + // }
  67 +
  68 +
  69 + }
  70 +
  71 + aboutToDisappear(): void {
  72 + // console.error('XXXXZZZZ', '-------aboutToDisappear-------' + this.title)
  73 + // if(this.init){
  74 + // lottie?.destroy(this.name)
  75 + //
  76 + // if (this.onComplete) {
  77 + // this.animateItem?.removeEventListener('complete', this.onComplete)
  78 + // }
  79 + // this.animateItem = null;
  80 + // // }
  81 +
  82 + }
  83 +
57 build() { 84 build() {
58 Stack({ alignContent: Alignment.TopStart }) { 85 Stack({ alignContent: Alignment.TopStart }) {
59 Canvas(this.politeChickyController) 86 Canvas(this.politeChickyController)
@@ -65,9 +92,13 @@ export struct LottieView { @@ -65,9 +92,13 @@ export struct LottieView {
65 this.onReady(this.animateItem) 92 this.onReady(this.animateItem)
66 } 93 }
67 }) 94 })
68 - .onClick(() => {  
69 - this.animateItem?.play() 95 + .onDisAppear(() => {
  96 + lottie.destroy(this.name)
  97 + this.animateItem = null;
  98 + }).onAppear(()=>{
  99 + this.loadAnimation();
70 }) 100 })
  101 +
71 } 102 }
72 } 103 }
73 } 104 }
@@ -31,7 +31,7 @@ let preferenceTheme: dataPreferences.Preferences | null = null @@ -31,7 +31,7 @@ let preferenceTheme: dataPreferences.Preferences | null = null
31 @Component 31 @Component
32 struct LiveMorePage { 32 struct LiveMorePage {
33 @State data: LazyDataSource<ContentDTO> = new LazyDataSource(); 33 @State data: LazyDataSource<ContentDTO> = new LazyDataSource();
34 - topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; 34 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number;
35 @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 35 @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
36 type: number = 1; 36 type: number = 1;
37 pageSize: number = 20; 37 pageSize: number = 20;
@@ -46,11 +46,9 @@ struct LiveMorePage { @@ -46,11 +46,9 @@ struct LiveMorePage {
46 @State liveRoomList: LiveRoomDataBean[] = [] 46 @State liveRoomList: LiveRoomDataBean[] = []
47 // 点击过的数据 47 // 点击过的数据
48 @State clickDatas: Array<string> = [] 48 @State clickDatas: Array<string> = []
49 -  
50 @State loadImg: boolean = false; 49 @State loadImg: boolean = false;
51 50
52 -  
53 - async aboutToAppear() : Promise<void>{ 51 + async aboutToAppear(): Promise<void> {
54 await this.getPreferencesFromStorage() 52 await this.getPreferencesFromStorage()
55 this.loadImg = await onlyWifiLoadImg(); 53 this.loadImg = await onlyWifiLoadImg();
56 this.getLivMoreClickPreference() 54 this.getLivMoreClickPreference()
@@ -60,16 +58,9 @@ struct LiveMorePage { @@ -60,16 +58,9 @@ struct LiveMorePage {
60 } 58 }
61 59
62 build() { 60 build() {
63 - // Navigation() {  
64 - // //滑动区域  
65 - // this.ListLayout()  
66 - // }  
67 - // .titleMode(NavigationTitleMode.Mini)  
68 - // .title('直播列表')  
69 61
70 Column() { 62 Column() {
71 this.TabbarNormal() 63 this.TabbarNormal()
72 -  
73 if (this.viewType == ViewType.LOADING) { 64 if (this.viewType == ViewType.LOADING) {
74 this.LoadingLayout() 65 this.LoadingLayout()
75 } else if (this.viewType == ViewType.ERROR) { 66 } else if (this.viewType == ViewType.ERROR) {
@@ -96,15 +87,13 @@ struct LiveMorePage { @@ -96,15 +87,13 @@ struct LiveMorePage {
96 }) 87 })
97 } 88 }
98 } 89 }
  90 + .height('100%')
99 .padding({ 91 .padding({
100 left: $r('app.float.card_comp_pagePadding_lf'), 92 left: $r('app.float.card_comp_pagePadding_lf'),
101 right: $r('app.float.card_comp_pagePadding_lf'), 93 right: $r('app.float.card_comp_pagePadding_lf'),
102 - bottom: $r('app.float.card_comp_pagePadding_tb')  
103 - })  
104 - .margin({bottom:px2vp(this.bottomSafeHeight)})  
105 - .onClick(() => {  
106 - ProcessUtils.processPage(this.contentDTO) 94 + top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)
107 }) 95 })
  96 +
108 } 97 }
109 98
110 @Builder 99 @Builder
@@ -133,7 +122,7 @@ struct LiveMorePage { @@ -133,7 +122,7 @@ struct LiveMorePage {
133 } 122 }
134 .scrollBar(BarState.Off) 123 .scrollBar(BarState.Off)
135 .edgeEffect(EdgeEffect.None) 124 .edgeEffect(EdgeEffect.None)
136 - .cachedCount(8) 125 + .cachedCount(3)
137 .height('calc(100% - 44vp)') 126 .height('calc(100% - 44vp)')
138 .onReachEnd(() => { 127 .onReachEnd(() => {
139 Logger.debug(TAG, "触底了"); 128 Logger.debug(TAG, "触底了");
@@ -160,9 +149,10 @@ struct LiveMorePage { @@ -160,9 +149,10 @@ struct LiveMorePage {
160 .margin({ top: 16, bottom: 8 }) 149 .margin({ top: 16, bottom: 8 })
161 .alignSelf(ItemAlign.Start) 150 .alignSelf(ItemAlign.Start)
162 .fontColor(this.isClicked(item.objectId) ? $r('app.color.color_848484') : $r('app.color.color_222222')) 151 .fontColor(this.isClicked(item.objectId) ? $r('app.color.color_848484') : $r('app.color.color_222222'))
  152 +
163 Stack() { 153 Stack() {
164 if (item.fullColumnImgUrls && item.fullColumnImgUrls.length > 0) { 154 if (item.fullColumnImgUrls && item.fullColumnImgUrls.length > 0) {
165 - Image(this.loadImg?item.fullColumnImgUrls[0].url:'') 155 + Image(this.loadImg ? item.fullColumnImgUrls[0].url : '')
166 .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5) 156 .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5)
167 .width('100%') 157 .width('100%')
168 .aspectRatio(16 / 9) 158 .aspectRatio(16 / 9)
@@ -246,7 +236,6 @@ struct LiveMorePage { @@ -246,7 +236,6 @@ struct LiveMorePage {
246 }) 236 })
247 } 237 }
248 .height(44) 238 .height(44)
249 - .margin({top:this.topSafeHeight+'px'})  
250 .width('100%') 239 .width('100%')
251 } 240 }
252 241
@@ -260,24 +249,25 @@ struct LiveMorePage { @@ -260,24 +249,25 @@ struct LiveMorePage {
260 lottieHeight: 14, 249 lottieHeight: 14,
261 autoplay: true, 250 autoplay: true,
262 loop: true, 251 loop: true,
  252 + title: item.newsTitle
263 }) 253 })
264 .margin({ 254 .margin({
265 right: '2vp' 255 right: '2vp'
266 }) 256 })
  257 +
267 Text('直播中') 258 Text('直播中')
268 .fontSize('12vp') 259 .fontSize('12vp')
269 .fontWeight(400) 260 .fontWeight(400)
270 .fontColor(Color.White) 261 .fontColor(Color.White)
271 - .textShadow({ radius: 2, color: 'rgba(0,0,0,0.3)', offsetX: 0, offsetY: 2 }) 262 + .textShadow({
  263 + radius: 2,
  264 + color: 'rgba(0,0,0,0.3)',
  265 + offsetX: 0,
  266 + offsetY: 2
  267 + })
272 .margin({ 268 .margin({
273 right: '5vp' 269 right: '5vp'
274 }) 270 })
275 - // Divider()  
276 - // .vertical(true)  
277 - // .strokeWidth(1)  
278 - // .height('12vp')  
279 - // .margin({ top: 2, bottom: 2 })  
280 - // .color(Color.White)  
281 271
282 Image($r('app.media.icon_comp_line_live')).height('11vp').width('1.5vp') 272 Image($r('app.media.icon_comp_line_live')).height('11vp').width('1.5vp')
283 273
@@ -285,7 +275,12 @@ struct LiveMorePage { @@ -285,7 +275,12 @@ struct LiveMorePage {
285 Text(this.getLiveRoomNumber(item)) 275 Text(this.getLiveRoomNumber(item))
286 .fontSize('12vp') 276 .fontSize('12vp')
287 .fontWeight(400) 277 .fontWeight(400)
288 - .textShadow({ radius: 2, color: 'rgba(0,0,0,0.3)', offsetX: 0, offsetY: 2 }) 278 + .textShadow({
  279 + radius: 2,
  280 + color: 'rgba(0,0,0,0.3)',
  281 + offsetX: 0,
  282 + offsetY: 2
  283 + })
289 .fontColor(Color.White) 284 .fontColor(Color.White)
290 .margin({ 285 .margin({
291 left: '5vp' 286 left: '5vp'
@@ -422,7 +417,7 @@ struct LiveMorePage { @@ -422,7 +417,7 @@ struct LiveMorePage {
422 const arr: Array<string> = [] 417 const arr: Array<string> = []
423 arr.push(...this.clickDatas) 418 arr.push(...this.clickDatas)
424 preferenceTheme.put('liveMorePage', arr).then(() => { 419 preferenceTheme.put('liveMorePage', arr).then(() => {
425 - Logger.debug(TAG,"Succeeded in putting value of 'startup'."); 420 + Logger.debug(TAG, "Succeeded in putting value of 'startup'.");
426 }).catch((err: BusinessError) => { 421 }).catch((err: BusinessError) => {
427 Logger.debug(TAG, "Failed to put value of 'startup'. code =" + err.code + ", message =" + err.message); 422 Logger.debug(TAG, "Failed to put value of 'startup'. code =" + err.code + ", message =" + err.message);
428 }) 423 })
@@ -347,14 +347,18 @@ export struct TopNavigationComponentNew { @@ -347,14 +347,18 @@ export struct TopNavigationComponentNew {
347 } else if (this.isLayoutByIndex(index)) { 347 } else if (this.isLayoutByIndex(index)) {
348 ProcessUtils.gotoENewsPaper() 348 ProcessUtils.gotoENewsPaper()
349 } else { 349 } else {
350 - this.currentTopNavSelectedIndex = index  
351 this.changePage(index) 350 this.changePage(index)
352 } 351 }
353 } 352 }
354 }) 353 })
355 } 354 }
356 355
  356 + /**
  357 + * 改变频道页
  358 + * @param index 频道所在的序列号
  359 + */
357 private changePage(index: number) { 360 private changePage(index: number) {
  361 + this.currentTopNavSelectedIndex = index
358 this.swiperController.changeIndex(index) 362 this.swiperController.changeIndex(index)
359 this.listScroller.scrollToIndex(index, true, ScrollAlign.CENTER) 363 this.listScroller.scrollToIndex(index, true, ScrollAlign.CENTER)
360 } 364 }
@@ -26,7 +26,9 @@ import { PeopleShipAttentionContentListTopComponent } from './PeopleShipAttentio @@ -26,7 +26,9 @@ import { PeopleShipAttentionContentListTopComponent } from './PeopleShipAttentio
26 import { CardParser } from '../CardParser' 26 import { CardParser } from '../CardParser'
27 import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData'; 27 import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData';
28 const TAG = 'PeopleShipMainComponent'; 28 const TAG = 'PeopleShipMainComponent';
29 -@Preview 29 +/**
  30 + * 人民号 --- 关注
  31 + */
30 @Component 32 @Component
31 export struct PeopleShipMainComponent { 33 export struct PeopleShipMainComponent {
32 @State private pageModel: PageModel = new PageModel(); 34 @State private pageModel: PageModel = new PageModel();
@@ -422,6 +424,7 @@ export struct PeopleShipMainComponent { @@ -422,6 +424,7 @@ export struct PeopleShipMainComponent {
422 } 424 }
423 // 当前页面,自动刷新数据 425 // 当前页面,自动刷新数据
424 Logger.debug(TAG, 'page onAutoRefresh ' + this.autoRefresh) 426 Logger.debug(TAG, 'page onAutoRefresh ' + this.autoRefresh)
  427 + this.listScroller.scrollToIndex(0)
425 this.currentPage = 1 428 this.currentPage = 1
426 this.getData() 429 this.getData()
427 } 430 }
@@ -31,7 +31,8 @@ const TAG: string = 'ReserveMorePage'; @@ -31,7 +31,8 @@ const TAG: string = 'ReserveMorePage';
31 struct ReserveMorePage { 31 struct ReserveMorePage {
32 @State data: LazyDataSource<ContentDTO> = new LazyDataSource(); 32 @State data: LazyDataSource<ContentDTO> = new LazyDataSource();
33 private reserveList: ReserveItemBean[] = [] 33 private reserveList: ReserveItemBean[] = []
34 - topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; 34 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number;
  35 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
35 type: number = 2; 36 type: number = 2;
36 pageSize: number = 20; 37 pageSize: number = 20;
37 title: string = '直播预告' 38 title: string = '直播预告'
@@ -78,10 +79,13 @@ struct ReserveMorePage { @@ -78,10 +79,13 @@ struct ReserveMorePage {
78 this.currentPage = 1 79 this.currentPage = 1
79 this.getData(resolve) 80 this.getData(resolve)
80 }, 81 },
81 - }) 82 + }).backgroundColor($r('app.color.color_F5F5F5'))
82 } 83 }
83 84
84 - }.backgroundColor($r('app.color.color_F5F5F5')) 85 + }.height('100%').backgroundColor('#FFFFFF').padding({
  86 + top: px2vp(this.topSafeHeight),
  87 + bottom: px2vp(this.bottomSafeHeight)
  88 + })
85 89
86 } 90 }
87 91
@@ -306,8 +310,7 @@ struct ReserveMorePage { @@ -306,8 +310,7 @@ struct ReserveMorePage {
306 middle: { anchor: "__container__", align: HorizontalAlign.Center } 310 middle: { anchor: "__container__", align: HorizontalAlign.Center }
307 }) 311 })
308 } 312 }
309 - .height(vp2px(44) + this.topSafeHeight + 'px')  
310 - .padding({ top: this.topSafeHeight + 'px' }) 313 + .height(44)
311 .width('100%').backgroundColor('#FFFFFF') 314 .width('100%').backgroundColor('#FFFFFF')
312 315
313 } 316 }
@@ -2,6 +2,7 @@ import { CommonConstants } from 'wdConstant' @@ -2,6 +2,7 @@ import { CommonConstants } from 'wdConstant'
2 import { ContentDTO, CompDTO, Action, Params } from 'wdBean' 2 import { ContentDTO, CompDTO, Action, Params } from 'wdBean'
3 import { ProcessUtils, WDRouterRule, WDRouterPage } from 'wdRouter'; 3 import { ProcessUtils, WDRouterRule, WDRouterPage } from 'wdRouter';
4 import { InfomationCardClick } from '../../utils/infomationCardClick'; 4 import { InfomationCardClick } from '../../utils/infomationCardClick';
  5 +import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
5 6
6 @Component 7 @Component
7 export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { 8 export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
@@ -128,11 +129,18 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -128,11 +129,18 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
128 Row() { 129 Row() {
129 ForEach(this.compDTO.operDataList, (item: ContentDTO, index: number) => { 130 ForEach(this.compDTO.operDataList, (item: ContentDTO, index: number) => {
130 Column() { 131 Column() {
  132 + Stack() {
131 Image(item.coverUrl) 133 Image(item.coverUrl)
132 .aspectRatio(1.5) 134 .aspectRatio(1.5)
133 .width(this.compDTO.operDataList.length == 2 ? 210 : 150) 135 .width(this.compDTO.operDataList.length == 2 ? 210 : 150)
134 .borderRadius(4) 136 .borderRadius(4)
135 .objectFit(ImageFit.Cover) 137 .objectFit(ImageFit.Cover)
  138 + CardMediaInfo({
  139 + livePeopleNum:false,
  140 + contentDTO: item
  141 + })
  142 + }
  143 + .align(Alignment.BottomEnd)
136 144
137 Text(item.newsTitle) 145 Text(item.newsTitle)
138 .fontSize($r("app.float.font_size_14")) 146 .fontSize($r("app.float.font_size_14"))
@@ -142,11 +150,10 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -142,11 +150,10 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
142 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 150 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
143 .textAlign(TextAlign.Start) 151 .textAlign(TextAlign.Start)
144 .margin({ top: 8 }) 152 .margin({ top: 8 })
145 - .width(150)  
146 - .lineHeight(19)  
147 - .height(42) 153 + .width(this.compDTO.operDataList.length == 2 ? 210 : 150)
148 .lineHeight(21) 154 .lineHeight(21)
149 } 155 }
  156 + .height(this.compDTO.operDataList.length == 2 ? 190 : 150)
150 .padding({ right: 16 }) 157 .padding({ right: 16 })
151 // .offset({x:16}) 158 // .offset({x:16})
152 .onClick(() => { 159 .onClick(() => {
@@ -218,7 +225,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -218,7 +225,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
218 left: $r('app.float.card_comp_pagePadding_lf'), 225 left: $r('app.float.card_comp_pagePadding_lf'),
219 right: $r('app.float.card_comp_pagePadding_lf'), 226 right: $r('app.float.card_comp_pagePadding_lf'),
220 top: $r('app.float.card_comp_pagePadding_tb'), 227 top: $r('app.float.card_comp_pagePadding_tb'),
221 - bottom: $r('app.float.card_comp_pagePadding_tb') 228 + bottom: 6
222 }) 229 })
223 .backgroundColor($r("app.color.white")) 230 .backgroundColor($r("app.color.white"))
224 // .backgroundColor($r("app.color.color_FE4B05")) 231 // .backgroundColor($r("app.color.color_FE4B05"))
@@ -146,16 +146,18 @@ export struct LiveHorizontalCardComponent { @@ -146,16 +146,18 @@ export struct LiveHorizontalCardComponent {
146 Column() { 146 Column() {
147 Stack({ alignContent: Alignment.BottomEnd }) { 147 Stack({ alignContent: Alignment.BottomEnd }) {
148 Image(this.loadImg ? item.coverUrl : '') 148 Image(this.loadImg ? item.coverUrl : '')
149 - .backgroundColor(0xf5f5f5) 149 + .backgroundColor(this.loadImg ? 0xffffff : 0xf5f5f5)
150 .aspectRatio(16 / 9) 150 .aspectRatio(16 / 9)
151 .width(this.compDTO.operDataList.length == 2 ? 210 : 150) 151 .width(this.compDTO.operDataList.length == 2 ? 210 : 150)
152 - .borderRadius(4)  
153 - .objectFit(ImageFit.Cover) 152 + // .borderRadius(4)
  153 + .objectFit(ImageFit.Contain)
154 CardMediaInfo({ 154 CardMediaInfo({
155 livePeopleNum:false, 155 livePeopleNum:false,
156 contentDTO: item 156 contentDTO: item
157 }) 157 })
158 } 158 }
  159 + .borderRadius(4)
  160 + .border({width: 1, color: 0xf5f5f5})
159 161
160 Text(item.newsTitle) 162 Text(item.newsTitle)
161 .fontSize($r("app.float.font_size_14")) 163 .fontSize($r("app.float.font_size_14"))
@@ -168,7 +170,7 @@ export struct LiveHorizontalCardComponent { @@ -168,7 +170,7 @@ export struct LiveHorizontalCardComponent {
168 .width(this.compDTO.operDataList.length == 2 ? 210 : 150) 170 .width(this.compDTO.operDataList.length == 2 ? 210 : 150)
169 .lineHeight(21) 171 .lineHeight(21)
170 } 172 }
171 - .height(134) 173 + .height(this.compDTO.operDataList.length == 2 ? 190 : 150)
172 .padding({ right: 16 }) 174 .padding({ right: 16 })
173 .onClick(() => { 175 .onClick(() => {
174 InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) 176 InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
@@ -241,7 +243,7 @@ export struct LiveHorizontalCardComponent { @@ -241,7 +243,7 @@ export struct LiveHorizontalCardComponent {
241 left: $r('app.float.card_comp_pagePadding_lf'), 243 left: $r('app.float.card_comp_pagePadding_lf'),
242 right: $r('app.float.card_comp_pagePadding_lf'), 244 right: $r('app.float.card_comp_pagePadding_lf'),
243 top: $r('app.float.card_comp_pagePadding_tb'), 245 top: $r('app.float.card_comp_pagePadding_tb'),
244 - bottom: $r('app.float.card_comp_pagePadding_tb') 246 + bottom: 6
245 }) 247 })
246 .backgroundColor($r("app.color.white")) 248 .backgroundColor($r("app.color.white"))
247 } 249 }
@@ -156,6 +156,7 @@ export struct OperRowListView { @@ -156,6 +156,7 @@ export struct OperRowListView {
156 this.likeBean['contentRelId'] = this.contentDetailData?.reLInfo?.relId + '' 156 this.likeBean['contentRelId'] = this.contentDetailData?.reLInfo?.relId + ''
157 } 157 }
158 console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData)) 158 console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData))
  159 + console.info(TAG, 'this.contentDetailData.shareInfo.shareOpen', JSON.stringify(this.contentDetailData.shareInfo.shareOpen))
159 console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean)) 160 console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean))
160 console.info(TAG, 'this.operationButtonList', JSON.stringify(this.operationButtonList)) 161 console.info(TAG, 'this.operationButtonList', JSON.stringify(this.operationButtonList))
161 162
@@ -384,6 +385,7 @@ export struct OperRowListView { @@ -384,6 +385,7 @@ export struct OperRowListView {
384 */ 385 */
385 @Builder 386 @Builder
386 builderShare() { 387 builderShare() {
  388 + if(this.contentDetailData?.shareInfo?.shareOpen == 1) {
387 Column() { 389 Column() {
388 Image(this.styleType == 1 ? $r('app.media.iv_live_comment_share') : 390 Image(this.styleType == 1 ? $r('app.media.iv_live_comment_share') :
389 $r('app.media.iv_live_comment_share_white')) 391 $r('app.media.iv_live_comment_share_white'))
@@ -401,6 +403,7 @@ export struct OperRowListView { @@ -401,6 +403,7 @@ export struct OperRowListView {
401 .borderRadius(18) 403 .borderRadius(18)
402 .backgroundColor(this.pageComponentType === 2 ? '#4D000000' : Color.Transparent) 404 .backgroundColor(this.pageComponentType === 2 ? '#4D000000' : Color.Transparent)
403 } 405 }
  406 + }
404 407
405 handleStyle() { 408 handleStyle() {
406 if (this.styleType == 1) { 409 if (this.styleType == 1) {
@@ -26,6 +26,8 @@ struct SearchCreatorPage { @@ -26,6 +26,8 @@ struct SearchCreatorPage {
26 @State isLoading: boolean = false 26 @State isLoading: boolean = false
27 @State hasMore: boolean = true 27 @State hasMore: boolean = true
28 curPageNum: number = 1; 28 curPageNum: number = 1;
  29 + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
  30 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
29 31
30 onPageShow() { 32 onPageShow() {
31 this.keyword = this.params?.pageID; 33 this.keyword = this.params?.pageID;
@@ -154,6 +156,7 @@ struct SearchCreatorPage { @@ -154,6 +156,7 @@ struct SearchCreatorPage {
154 } 156 }
155 157
156 build() { 158 build() {
  159 + Column(){
157 Column() { 160 Column() {
158 CustomTitleUI({ titleName: "全部结果" }) 161 CustomTitleUI({ titleName: "全部结果" })
159 Divider() 162 Divider()
@@ -200,5 +203,10 @@ struct SearchCreatorPage { @@ -200,5 +203,10 @@ struct SearchCreatorPage {
200 } 203 }
201 .width('100%') 204 .width('100%')
202 .height('100%') 205 .height('100%')
  206 + }.width("100%")
  207 + .height("100%")
  208 + .backgroundColor($r('app.color.color_transparent'))
  209 + .padding({top:px2vp(this.topSafeHeight)})
  210 +
203 } 211 }
204 } 212 }
@@ -15,4 +15,18 @@ async function onlyWifiLoadImg(): Promise<boolean> { @@ -15,4 +15,18 @@ async function onlyWifiLoadImg(): Promise<boolean> {
15 return false 15 return false
16 } 16 }
17 17
18 -export { onlyWifiLoadImg }  
  18 +async function onlyWifiLoadVideo(): Promise<boolean> {
  19 + let loadImageOnlyWifiSwitch = await SPHelper.default.get(SpConstants.SETTING_WIFI_VIDEO_SWITCH, '') || false;
  20 + if (!loadImageOnlyWifiSwitch) {
  21 + // 开关没开,直接让加载视频
  22 + return true
  23 + }
  24 + let netWorkStatus = NetworkUtil.getNetworkType();
  25 + // 开关打开,wifi下才加载视频
  26 + if (netWorkStatus === NetworkUtil.TYPE_WIFI) {
  27 + return true
  28 + }
  29 + return false
  30 +}
  31 +
  32 +export { onlyWifiLoadImg,onlyWifiLoadVideo }
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true, 12 "deliveryWithInstall": true,
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true, 12 "deliveryWithInstall": true,
@@ -4,12 +4,13 @@ import { TabComponent } from '../widgets/details/TabComponent'; @@ -4,12 +4,13 @@ import { TabComponent } from '../widgets/details/TabComponent';
4 import { TopPlayComponent } from '../widgets/details/video/TopPlayComponet'; 4 import { TopPlayComponent } from '../widgets/details/video/TopPlayComponet';
5 import { DisplayDirection } from 'wdConstant/Index'; 5 import { DisplayDirection } from 'wdConstant/Index';
6 import mediaquery from '@ohos.mediaquery'; 6 import mediaquery from '@ohos.mediaquery';
7 -import { Logger, WindowModel } from 'wdKit/Index'; 7 +import { CustomToast, Logger, WindowModel } from 'wdKit/Index';
8 import { router, window } from '@kit.ArkUI'; 8 import { router, window } from '@kit.ArkUI';
9 import { WDAliPlayerController } from 'wdPlayer/Index'; 9 import { WDAliPlayerController } from 'wdPlayer/Index';
10 import { LiveOperRowListView } from 'wdComponent'; 10 import { LiveOperRowListView } from 'wdComponent';
11 import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel'; 11 import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel';
12 import { TrackConstants, TrackingContent, TrackParamConvert } from 'wdTracking/Index'; 12 import { TrackConstants, TrackingContent, TrackParamConvert } from 'wdTracking/Index';
  13 +import { onlyWifiLoadVideo } from 'wdComponent/src/main/ets/utils/lazyloadImg';
13 14
14 let TAG: string = 'DetailPlayLivePage'; 15 let TAG: string = 'DetailPlayLivePage';
15 16
@@ -41,7 +42,28 @@ export struct DetailPlayLivePage { @@ -41,7 +42,28 @@ export struct DetailPlayLivePage {
41 // 顶部状态栏高度 42 // 顶部状态栏高度
42 @Consume topSafeHeight: number 43 @Consume topSafeHeight: number
43 44
44 - aboutToAppear(): void { 45 + @State toastText: ResourceStr = "这是一个非Wi-Fi环境。请注意流量消耗"
  46 + dialogToast: CustomDialogController = new CustomDialogController({
  47 + builder: CustomToast({
  48 + bgColor: 0xB3000000,
  49 + opacityValue: 1,
  50 + fontSizeValue: "25lpx",
  51 + lineHeightValue: "36lpx",
  52 + msg: this.toastText,
  53 + marginTop:211/2+px2vp(this.topSafeHeight)-px2vp(84/2)
  54 + }),
  55 + autoCancel: false,
  56 + alignment: DialogAlignment.Top,
  57 + customStyle: true,
  58 + maskColor: "#00000000"
  59 + })
  60 +
  61 + showToastTip(msg: ResourceStr) {
  62 + this.toastText = msg
  63 + this.dialogToast.open()
  64 + }
  65 +
  66 + async aboutToAppear(): Promise<void> {
45 Logger.info(TAG, `wyj-aboutToAppear`) 67 Logger.info(TAG, `wyj-aboutToAppear`)
46 68
47 this.listener?.on("change", (mediaQueryResult) => { 69 this.listener?.on("change", (mediaQueryResult) => {
@@ -56,6 +78,9 @@ export struct DetailPlayLivePage { @@ -56,6 +78,9 @@ export struct DetailPlayLivePage {
56 this.getLiveDetails() 78 this.getLiveDetails()
57 this.getLiveRoomData() 79 this.getLiveRoomData()
58 80
  81 + if(!await onlyWifiLoadVideo()){
  82 + this.showToastTip(this.toastText)
  83 + }
59 } 84 }
60 85
61 async aboutToDisappear() { 86 async aboutToDisappear() {
@@ -115,7 +140,6 @@ export struct DetailPlayLivePage { @@ -115,7 +140,6 @@ export struct DetailPlayLivePage {
115 } 140 }
116 .height('100%') 141 .height('100%')
117 .width('100%') 142 .width('100%')
118 -  
119 } 143 }
120 144
121 onPageShowCus(): void { 145 onPageShowCus(): void {
1 import { ContentDetailDTO, LiveRoomDataBean } from 'wdBean/Index'; 1 import { ContentDetailDTO, LiveRoomDataBean } from 'wdBean/Index';
2 import { LiveViewModel } from '../viewModel/LiveViewModel'; 2 import { LiveViewModel } from '../viewModel/LiveViewModel';
3 -import { WindowModel } from 'wdKit/Index'; 3 +import { CustomToast, WindowModel } from 'wdKit/Index';
4 import { PlayerComponent } from '../widgets/vertical/PlayerComponent'; 4 import { PlayerComponent } from '../widgets/vertical/PlayerComponent';
5 import { PlayerInfoComponent } from '../widgets/vertical/PlayerInfoComponent'; 5 import { PlayerInfoComponent } from '../widgets/vertical/PlayerInfoComponent';
6 import { WDAliPlayerController } from 'wdPlayer/Index'; 6 import { WDAliPlayerController } from 'wdPlayer/Index';
@@ -9,6 +9,7 @@ import { LiveEmptyComponent, WDLiveViewDefaultType } from 'wdComponent/Index'; @@ -9,6 +9,7 @@ import { LiveEmptyComponent, WDLiveViewDefaultType } from 'wdComponent/Index';
9 import { PlayerEndView } from '../widgets/vertical/PlayerEndView'; 9 import { PlayerEndView } from '../widgets/vertical/PlayerEndView';
10 import { TrackConstants, TrackingButton } from 'wdTracking/Index'; 10 import { TrackConstants, TrackingButton } from 'wdTracking/Index';
11 import { LiveDetailPageLogic } from '../viewModel/LiveDetailPageLogic'; 11 import { LiveDetailPageLogic } from '../viewModel/LiveDetailPageLogic';
  12 +import { onlyWifiLoadVideo } from 'wdComponent/src/main/ets/utils/lazyloadImg';
12 13
13 const storage = LocalStorage.getShared(); 14 const storage = LocalStorage.getShared();
14 const TAG = 'DetailPlayVLivePage' 15 const TAG = 'DetailPlayVLivePage'
@@ -40,11 +41,32 @@ export struct DetailPlayVLivePage { @@ -40,11 +41,32 @@ export struct DetailPlayVLivePage {
40 //播放错误 41 //播放错误
41 @State isPlayerError: boolean = false 42 @State isPlayerError: boolean = false
42 @State isCanplay: boolean = false 43 @State isCanplay: boolean = false
  44 + @State toastText: ResourceStr = "这是一个非Wi-Fi环境。请注意流量消耗"
  45 + dialogToast: CustomDialogController = new CustomDialogController({
  46 + builder: CustomToast({
  47 + bgColor: 0xB3000000,
  48 + opacityValue: 1,
  49 + fontSizeValue: "25lpx",
  50 + lineHeightValue: "36lpx",
  51 + msg: this.toastText,
  52 + }),
  53 + autoCancel: false,
  54 + alignment: DialogAlignment.Center,
  55 + customStyle: true,
  56 + maskColor: "#00000000"
  57 + })
  58 +
  59 + showToastTip(msg: ResourceStr) {
  60 + this.toastText = msg
  61 + this.dialogToast.open()
  62 + }
43 63
44 - aboutToAppear(): void { 64 + async aboutToAppear(): Promise<void> {
45 this.openFullScreen() 65 this.openFullScreen()
46 this.getLiveRoomData() 66 this.getLiveRoomData()
47 - 67 + if(!await onlyWifiLoadVideo()){
  68 + this.showToastTip(this.toastText)
  69 + }
48 } 70 }
49 71
50 aboutToDisappear(): void { 72 aboutToDisappear(): void {
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true, 12 "deliveryWithInstall": true,
@@ -208,13 +208,17 @@ export struct PlayerRightView { @@ -208,13 +208,17 @@ export struct PlayerRightView {
208 build() { 208 build() {
209 Column() { 209 Column() {
210 this.userBuilderView() 210 this.userBuilderView()
  211 + if (this.contentDetailData?.openLikes == 1) {
211 this.likeBuilderView() 212 this.likeBuilderView()
  213 + }
212 this.collectBuilderView() 214 this.collectBuilderView()
213 - if (this.contentDetailData.openComment == 1) { 215 + if (this.contentDetailData?.openComment == 1) {
214 this.commentBuilderView() 216 this.commentBuilderView()
215 } 217 }
  218 + if(this.contentDetailData?.shareInfo?.shareOpen == 1) {
216 this.shareBuilderView() 219 this.shareBuilderView()
217 } 220 }
  221 + }
218 // .backgroundColor(Color.Blue) 222 // .backgroundColor(Color.Blue)
219 // .height('100%') 223 // .height('100%')
220 .width(58) 224 .width(58)
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true, 12 "deliveryWithInstall": true,
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true, 12 "deliveryWithInstall": true,
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true, 12 "deliveryWithInstall": true,
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true 12 "deliveryWithInstall": true
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true, 12 "deliveryWithInstall": true,
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true, 12 "deliveryWithInstall": true,
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true, 12 "deliveryWithInstall": true,
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 "description": "$string:shared_desc", 5 "description": "$string:shared_desc",
6 "deviceTypes": [ 6 "deviceTypes": [
7 "phone", 7 "phone",
8 - "tablet",  
9 - "2in1" 8 +// "tablet",
  9 +// "2in1"
10 ], 10 ],
11 "compressNativeLibs": true, 11 "compressNativeLibs": true,
12 "deliveryWithInstall": true, 12 "deliveryWithInstall": true,
@@ -17,7 +17,7 @@ export struct ColumnPage { @@ -17,7 +17,7 @@ export struct ColumnPage {
17 pageId: string = ""; 17 pageId: string = "";
18 channelId: string = ""; 18 channelId: string = "";
19 pageName: string = '' 19 pageName: string = ''
20 - 20 + @Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
21 aboutToAppear() { 21 aboutToAppear() {
22 this.pageId = this.param.pageId 22 this.pageId = this.param.pageId
23 this.channelId = this.param.channelId 23 this.channelId = this.param.channelId
@@ -26,6 +26,7 @@ export struct ColumnPage { @@ -26,6 +26,7 @@ export struct ColumnPage {
26 26
27 build() { 27 build() {
28 Column() { 28 Column() {
  29 + Blank().height(`${this.topSafeHeight}px`)
29 CustomTitleUI({ titleName: this.pageName }) 30 CustomTitleUI({ titleName: this.pageName })
30 PageComponent({ 31 PageComponent({
31 currentTopNavSelectedIndex: $currentTopNavSelectedIndex, 32 currentTopNavSelectedIndex: $currentTopNavSelectedIndex,
@@ -6,8 +6,8 @@ @@ -6,8 +6,8 @@
6 "mainElement": "EntryAbility", 6 "mainElement": "EntryAbility",
7 "deviceTypes": [ 7 "deviceTypes": [
8 "phone", 8 "phone",
9 - "tablet",  
10 - "2in1" 9 +// "tablet",
  10 +// "2in1"
11 ], 11 ],
12 "compressNativeLibs": true, 12 "compressNativeLibs": true,
13 "deliveryWithInstall": true, 13 "deliveryWithInstall": true,