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 |> 20568 我的评论列表中,上方展示的昵称,换行比安卓早,并且等级的位置展示不正确
  fix |> 修复竖屏直播结束页面直播时长显示问题
@@ -28,7 +28,7 @@ export class GradeSpan extends CustomSpan { @@ -28,7 +28,7 @@ export class GradeSpan extends CustomSpan {
28 canvas.attachBrush(brush); 28 canvas.attachBrush(brush);
29 let options2 = new drawing.SamplingOptions(drawing.FilterMode.FILTER_MODE_NEAREST); 29 let options2 = new drawing.SamplingOptions(drawing.FilterMode.FILTER_MODE_NEAREST);
30 if (this.imagePixelMap) { 30 if (this.imagePixelMap) {
31 - canvas.drawImage(this.imagePixelMap, options.x , options.lineBottom - vp2px(this.height) - 10, options2); 31 + canvas.drawImage(this.imagePixelMap, options.x + vp2px(6) , options.lineBottom - vp2px(this.height) - 10, options2);
32 } 32 }
33 33
34 brush.setColor({ alpha: 255, red: 237, green: 40, blue: 0 }); 34 brush.setColor({ alpha: 255, red: 237, green: 40, blue: 0 });
@@ -38,7 +38,7 @@ export class GradeSpan extends CustomSpan { @@ -38,7 +38,7 @@ export class GradeSpan extends CustomSpan {
38 font.setSize(vp2px(12)); 38 font.setSize(vp2px(12));
39 const textBlob = drawing.TextBlob.makeFromString(this.word, font, drawing.TextEncoding.TEXT_ENCODING_UTF8); 39 const textBlob = drawing.TextBlob.makeFromString(this.word, font, drawing.TextEncoding.TEXT_ENCODING_UTF8);
40 // canvas.drawTextBlob(textBlob, options.x + 20, options.lineBottom - 15); 40 // canvas.drawTextBlob(textBlob, options.x + 20, options.lineBottom - 15);
41 - canvas.drawTextBlob(textBlob, options.x + vp2px(9), options.lineBottom - vp2px(7.5)); 41 + canvas.drawTextBlob(textBlob, options.x + vp2px(9) + vp2px(6) , options.lineBottom - vp2px(7.5));
42 42
43 canvas.detachBrush(); 43 canvas.detachBrush();
44 } 44 }
@@ -123,9 +123,9 @@ struct MineHomePage { @@ -123,9 +123,9 @@ struct MineHomePage {
123 Column() { 123 Column() {
124 Row() { 124 Row() {
125 125
126 - UserGradeTextSpan({nameContent:`${this.userName}`,gradeContent:`等级${this.levelId}`,gradeWidth:this.levelId >9 ? 50 : 45}) 126 + UserGradeTextSpan({nameContent:`${this.userName}`,gradeContent:`等级${this.levelId}`,gradeWidth:this.levelId > 9 ? (this.levelId > 10 ? 55 : 50 ): 45})
127 127
128 - }.constraintSize({maxWidth:`calc(100% - 16vp - 90vp)`}) 128 + }.constraintSize({maxWidth:`calc(100% - 16vp - 80vp)`})
129 .padding({top:8}) 129 .padding({top:8})
130 .onClick(()=>{ 130 .onClick(()=>{
131 let params: editModelParams = { 131 let params: editModelParams = {
@@ -187,7 +187,7 @@ struct MineHomePage { @@ -187,7 +187,7 @@ struct MineHomePage {
187 } 187 }
188 }) 188 })
189 .backgroundColor($r('app.color.color_transparent')) 189 .backgroundColor($r('app.color.color_transparent'))
190 - .height(100) 190 + .height(120)
191 .width('100%') 191 .width('100%')
192 .padding({ left: 10 }) 192 .padding({ left: 10 })
193 193
@@ -111,9 +111,9 @@ struct OtherNormalUserHomePage { @@ -111,9 +111,9 @@ struct OtherNormalUserHomePage {
111 111
112 Column() { 112 Column() {
113 Row() { 113 Row() {
114 - UserGradeTextSpan({nameContent:`${this.userName}`,gradeContent:`等级${this.levelId}`,gradeWidth:this.levelId >9 ? 50 : 45}) 114 + UserGradeTextSpan({nameContent:`${this.userName}`,gradeContent:`等级${this.levelId}`,gradeWidth:this.levelId > 9 ? (this.levelId > 10 ? 55 : 50 ): 45})
115 115
116 - }.constraintSize({maxWidth:`calc(100% - 16vp - 90vp)`}) 116 + }.constraintSize({maxWidth:`calc(100% - 16vp - 80vp)`})
117 .padding({top:8}) 117 .padding({top:8})
118 118
119 /*Row() { 119 /*Row() {
@@ -189,7 +189,7 @@ struct OtherNormalUserHomePage { @@ -189,7 +189,7 @@ struct OtherNormalUserHomePage {
189 } 189 }
190 }) 190 })
191 // .backgroundColor($r('app.color.color_transparent')) 191 // .backgroundColor($r('app.color.color_transparent'))
192 - .height('184lpx') 192 + .height('220lpx')
193 .width('100%') 193 .width('100%')
194 .padding({ left: '6lpx' }) 194 .padding({ left: '6lpx' })
195 195
@@ -77,7 +77,7 @@ export class LiveDetailPageLogic { @@ -77,7 +77,7 @@ export class LiveDetailPageLogic {
77 * @param index 77 * @param index
78 */ 78 */
79 resolvingRoomVliveData(index:number){ 79 resolvingRoomVliveData(index:number){
80 - 80 +
81 // 只有直播中的才会有垫片 81 // 只有直播中的才会有垫片
82 if(this.liveState === 'running'){ 82 if(this.liveState === 'running'){
83 if (this.contentDetailData.liveInfo.vlive && this.contentDetailData.liveInfo.vlive.length > 0) { 83 if (this.contentDetailData.liveInfo.vlive && this.contentDetailData.liveInfo.vlive.length > 0) {
@@ -28,8 +28,10 @@ export struct PlayerEndView { @@ -28,8 +28,10 @@ export struct PlayerEndView {
28 calculateLiveDuration() { 28 calculateLiveDuration() {
29 const sn = 29 const sn =
30 DateTimeUtils.parseDate(this.contentDetailData.liveInfo.startTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) 30 DateTimeUtils.parseDate(this.contentDetailData.liveInfo.startTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)
31 - let en = DateTimeUtils.parseDate(this.contentDetailData.liveInfo.endTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)  
32 - if (this.contentDetailData.liveInfo?.endTime == null) { 31 + let en = 0
  32 + if (this.contentDetailData.liveInfo?.endTime.length > 0) {
  33 + en = DateTimeUtils.parseDate(this.contentDetailData.liveInfo.endTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)
  34 + }else {
33 en = DateTimeUtils.parseDate(DateTimeUtils.getCurTime(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN),DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) 35 en = DateTimeUtils.parseDate(DateTimeUtils.getCurTime(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN),DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)
34 } 36 }
35 const sd = DateTimeUtils.getDuration(sn, en) 37 const sd = DateTimeUtils.getDuration(sn, en)