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: 语音播报早晚报文章时,进入列表中的视频稿件,然后再退出后,没有对语音播报暂停(安卓是会暂停的)
  fix: MainPage.ets, 国殇代码容错处理
  fix: MainPage.ets, 国殇代码容错处理
  feat: 视频详情页,未展示发稿时间
@@ -38,6 +38,7 @@ export class DateTimeUtils { @@ -38,6 +38,7 @@ export class DateTimeUtils {
38 // 日期+时间格式 38 // 日期+时间格式
39 static readonly PATTERN_DATE_TIME_DEFAULT: string = 'yyyyMMddHHmmss'; // 年月日时分秒 39 static readonly PATTERN_DATE_TIME_DEFAULT: string = 'yyyyMMddHHmmss'; // 年月日时分秒
40 static readonly PATTERN_DATE_TIME_HYPHEN: string = 'yyyy-MM-dd HH:mm:ss'; // 日期中包含连字符/中划线(HYPHEN),时间是以冒号(Colon)分割 40 static readonly PATTERN_DATE_TIME_HYPHEN: string = 'yyyy-MM-dd HH:mm:ss'; // 日期中包含连字符/中划线(HYPHEN),时间是以冒号(Colon)分割
  41 + static readonly PATTERN_DATE_TIME_HYPHEN_MM: string = 'yyyy-MM-dd HH:mm'; // 日期中包含连字符/中划线(HYPHEN),时间是以冒号(Colon)分割
41 static readonly PATTERN_DATE_TIME_HYPHEN_MS: string = 'yyyy-MM-dd HH:mm:ss.SSS'; // 日期中包含连字符/中划线(HYPHEN),时间是以冒号(Colon)分割 42 static readonly PATTERN_DATE_TIME_HYPHEN_MS: string = 'yyyy-MM-dd HH:mm:ss.SSS'; // 日期中包含连字符/中划线(HYPHEN),时间是以冒号(Colon)分割
42 static readonly PATTERN_DATE_TIME_SLASH: string = 'yyyy/MM/dd HH:mm:ss'; // 日期中包含正斜杠(forward slash '/') 43 static readonly PATTERN_DATE_TIME_SLASH: string = 'yyyy/MM/dd HH:mm:ss'; // 日期中包含正斜杠(forward slash '/')
43 static readonly PATTERN_DATE_TIME_BACK_SLASH: string = 'yyyy\\MM\\dd HH:mm:ss'; // 日期中包含反斜杠(back slash '\') 44 static readonly PATTERN_DATE_TIME_BACK_SLASH: string = 'yyyy\\MM\\dd HH:mm:ss'; // 日期中包含反斜杠(back slash '\')
@@ -119,7 +119,6 @@ export struct DetailVideoListPage { @@ -119,7 +119,6 @@ export struct DetailVideoListPage {
119 console.info(TAG, 'this.isShowAudioCom: ' + this.isShowAudioCom); 119 console.info(TAG, 'this.isShowAudioCom: ' + this.isShowAudioCom);
120 if (this.isShowAudioCom) { 120 if (this.isShowAudioCom) {
121 this.AudioSuspension.showWindow() 121 this.AudioSuspension.showWindow()
122 - this.AudioSuspension.playerController.get()?.play();  
123 this.isShowAudioCom = false 122 this.isShowAudioCom = false
124 } 123 }
125 } 124 }
@@ -43,7 +43,8 @@ export struct DetailDialog { @@ -43,7 +43,8 @@ export struct DetailDialog {
43 .height(200) 43 .height(200)
44 44
45 Row() { 45 Row() {
46 - Image($r("app.media.ic_close_white")) 46 + Image($r("app.media.icon_arrow_left_white"))
  47 + .rotate({ angle: -90, centerX: '50%', centerY: '50%' })
47 .height(24).margin({ top: 20 }).onClick(() => { 48 .height(24).margin({ top: 20 }).onClick(() => {
48 this.controller.close() 49 this.controller.close()
49 if (this.isOpenDetail) { 50 if (this.isOpenDetail) {
@@ -38,6 +38,7 @@ export struct PlayerProgressView { @@ -38,6 +38,7 @@ export struct PlayerProgressView {
38 ToastUtils.shortToast('网络出小差了,请检查下网络') 38 ToastUtils.shortToast('网络出小差了,请检查下网络')
39 }, 10000) 39 }, 10000)
40 } else { 40 } else {
  41 + // console.log("PlayerProgressView22", this.timer)
41 clearTimeout(this.timer) 42 clearTimeout(this.timer)
42 this.loadingWidth = 1 43 this.loadingWidth = 1
43 this.showLoading = false 44 this.showLoading = false
@@ -2,6 +2,7 @@ import measure from '@ohos.measure' @@ -2,6 +2,7 @@ import measure from '@ohos.measure'
2 import { ContentDetailDTO } from 'wdBean/Index' 2 import { ContentDetailDTO } from 'wdBean/Index'
3 import { DetailDialog } from './DetailDialog' 3 import { DetailDialog } from './DetailDialog'
4 import { componentUtils } from '@kit.ArkUI' 4 import { componentUtils } from '@kit.ArkUI'
  5 +import { DateTimeUtils } from 'wdKit'
5 6
6 const TAG = 'PlayerTitleView'; 7 const TAG = 'PlayerTitleView';
7 @Preview 8 @Preview
@@ -131,34 +132,33 @@ export struct PlayerTitleView { @@ -131,34 +132,33 @@ export struct PlayerTitleView {
131 .fontWeight(600) 132 .fontWeight(600)
132 .fontFamily('PingFang SC-Regular') 133 .fontFamily('PingFang SC-Regular')
133 .textOverflow({ overflow: TextOverflow.Ellipsis }) 134 .textOverflow({ overflow: TextOverflow.Ellipsis })
134 - .margin({ bottom: 8 }) 135 + .margin({ bottom: 2 }) //8
135 136
136 /** 137 /**
137 * 标题大于三行或存在简介显示查看详情按钮 138 * 标题大于三行或存在简介显示查看详情按钮
138 */ 139 */
139 - if (this.rmhPlatform == 1) {  
140 - if (this.titleHeight > 200 || this.summary) {  
141 - Text('查看详情 > ')  
142 - .padding({  
143 - left: 6,  
144 - right: 6,  
145 - top: 4,  
146 - bottom: 4  
147 - })  
148 - .borderRadius(2)  
149 - .backgroundColor('#99636363')  
150 - .fontFamily('PingFang SC-Regular')  
151 - .fontColor(Color.White)  
152 - .fontSize(12)  
153 - .lineHeight(14)  
154 - .fontWeight(400)  
155 - .margin({ bottom: 8 })  
156 - .onClick(() => {  
157 - this.isOpenDetail = true  
158 - this.dialogController?.open()  
159 - })  
160 - }  
161 - } else { 140 + // if (this.rmhPlatform == 1) {
  141 + // if (this.titleHeight > 200 || this.summary) {
  142 + // Text('查看详情 > ')
  143 + // .padding({
  144 + // left: 6,
  145 + // right: 6,
  146 + // top: 4,
  147 + // bottom: 4
  148 + // })
  149 + // .borderRadius(2)
  150 + // .backgroundColor('#99636363')
  151 + // .fontFamily('PingFang SC-Regular')
  152 + // .fontColor(Color.White)
  153 + // .fontSize(12)
  154 + // .lineHeight(14)
  155 + // .fontWeight(400)
  156 + // .onClick(() => {
  157 + // this.isOpenDetail = true
  158 + // this.dialogController?.open()
  159 + // })
  160 + // }
  161 + // } else {
162 if(this.summary) { 162 if(this.summary) {
163 Text() { 163 Text() {
164 Span(this.clipText(this.summary, 14, 3, this.windowWidth - 150 - vp2px(50))) 164 Span(this.clipText(this.summary, 14, 3, this.windowWidth - 150 - vp2px(50)))
@@ -181,10 +181,11 @@ export struct PlayerTitleView { @@ -181,10 +181,11 @@ export struct PlayerTitleView {
181 .width(14) 181 .width(14)
182 .height(14) 182 .height(14)
183 .objectFit(ImageFit.Fill) 183 .objectFit(ImageFit.Fill)
184 - .verticalAlign(ImageSpanAlignment.CENTER)  
185 - .padding({  
186 - bottom: 4  
187 - }) 184 + .verticalAlign(ImageSpanAlignment.BOTTOM)
  185 + .margin({bottom:1})
  186 + // .padding({
  187 + // bottom: 4
  188 + // })
188 .onClick(() => { 189 .onClick(() => {
189 this.isOpenDetail = true 190 this.isOpenDetail = true
190 this.dialogController?.open() 191 this.dialogController?.open()
@@ -193,14 +194,22 @@ export struct PlayerTitleView { @@ -193,14 +194,22 @@ export struct PlayerTitleView {
193 } 194 }
194 } 195 }
195 .padding({ 196 .padding({
196 - left: 6, 197 + left: 0,//6
197 right: 6, 198 right: 6,
198 - top: 4, 199 + top: 0,//4
199 bottom: 4 200 bottom: 4
200 }) 201 })
201 - .margin({ bottom: 8 }) 202 +
202 } 203 }
203 - } 204 + // }
  205 + Text(DateTimeUtils.formatDate(new Date(this.contentDetailData?.publishTime).getTime(), DateTimeUtils.PATTERN_DATE_TIME_HYPHEN_MM))
  206 + .fontSize(12)
  207 + .fontColor(Color.White)
  208 + .opacity(0.7)
  209 + .lineHeight(16)
  210 + .fontWeight(400)
  211 + .fontFamily('PingFang SC-Regular')
  212 + .margin({ top: 8, bottom: 8 })
204 213
205 } 214 }
206 .width(this.windowWidth - 150 + 'px') 215 .width(this.windowWidth - 150 + 'px')
@@ -208,4 +217,4 @@ export struct PlayerTitleView { @@ -208,4 +217,4 @@ export struct PlayerTitleView {
208 .alignItems(HorizontalAlign.Start) 217 .alignItems(HorizontalAlign.Start)
209 .visibility(this.isOpenDetail || this.isDragging ? Visibility.None : Visibility.Visible) 218 .visibility(this.isOpenDetail || this.isDragging ? Visibility.None : Visibility.Visible)
210 } 219 }
211 -}  
  220 +}
@@ -12,6 +12,7 @@ import { StartupManager } from '../startupmanager/StartupManager'; @@ -12,6 +12,7 @@ import { StartupManager } from '../startupmanager/StartupManager';
12 import { BusinessError } from '@kit.BasicServicesKit'; 12 import { BusinessError } from '@kit.BasicServicesKit';
13 import { BottomNavigationComponent } from './view/BottomNavigationComponent'; 13 import { BottomNavigationComponent } from './view/BottomNavigationComponent';
14 import LaunchDataModel from './viewModel/LaunchDataModel'; 14 import LaunchDataModel from './viewModel/LaunchDataModel';
  15 +import { LaunchPageModel } from './viewModel/LaunchPageModel';
15 16
16 const TAG = 'MainPage'; 17 const TAG = 'MainPage';
17 18
@@ -44,6 +45,13 @@ struct MainPage { @@ -44,6 +45,13 @@ struct MainPage {
44 }) 45 })
45 46
46 let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string 47 let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string
  48 + if (!dataModelStr) {
  49 + //请求启动页相关接口数据并保存
  50 + let launchPageModel = new LaunchPageModel()
  51 + launchPageModel.getLaunchPageData()
  52 + dataModelStr = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string
  53 +
  54 + }
47 let dataModel : LaunchDataModel = JSON.parse(dataModelStr) 55 let dataModel : LaunchDataModel = JSON.parse(dataModelStr)
48 console.log(dataModelStr) 56 console.log(dataModelStr)
49 // 处理国殇模式数据 57 // 处理国殇模式数据
@@ -278,7 +278,6 @@ export struct BottomNavigationComponent { @@ -278,7 +278,6 @@ export struct BottomNavigationComponent {
278 console.info(TAG, 'this.isShowAudioCom: ' + this.isShowAudioCom); 278 console.info(TAG, 'this.isShowAudioCom: ' + this.isShowAudioCom);
279 if (this.isShowAudioCom) { 279 if (this.isShowAudioCom) {
280 this.AudioSuspension.showWindow() 280 this.AudioSuspension.showWindow()
281 - this.AudioSuspension.playerController.get()?.play();  
282 this.isShowAudioCom = false 281 this.isShowAudioCom = false
283 } 282 }
284 } 283 }