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 |> 横屏视频切换横屏后不能展示全屏区域的视频
  fix |> 修复推荐地方卡,点击更多跳转闪退问题
  fix |>直播频道数据不显示问题修复
  fix |> 修复直播数据不显示问题
... ... @@ -54,24 +54,28 @@ export struct CommentText {
wordBreak:WordBreak.BREAK_ALL
})
// console.log(`>>>>>>>文本宽度为:${this.textWidth}-${this.contentText}`)
this.promise.then((data: Array<display.Display>) => {
console.log(`所有的屏幕信息:${JSON.stringify(data)}`)
//单位为像素
// console.log(`所有的屏幕信息:${JSON.stringify(data)}`)
//单位为像素px
this.screenWidth = data[0]["width"]
// 屏幕宽度 * 最大行数 * 组件宽度比例 和 文字测量宽度3900,,3951
this.isExpanded = (this.screenWidth - padding) * this.lines <= this.textWidth
// this.expandedStates = this.isExpanded;
// let size = this.topMeasureText(tempMessage.toString(), (this.screenWidth - padding), 24, this.fontSize, this.fontWeight)
// let size1 = this.topMeasureText(this.longMessage, (this.screenWidth - padding), 24, this.fontSize, this.fontWeight)
// let height: number = Number(size.height)
// let height1: number = Number(size1.height)
// console.log(`>>>>>>>行高:${height}++${px2vp(height1)}++${tempMessage.toString()}++${this.isExpanded}`)
let lines = this.getTextLineNum(
tempMessage.toString(),
this.longMessage,
(this.screenWidth - padding),
this.lineHeight,
this.fontSize,
this.fontWeight
)
console.log(`>>>>>>>行高数:${lines}-${this.screenWidth}-${this.longMessage}`)
if (lines > 3) {
this.isExpanded = true
}
... ... @@ -80,11 +84,11 @@ export struct CommentText {
if (this.isExpanded) {
let padding = vp2px(5 + this.marginWidth)
// let padding = vp2px(5 + this.marginWidth)
let maxLineTextWidth = (this.screenWidth - padding) * this.maxline;
for (let index = 0; index < tempMessage.length; index++) {
const element = tempMessage.substring(0, index)
for (let index = 0; index < this.longMessage.length; index++) {
const element = tempMessage.toString().substring(0, index)
const string = element + this.collapseText; //截取
const thisTextWidth = measure.measureText({
textContent: string,
... ...
... ... @@ -189,6 +189,7 @@ export class PageHelper {
for (const group of pageInfo.groups) {
pageModel.isRecGroup = group.groupStrategy === 1;
pageModel.groupId = group.id;
// Logger.debug(TAG, 'PageInfoDTO groupId: ' + group.id);
if (pageModel.isRecGroup) {
pageModel.pageSize = Rec_Page_Size
} else {
... ... @@ -204,10 +205,13 @@ export class PageHelper {
pageModel.displayGroupInfoMd5 = pageDto.md5
// pageModel.currentPage = 2
} else {
pageDto = await PageViewModel.getPageGroupCompData(pageModel.bizCopy()) as PageDTO
if (pageDto.md5 === undefined){
continue
}
//增加楼层数据异常判断条件
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) {
// 缓存数据一致,不再刷新
... ...
... ... @@ -81,7 +81,8 @@ export class PageViewModel extends BaseViewModel {
.then((resDTO: ResponseDTO<PageDTO>) => {
if (!resDTO || !resDTO.data) {
Logger.error(TAG, 'getNavData then resDTO is empty');
error('resDTO is empty');
// error('resDTO is empty');
success({} as PageDTO);
return
}
if (resDTO.code != 0) {
... ...
... ... @@ -301,11 +301,11 @@ export struct DetailPlayShortVideoPage {
// 视频宽高比屏幕大,则宽度撑满
//console.log(`cj2024 ratio = ${this.ratio} width / height = ${width / height}`)
if (this.ratio > width / height) {
this.playerWidth = '100%'
this.playerWidth = px2vp(width)
this.playerHeight = px2vp(width / this.ratio)
} else {
// 否则高度撑满
this.playerHeight = '100%'
this.playerHeight = px2vp(height)
this.playerWidth = px2vp(height * this.ratio)
}
//console.log('cj2024 calculatePlayerRect=====', width, height,px2vp(this.windowHeight),this.playerHeight)
... ...
... ... @@ -165,6 +165,7 @@ export struct VideoChannelPage {
const tab = this.topNavList[index]
this.handleAudio()
// Logger.info(TAG, `视频tab埋点: ${JSON.stringify(tab)}`);
if (!tab) {return}
const params: ParamType = {
"pageName": tab.name,
"tabName": tab.name,
... ...