wangliang_wd

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

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  ref |> 修复 19885 功能缺陷-进入直播频道,无网络环境访问直播稿件,应提示:网络出小差了,请检查网络后重试
  ref |>修复缺陷 18780-进入直播间,未评论,评论后,切换直播间,然后在切到大家聊后,数据消失
  fix: 20432 热点频道下面广告关掉,再下拉刷新,未重新展示广告
  fix |> 20055 直播频道,接口返回数据存在楼层无数据时,未做兼容处理,客户端展示空白页。
  fix: 人民号横屏视频详情页全屏播放后的标题文字样式和分享按钮图标与安卓不一致
  ref |> 更新umeng 新版本
  fix |> 18815 互动消息-点击历史评论,鸿蒙版视频和图集详情页无法直接跳转到对应详情页的评论区
  ref |> 横屏直播详情直播间/大家聊无网加载失败时显示缺省图
  ref |> 去除调试代码
  ref |> 观看直播全屏时,点击关注退出全屏
  fix: 点播视频返回按钮位置偏低,已上调
... ... @@ -8,7 +8,7 @@
"version": "1.0.0",
"dependencies": {
"@tingyun/harmonyos": "file:./src/main/ets/tingyunAPM/tingyun_0.0.6.har",
"@umeng/common": "^1.0.21",
"@umeng/common": "^1.0.31",
"@umeng/analytics": "^1.0.19",
"@mpaas/udid": "0.0.2",
"@mpaas/upgrade": "0.0.2",
... ...
... ... @@ -18,7 +18,7 @@ export struct LiveFollowComponent {
@Prop rmhInfo: RmhInfoDTO
@Consume contentDetailData: ContentDetailDTO
@Consume @Watch('getBatchAttentionStatus') pageShow: number
clickFollowButton?:()=>void
aboutToAppear(): void {
this.getBatchAttentionStatus()
}
... ... @@ -90,6 +90,9 @@ export struct LiveFollowComponent {
.backgroundColor(this.followStatus === '0' ? $r('app.color.color_ED2800') : $r('app.color.color_CCCCCC'))
.visibility(this.followStatus === '0' ? Visibility.Visible : Visibility.None)
.onClick(() => {
if (this.clickFollowButton) {
this.clickFollowButton()
}
this.handleAccention()
})
}
... ...
... ... @@ -65,6 +65,8 @@ export struct EmptyComponent {
@State timeNum: number = 10
///占位图上是否显示返回按钮
@State showBackButton: boolean = true
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
/**
* The empty image width percentage setting.
*/
... ... @@ -114,16 +116,25 @@ export struct EmptyComponent {
Stack({alignContent:Alignment.Bottom}) {
this.noProgrammeData();
if (this.showBackButton) {
Image($r("app.media.icon_arrow_left_white"))
.width(24)
.height(24)
.onClick(() => {
router.back();
})
.position({
bottom: 15,
left: 16
})
Column(){
Image($r("app.media.icon_arrow_left_white"))
.width(24)
.height(24)
.onClick(() => {
router.back();
})
.position({
bottom: 16,
left: 16
})
}
.height(56)
.width('100%')
.justifyContent(FlexAlign.Center)
.alignItems(HorizontalAlign.Start)
.margin({
bottom: px2vp(this.bottomSafeHeight)
})
}
}
}
... ...
... ... @@ -109,6 +109,7 @@ export class PageHelper {
}
getPageInfo(pageModel: PageModel, pageAdvModel: PageAdModel) {
let cacheIsSame = false;
pageModel.currentPage = 1;
if (pageModel.pageType == 1) {
PageViewModel.postThemeList(pageModel.currentPage, pageModel.pageSize, pageModel.extra).then((liveReviewDTO) => {
... ... @@ -139,6 +140,7 @@ export class PageHelper {
if (pageInfo.md5 == pageModel.displayPageInfoMd5) {
// 缓存一致,不解析
// Logger.debug(TAG, 'getPageInfo 与缓存一致,不解析广告。。。')
cacheIsSame = true;
} else {
// Logger.debug(TAG, 'getPageInfo 要解析广告')
if (pageModel.currentPage == 1) {
... ... @@ -148,9 +150,10 @@ export class PageHelper {
pageModel.displayPageInfoMd5 = pageInfo.md5
//解析页面挂角广告资源
pageAdvModel.analysisAdvSource(pageInfo);
cacheIsSame = false;
}
// Logger.debug(TAG, 'getPageInfo go on')
this.parseGroup(pageModel, false)
this.parseGroup(pageModel, cacheIsSame)
}).catch(() => {
this.refreshUIEnd(pageModel, false)
if (this.isPageLoaded(pageModel)) {
... ... @@ -197,7 +200,8 @@ export class PageHelper {
pageModel.displayGroupInfoMd5 = pageDto.md5
} else {
pageDto = await PageViewModel.getPageGroupCompData(pageModel.bizCopy()) as PageDTO
if (pageDto.md5 == pageModel.displayGroupInfoMd5) {
//增加楼层数据异常判断条件
if (pageDto.md5 == pageModel.displayGroupInfoMd5 || pageDto.compList == null || pageDto.compList.length === 0 ) {
// Logger.debug(TAG, 'parseGroup cache load, return: ' + pageDto.md5)
// 下拉刷新场景,数据没变,拦截刷新UI,重置相关参数
if (pageModel.loadStrategy === 2) {
... ...
... ... @@ -151,7 +151,7 @@ export struct DetailPlayLiveCommon {
.catch((error:Error) => {
Logger.debug(TAG + "error",error.message,error.name)
this.isHideLoading = true;
ToastUtils.shortToast('内容不存在');
ToastUtils.shortToast('网络出小差了,请检查网络后重试');
router.back();
reject();
});
... ...
... ... @@ -40,7 +40,7 @@ export class LiveDetailPageLogic {
* @returns
*/
isVerticalScreenVideo(): boolean {
return this.liveLandscape === 'general'
}
... ...
... ... @@ -34,6 +34,7 @@ export struct TabChatComponent {
updateData() {
if (this.index === this.parentComponentIndex && this.initUI) {
this.initUI = false
this.getLiveList()
}
... ... @@ -75,9 +76,7 @@ export struct TabChatComponent {
Stack() {
if (this.pageModel.viewType == ViewType.LOADING) {
this.LoadingLayout()
} else if (this.pageModel.viewType == ViewType.ERROR) {
ErrorComponent()
} else if (this.pageModel.viewType == ViewType.EMPTY) {
} else if (this.pageModel.viewType == ViewType.EMPTY || this.pageModel.viewType == ViewType.ERROR) {
EmptyComponent({ emptyType: WDViewDefaultType.WDViewDefaultType_NoComment1, showBackButton:false})
} else {
... ... @@ -89,7 +88,7 @@ export struct TabChatComponent {
this.ListLayout()
},
onRefresh: (resolve) => {
this.pageModel.currentPage = 1
this.pageModel.currentPage ++
this.getLiveList(resolve)
},
... ... @@ -138,7 +137,6 @@ export struct TabChatComponent {
return
}
this.pageModel.isLoading = true
this.pageModel.currentPage = 1
this.liveViewModel.getLiveChatList(
this.pageModel.currentPage,
this.contentDetailData?.liveInfo?.mlive?.mliveId,
... ... @@ -154,34 +152,37 @@ export struct TabChatComponent {
resolve('')
}
}
if (this.pageModel.currentPage === 1) {
this.liveChatList.clear()
}
// if (this.pageModel.currentPage === 1) {
// this.liveChatList.clear()
// }
Logger.debug(TAG, `${JSON.stringify(data)}`)
if (data.barrageResponses && data.barrageResponses.length > 0) {
this.pageModel.viewType = ViewType.LOADED;
this.liveChatList.push(...data.barrageResponses)
if (this.initUI) {
this.initUI = false
if (this.pageModel.currentPage === 1) {
setTimeout(() => {
this.scroller.scrollToIndex(this.liveChatList.totalCount() - 1)
}, 300)
}
if (data.barrageResponses.length === this.pageModel.pageSize) {
this.pageModel.currentPage++;
this.pageModel.hasMore = true;
} else {
this.pageModel.hasMore = false;
}
// this.pageModel.currentPage++;
// if (data.barrageResponses.length === this.pageModel.pageSize) {
//
// this.pageModel.hasMore = true;
// } else {
// this.pageModel.hasMore = false;
// }
} else {
this.pageModel.viewType = ViewType.EMPTY;
if (this.liveChatList.totalCount() == 0 ) {
this.pageModel.viewType = ViewType.EMPTY;
}
}
},
() => {
Logger.debug(TAG, `error`)
this.pageModel.viewType = ViewType.ERROR;
if (this.liveChatList.totalCount() == 0) {
this.pageModel.viewType = ViewType.ERROR;
}
})
}
... ...
... ... @@ -72,9 +72,7 @@ export struct TabLiveComponent {
Stack() {
if (this.pageModel.viewType == ViewType.LOADING) {
this.LoadingLayout()
} else if (this.pageModel.viewType == ViewType.ERROR) {
ErrorComponent()
} else if (this.pageModel.viewType == ViewType.EMPTY) {
} else if (this.pageModel.viewType == ViewType.EMPTY || this.pageModel.viewType == ViewType.ERROR) {
EmptyComponent({ emptyType: WDViewDefaultType.WDViewDefaultType_NoContent1, showBackButton:false })
} else {
CustomPullToRefresh({
... ...
... ... @@ -121,12 +121,7 @@ export struct PlayUIComponent {
right: 10
})
.onClick(() => {
this.displayDirection = DisplayDirection.VERTICAL
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
WindowModel.shared.setSpecificSystemBarEnabled(true)
this.quitFullScreen()
})
if (this.contentDetailData.liveInfo?.liveState != 'wait') {
//标题
... ... @@ -160,7 +155,12 @@ export struct PlayUIComponent {
Row() {
if (this.contentDetailData?.rmhInfo) {
LiveFollowComponent({
rmhInfo: this.contentDetailData.rmhInfo
rmhInfo: this.contentDetailData.rmhInfo,
clickFollowButton:() => {
if (this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) {
this.quitFullScreen()
}
}
})
.margin({
// top:-7,
... ... @@ -450,4 +450,12 @@ export struct PlayUIComponent {
this.playerController?.setSeekTime(value, mode);
})
}
quitFullScreen() {
this.displayDirection = DisplayDirection.VERTICAL
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
WindowModel.shared.setSpecificSystemBarEnabled(true)
}
}
\ No newline at end of file
... ...
... ... @@ -52,21 +52,7 @@ export struct PlayerTitleComponent {
right: 10
})
.onClick(() => {
WindowModel.shared.setPreferredOrientation((this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
WindowModel.shared.setSpecificSystemBarEnabled(true)
this.isLarge = false
this.displayDirection = DisplayDirection.VERTICAL
if(this.playerController){
if(this.playerController.onVideoSizePlayerComponentBack){
this.playerController.onVideoSizePlayerComponentBack(2,1);
}
// if(this.playerController.onVideoSizePlayerUIComponentMethod){
// this.playerController.onVideoSizePlayerUIComponentMethod(2,1);
// }
}
this.isFullScreen = false
this.quitFullScreen()
})
Text(this.contentDetailData.newsTitle || '')
.maxLines(2)
... ... @@ -104,7 +90,12 @@ export struct PlayerTitleComponent {
getLiveStatusView() {
if (this.contentDetailData.rmhInfo?.rmhName) {
LiveFollowComponent({
rmhInfo: this.contentDetailData.rmhInfo
rmhInfo: this.contentDetailData.rmhInfo,
clickFollowButton:()=> {
if (this.isFullScreen) {
this.quitFullScreen()
}
}
}).margin({
right: 10
})
... ... @@ -159,4 +150,24 @@ export struct PlayerTitleComponent {
} : 4)
}
}
quitFullScreen() {
WindowModel.shared.setPreferredOrientation((this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
WindowModel.shared.setSpecificSystemBarEnabled(true)
this.isLarge = false
this.displayDirection = DisplayDirection.VERTICAL
if(this.playerController){
if(this.playerController.onVideoSizePlayerComponentBack){
this.playerController.onVideoSizePlayerComponentBack(2,1);
}
// if(this.playerController.onVideoSizePlayerUIComponentMethod){
// this.playerController.onVideoSizePlayerUIComponentMethod(2,1);
// }
}
this.isFullScreen = false
}
}
... ...
... ... @@ -97,6 +97,8 @@ export struct PlayerFullScreenView {
})
Text(this.getTitle())
.fontSize(18)
.lineHeight(24)
.fontWeight(600)
.fontColor(Color.White)
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
... ...
... ... @@ -23,13 +23,17 @@ struct MultiPictureDetailPage {
@Provide pageName: string = TrackConstants.PageName.Atlas_Detail
@Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
action: Action = {} as Action
build() {
Row() {
Column() {
MultiPictureDetailPageComponent({
relId: this.relId,
contentId: this.contentId,
relType: this.relType
relType: this.relType,
action: this.action
})
}
... ... @@ -53,13 +57,15 @@ struct MultiPictureDetailPage {
Logger.info(TAG, 'aboutToDisappear');
let par:Action = router.getParams() as Action;
let params = par?.params;
let action:Action = router.getParams() as Action;
let params = action?.params;
this.relId = params?.extra?.relId || '';
this.relType = params?.extra?.relType || '';
this.contentId = params?.contentID || '';
Logger.info(TAG, 'aboutToAppear');
Logger.info(TAG, 'params', JSON.stringify(params));
this.action = action
}
onBackPress() {
... ...
... ... @@ -7,7 +7,8 @@ import {
PhotoListBean,
postBatchAttentionStatusParams,
postInteractAccentionOperateParams,
postInteractBrowsOperateParams
postInteractBrowsOperateParams,
Action
} from 'wdBean';
import { DateTimeUtils } from 'wdKit/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
... ... @@ -65,6 +66,7 @@ export struct MultiPictureDetailPageComponent {
@State isScrollerTop: boolean = false;
@Provide duration: number = 0
@State executedStartTime: number = new Date().getTime()
action: Action = {} as Action
//watch监听页码回调
onCurrentPageNumUpdated(): void {
... ... @@ -97,6 +99,12 @@ export struct MultiPictureDetailPageComponent {
// })
this.getDetail()
this.contentTrackingDict()
if(this.action.params?.targetLayout == "comment"){
setTimeout(() => {
this.showCommentList = true
}, 1000)
}
}
contentTrackingDict() {
... ...