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 |> 修复直播数据不显示问题
Showing
5 changed files
with
22 additions
and
12 deletions
| @@ -54,24 +54,28 @@ export struct CommentText { | @@ -54,24 +54,28 @@ export struct CommentText { | ||
| 54 | wordBreak:WordBreak.BREAK_ALL | 54 | wordBreak:WordBreak.BREAK_ALL |
| 55 | }) | 55 | }) |
| 56 | 56 | ||
| 57 | - // console.log(`>>>>>>>文本宽度为:${this.textWidth}-${this.contentText}`) | ||
| 58 | this.promise.then((data: Array<display.Display>) => { | 57 | this.promise.then((data: Array<display.Display>) => { |
| 59 | - console.log(`所有的屏幕信息:${JSON.stringify(data)}`) | ||
| 60 | - //单位为像素 | 58 | + // console.log(`所有的屏幕信息:${JSON.stringify(data)}`) |
| 59 | + //单位为像素px | ||
| 61 | this.screenWidth = data[0]["width"] | 60 | this.screenWidth = data[0]["width"] |
| 62 | // 屏幕宽度 * 最大行数 * 组件宽度比例 和 文字测量宽度3900,,3951 | 61 | // 屏幕宽度 * 最大行数 * 组件宽度比例 和 文字测量宽度3900,,3951 |
| 63 | this.isExpanded = (this.screenWidth - padding) * this.lines <= this.textWidth | 62 | this.isExpanded = (this.screenWidth - padding) * this.lines <= this.textWidth |
| 64 | // this.expandedStates = this.isExpanded; | 63 | // this.expandedStates = this.isExpanded; |
| 65 | 64 | ||
| 65 | + // let size = this.topMeasureText(tempMessage.toString(), (this.screenWidth - padding), 24, this.fontSize, this.fontWeight) | ||
| 66 | + // let size1 = this.topMeasureText(this.longMessage, (this.screenWidth - padding), 24, this.fontSize, this.fontWeight) | ||
| 67 | + // let height: number = Number(size.height) | ||
| 68 | + // let height1: number = Number(size1.height) | ||
| 69 | + // console.log(`>>>>>>>行高:${height}++${px2vp(height1)}++${tempMessage.toString()}++${this.isExpanded}`) | ||
| 70 | + | ||
| 66 | let lines = this.getTextLineNum( | 71 | let lines = this.getTextLineNum( |
| 67 | - tempMessage.toString(), | 72 | + this.longMessage, |
| 68 | (this.screenWidth - padding), | 73 | (this.screenWidth - padding), |
| 69 | this.lineHeight, | 74 | this.lineHeight, |
| 70 | this.fontSize, | 75 | this.fontSize, |
| 71 | this.fontWeight | 76 | this.fontWeight |
| 72 | ) | 77 | ) |
| 73 | 78 | ||
| 74 | - console.log(`>>>>>>>行高数:${lines}-${this.screenWidth}-${this.longMessage}`) | ||
| 75 | if (lines > 3) { | 79 | if (lines > 3) { |
| 76 | this.isExpanded = true | 80 | this.isExpanded = true |
| 77 | } | 81 | } |
| @@ -80,11 +84,11 @@ export struct CommentText { | @@ -80,11 +84,11 @@ export struct CommentText { | ||
| 80 | if (this.isExpanded) { | 84 | if (this.isExpanded) { |
| 81 | 85 | ||
| 82 | 86 | ||
| 83 | - let padding = vp2px(5 + this.marginWidth) | 87 | + // let padding = vp2px(5 + this.marginWidth) |
| 84 | let maxLineTextWidth = (this.screenWidth - padding) * this.maxline; | 88 | let maxLineTextWidth = (this.screenWidth - padding) * this.maxline; |
| 85 | 89 | ||
| 86 | - for (let index = 0; index < tempMessage.length; index++) { | ||
| 87 | - const element = tempMessage.substring(0, index) | 90 | + for (let index = 0; index < this.longMessage.length; index++) { |
| 91 | + const element = tempMessage.toString().substring(0, index) | ||
| 88 | const string = element + this.collapseText; //截取 | 92 | const string = element + this.collapseText; //截取 |
| 89 | const thisTextWidth = measure.measureText({ | 93 | const thisTextWidth = measure.measureText({ |
| 90 | textContent: string, | 94 | textContent: string, |
| @@ -189,6 +189,7 @@ export class PageHelper { | @@ -189,6 +189,7 @@ export class PageHelper { | ||
| 189 | for (const group of pageInfo.groups) { | 189 | for (const group of pageInfo.groups) { |
| 190 | pageModel.isRecGroup = group.groupStrategy === 1; | 190 | pageModel.isRecGroup = group.groupStrategy === 1; |
| 191 | pageModel.groupId = group.id; | 191 | pageModel.groupId = group.id; |
| 192 | + // Logger.debug(TAG, 'PageInfoDTO groupId: ' + group.id); | ||
| 192 | if (pageModel.isRecGroup) { | 193 | if (pageModel.isRecGroup) { |
| 193 | pageModel.pageSize = Rec_Page_Size | 194 | pageModel.pageSize = Rec_Page_Size |
| 194 | } else { | 195 | } else { |
| @@ -204,10 +205,13 @@ export class PageHelper { | @@ -204,10 +205,13 @@ export class PageHelper { | ||
| 204 | pageModel.displayGroupInfoMd5 = pageDto.md5 | 205 | pageModel.displayGroupInfoMd5 = pageDto.md5 |
| 205 | // pageModel.currentPage = 2 | 206 | // pageModel.currentPage = 2 |
| 206 | } else { | 207 | } else { |
| 208 | + | ||
| 207 | pageDto = await PageViewModel.getPageGroupCompData(pageModel.bizCopy()) as PageDTO | 209 | pageDto = await PageViewModel.getPageGroupCompData(pageModel.bizCopy()) as PageDTO |
| 210 | + if (pageDto.md5 === undefined){ | ||
| 211 | + continue | ||
| 212 | + } | ||
| 208 | //增加楼层数据异常判断条件 | 213 | //增加楼层数据异常判断条件 |
| 209 | if (pageDto.md5 == pageModel.displayGroupInfoMd5 || pageDto.compList == null || pageDto.compList.length === 0 ) { | 214 | if (pageDto.md5 == pageModel.displayGroupInfoMd5 || pageDto.compList == null || pageDto.compList.length === 0 ) { |
| 210 | - // Logger.debug(TAG, 'parseGroup cache load, return: ' + pageDto.md5) | ||
| 211 | // 下拉刷新场景,数据没变,拦截刷新UI,重置相关参数 | 215 | // 下拉刷新场景,数据没变,拦截刷新UI,重置相关参数 |
| 212 | if (pageModel.loadStrategy === 2) { | 216 | if (pageModel.loadStrategy === 2) { |
| 213 | // 缓存数据一致,不再刷新 | 217 | // 缓存数据一致,不再刷新 |
| @@ -81,7 +81,8 @@ export class PageViewModel extends BaseViewModel { | @@ -81,7 +81,8 @@ export class PageViewModel extends BaseViewModel { | ||
| 81 | .then((resDTO: ResponseDTO<PageDTO>) => { | 81 | .then((resDTO: ResponseDTO<PageDTO>) => { |
| 82 | if (!resDTO || !resDTO.data) { | 82 | if (!resDTO || !resDTO.data) { |
| 83 | Logger.error(TAG, 'getNavData then resDTO is empty'); | 83 | Logger.error(TAG, 'getNavData then resDTO is empty'); |
| 84 | - error('resDTO is empty'); | 84 | + // error('resDTO is empty'); |
| 85 | + success({} as PageDTO); | ||
| 85 | return | 86 | return |
| 86 | } | 87 | } |
| 87 | if (resDTO.code != 0) { | 88 | if (resDTO.code != 0) { |
| @@ -301,11 +301,11 @@ export struct DetailPlayShortVideoPage { | @@ -301,11 +301,11 @@ export struct DetailPlayShortVideoPage { | ||
| 301 | // 视频宽高比屏幕大,则宽度撑满 | 301 | // 视频宽高比屏幕大,则宽度撑满 |
| 302 | //console.log(`cj2024 ratio = ${this.ratio} width / height = ${width / height}`) | 302 | //console.log(`cj2024 ratio = ${this.ratio} width / height = ${width / height}`) |
| 303 | if (this.ratio > width / height) { | 303 | if (this.ratio > width / height) { |
| 304 | - this.playerWidth = '100%' | 304 | + this.playerWidth = px2vp(width) |
| 305 | this.playerHeight = px2vp(width / this.ratio) | 305 | this.playerHeight = px2vp(width / this.ratio) |
| 306 | } else { | 306 | } else { |
| 307 | // 否则高度撑满 | 307 | // 否则高度撑满 |
| 308 | - this.playerHeight = '100%' | 308 | + this.playerHeight = px2vp(height) |
| 309 | this.playerWidth = px2vp(height * this.ratio) | 309 | this.playerWidth = px2vp(height * this.ratio) |
| 310 | } | 310 | } |
| 311 | //console.log('cj2024 calculatePlayerRect=====', width, height,px2vp(this.windowHeight),this.playerHeight) | 311 | //console.log('cj2024 calculatePlayerRect=====', width, height,px2vp(this.windowHeight),this.playerHeight) |
| @@ -165,6 +165,7 @@ export struct VideoChannelPage { | @@ -165,6 +165,7 @@ export struct VideoChannelPage { | ||
| 165 | const tab = this.topNavList[index] | 165 | const tab = this.topNavList[index] |
| 166 | this.handleAudio() | 166 | this.handleAudio() |
| 167 | // Logger.info(TAG, `视频tab埋点: ${JSON.stringify(tab)}`); | 167 | // Logger.info(TAG, `视频tab埋点: ${JSON.stringify(tab)}`); |
| 168 | + if (!tab) {return} | ||
| 168 | const params: ParamType = { | 169 | const params: ParamType = { |
| 169 | "pageName": tab.name, | 170 | "pageName": tab.name, |
| 170 | "tabName": tab.name, | 171 | "tabName": tab.name, |
-
Please register or login to post a comment