Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main
* 'main' of http://192.168.1.42/developOne/harmonyPool: fix |> 评论输入框无100字上限限制和提醒,评论输入框无法随着评论内容的输入自适应高度 fix: 鸿蒙设备视频沉浸式视频色值与按钮接近的时候,整个顶部图标及tab按钮完全看不见 fix: cms已下线视频稿件,用户访问显示获取内容失败,后台上线该视频稿件后,客户端点击重试按钮,视频起播,播放的非目标页面的稿件 fix |> 17528 UI还原问题-【uat】详情页骨架图和android不一致 ref |> 修复竖屏直播背景图不展示问题 fix: 20364 人民号>推荐,推荐动态内容,号主简介较长时缺少省略,与关注按钮重叠。 fix |> 19984 图文稿件详情页,播放稿件中的视频,进度滑块与已播放进度条重叠 fix |> 20499 我的>点击账号进入账号主页,点击查看头像,鸿蒙与安卓展示不一致,见截图 fix |> 20478 图文稿件详情页,播放稿件中的视频,播放按钮有点糊 fix |> 20384 隐私政策和用户协议,左上角的返回按钮下方缺少分割线 fix |> 20113 【uat】账号19066666666 Qa112233进入我的-消息-预约消息页,字体偏大,看图
Showing
14 changed files
with
128 additions
and
57 deletions
| @@ -323,6 +323,7 @@ export struct WdWebLocalComponent { | @@ -323,6 +323,7 @@ export struct WdWebLocalComponent { | ||
| 323 | }else { | 323 | }else { |
| 324 | Row() { | 324 | Row() { |
| 325 | Image(this.isPause ? $r('app.media.icon_play') : $r('app.media.icon_pause')) | 325 | Image(this.isPause ? $r('app.media.icon_play') : $r('app.media.icon_pause')) |
| 326 | + .interpolation(ImageInterpolation.Medium) | ||
| 326 | .width(24) | 327 | .width(24) |
| 327 | .height(24) | 328 | .height(24) |
| 328 | .onClick(() => { | 329 | .onClick(() => { |
| @@ -121,7 +121,11 @@ export struct RmhTitle { | @@ -121,7 +121,11 @@ export struct RmhTitle { | ||
| 121 | const time1 = new Date().getTime(); // 今天日期的时间戳 | 121 | const time1 = new Date().getTime(); // 今天日期的时间戳 |
| 122 | const time2 = new Date(date).getTime(); // 要比较日期的时间戳 | 122 | const time2 = new Date(date).getTime(); // 要比较日期的时间戳 |
| 123 | const diffDays = Math.round(Math.abs((time1 - time2) / oneDay)); // 两个日期时间戳差值除以一天的毫秒数得到天数,取绝对值并四舍五入 | 123 | const diffDays = Math.round(Math.abs((time1 - time2) / oneDay)); // 两个日期时间戳差值除以一天的毫秒数得到天数,取绝对值并四舍五入 |
| 124 | - return Math.ceil(diffDays); | 124 | + return diffDays; |
| 125 | + } | ||
| 126 | + | ||
| 127 | + showTime() { | ||
| 128 | + return !(this.hideTime && this.getDaysBetweenDates(Number(this.publishTime)) > 2) | ||
| 125 | } | 129 | } |
| 126 | 130 | ||
| 127 | build() { | 131 | build() { |
| @@ -158,7 +162,7 @@ export struct RmhTitle { | @@ -158,7 +162,7 @@ export struct RmhTitle { | ||
| 158 | 162 | ||
| 159 | // Flex({alignContent: FlexAlign.Start, wrap: FlexWrap.NoWrap}) { | 163 | // Flex({alignContent: FlexAlign.Start, wrap: FlexWrap.NoWrap}) { |
| 160 | Row() { | 164 | Row() { |
| 161 | - if (!(this.hideTime && this.getDaysBetweenDates(Number(this.publishTime)) > 2)) { | 165 | + if (this.showTime()) { |
| 162 | if (this.publishTime) { | 166 | if (this.publishTime) { |
| 163 | Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.publishTime))) | 167 | Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.publishTime))) |
| 164 | .fontSize($r("app.float.font_size_12")) | 168 | .fontSize($r("app.float.font_size_12")) |
| @@ -182,16 +186,19 @@ export struct RmhTitle { | @@ -182,16 +186,19 @@ export struct RmhTitle { | ||
| 182 | .textAlign(TextAlign.Start) | 186 | .textAlign(TextAlign.Start) |
| 183 | .height(14) | 187 | .height(14) |
| 184 | .lineHeight(14) | 188 | .lineHeight(14) |
| 185 | - .constraintSize({maxWidth:(DisplayUtils.getDeviceWidth() - 32 - 36 - 18 - this.getTextWidth(DateTimeUtils.getCommentTime(Number.parseFloat(this.publishTime))))}) | 189 | + .width('calc(100% - 54vp)') |
| 190 | + // .constraintSize({maxWidth:(DisplayUtils.getDeviceWidth() - 32 - 36 - 18 - this.getTextWidth(DateTimeUtils.getCommentTime(Number.parseFloat(this.publishTime))))}) | ||
| 186 | } | 191 | } |
| 187 | 192 | ||
| 188 | } | 193 | } |
| 189 | .height(14) | 194 | .height(14) |
| 190 | .align(Alignment.Start) | 195 | .align(Alignment.Start) |
| 196 | + .width('100%') | ||
| 191 | // } | 197 | // } |
| 192 | // .width('calc(100% - 36vp - 8vp)') | 198 | // .width('calc(100% - 36vp - 8vp)') |
| 193 | } | 199 | } |
| 194 | .justifyContent(FlexAlign.SpaceBetween) | 200 | .justifyContent(FlexAlign.SpaceBetween) |
| 201 | + .width('100%') | ||
| 195 | 202 | ||
| 196 | Blank() | 203 | Blank() |
| 197 | if (this.rmhInfo?.cnIsAttention) { | 204 | if (this.rmhInfo?.cnIsAttention) { |
| @@ -207,14 +214,17 @@ export struct RmhTitle { | @@ -207,14 +214,17 @@ export struct RmhTitle { | ||
| 207 | .fontSize($r('app.float.font_size_13')) | 214 | .fontSize($r('app.float.font_size_13')) |
| 208 | .fontColor(Number(this.followStatus) === 0 ? $r('app.color.color_ED2800') : 0xc6c6c6) | 215 | .fontColor(Number(this.followStatus) === 0 ? $r('app.color.color_ED2800') : 0xc6c6c6) |
| 209 | }.margin({top:4}) | 216 | }.margin({top:4}) |
| 217 | + .height(36) | ||
| 210 | } | 218 | } |
| 211 | .flexShrink(0) | 219 | .flexShrink(0) |
| 212 | .onClick(() => { | 220 | .onClick(() => { |
| 213 | this.handleAccention(); | 221 | this.handleAccention(); |
| 214 | }) | 222 | }) |
| 223 | + .height(36) | ||
| 215 | } | 224 | } |
| 216 | } | 225 | } |
| 217 | .width(CommonConstants.FULL_WIDTH) | 226 | .width(CommonConstants.FULL_WIDTH) |
| 227 | + .height(36) | ||
| 218 | .margin({ bottom: 10 }) | 228 | .margin({ bottom: 10 }) |
| 219 | .onClick(()=>{ | 229 | .onClick(()=>{ |
| 220 | ///个人主页 动态头像不能跳转 | 230 | ///个人主页 动态头像不能跳转 |
| @@ -36,6 +36,8 @@ export struct CommentCustomDialog { | @@ -36,6 +36,8 @@ export struct CommentCustomDialog { | ||
| 36 | textInputController: TextAreaController = new TextAreaController() | 36 | textInputController: TextAreaController = new TextAreaController() |
| 37 | @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } | 37 | @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } |
| 38 | @State publishButtonOpacity: number = 0.5 | 38 | @State publishButtonOpacity: number = 0.5 |
| 39 | + @State inputViewHeight: number = 80 | ||
| 40 | + @Provide maxInputLength: number = 100 | ||
| 39 | 41 | ||
| 40 | aboutToAppear(): void { | 42 | aboutToAppear(): void { |
| 41 | } | 43 | } |
| @@ -98,15 +100,32 @@ export struct CommentCustomDialog { | @@ -98,15 +100,32 @@ export struct CommentCustomDialog { | ||
| 98 | .width('100%') | 100 | .width('100%') |
| 99 | .backgroundColor($r('app.color.color_transparent')) | 101 | .backgroundColor($r('app.color.color_transparent')) |
| 100 | .caretColor("#ED2800") | 102 | .caretColor("#ED2800") |
| 103 | + .maxLength(this.maxInputLength) | ||
| 104 | + .onWillInsert(data => { | ||
| 105 | + if (this.publishCommentModel.commentContent.length + data.insertValue.length > this.maxInputLength) { | ||
| 106 | + ToastUtils.showToast("已达到输入上限", 3000) | ||
| 107 | + return false | ||
| 108 | + } | ||
| 109 | + return true | ||
| 110 | + }) | ||
| 101 | .onChange(value => { | 111 | .onChange(value => { |
| 102 | this.publishCommentModel.commentContent = value; | 112 | this.publishCommentModel.commentContent = value; |
| 103 | 113 | ||
| 114 | + if ((this.textInputController.getTextContentLineCount() - 3) > 0) { | ||
| 115 | + this.inputViewHeight = 80 + (this.textInputController.getTextContentLineCount() - 3) * 18 | ||
| 116 | + } | ||
| 117 | + | ||
| 104 | if (value.length > 0) { | 118 | if (value.length > 0) { |
| 105 | this.publishButtonOpacity = 1.0 | 119 | this.publishButtonOpacity = 1.0 |
| 106 | } else { | 120 | } else { |
| 107 | this.publishButtonOpacity = 0.5 | 121 | this.publishButtonOpacity = 0.5 |
| 108 | } | 122 | } |
| 109 | }) | 123 | }) |
| 124 | + .onPaste(value => { | ||
| 125 | + if (this.publishCommentModel.commentContent.length + value.length > this.maxInputLength) { | ||
| 126 | + ToastUtils.showToast("已达到输入上限", 3000) | ||
| 127 | + } | ||
| 128 | + }) | ||
| 110 | .onFocus(() => { | 129 | .onFocus(() => { |
| 111 | if (this.emojiSwitch) { | 130 | if (this.emojiSwitch) { |
| 112 | this.emojiSwitch = false | 131 | this.emojiSwitch = false |
| @@ -119,7 +138,7 @@ export struct CommentCustomDialog { | @@ -119,7 +138,7 @@ export struct CommentCustomDialog { | ||
| 119 | .backgroundColor('#F9F9F9') | 138 | .backgroundColor('#F9F9F9') |
| 120 | // .width('100%') | 139 | // .width('100%') |
| 121 | .margin({ top: 12, right: 12, left: 12, bottom:10}) | 140 | .margin({ top: 12, right: 12, left: 12, bottom:10}) |
| 122 | - .height(80) | 141 | + .height(this.inputViewHeight) |
| 123 | .borderRadius(4) | 142 | .borderRadius(4) |
| 124 | 143 | ||
| 125 | Row() { | 144 | Row() { |
| @@ -198,7 +217,24 @@ export struct CommentCustomDialog { | @@ -198,7 +217,24 @@ export struct CommentCustomDialog { | ||
| 198 | } | 217 | } |
| 199 | if (this.voiceSwitch) { | 218 | if (this.voiceSwitch) { |
| 200 | VoiceInputView({voiceRecoginizerResult:(result: string) => { | 219 | VoiceInputView({voiceRecoginizerResult:(result: string) => { |
| 201 | - this.publishCommentModel.commentContent = result; | 220 | + let beforeStr = "" |
| 221 | + let afterStr = "" | ||
| 222 | + const offset = this.textInputController.getCaretOffset().index | ||
| 223 | + if (offset > 0) { | ||
| 224 | + beforeStr = this.publishCommentModel.commentContent.slice(0, offset) | ||
| 225 | + } | ||
| 226 | + if (offset < this.publishCommentModel.commentContent.length) { | ||
| 227 | + afterStr = this.publishCommentModel.commentContent.slice(offset) | ||
| 228 | + } | ||
| 229 | + | ||
| 230 | + if (this.publishCommentModel.commentContent.length + result.length > this.maxInputLength) { | ||
| 231 | + let length = this.maxInputLength - this.publishCommentModel.commentContent.length | ||
| 232 | + if (length < result.length) { | ||
| 233 | + result.substring(0, length) | ||
| 234 | + } | ||
| 235 | + ToastUtils.showToast("已达到输入上限", 3000) | ||
| 236 | + } | ||
| 237 | + this.publishCommentModel.commentContent = beforeStr + result + afterStr | ||
| 202 | }}).height(150) | 238 | }}).height(150) |
| 203 | 239 | ||
| 204 | } | 240 | } |
| @@ -213,6 +249,7 @@ export struct CommentCustomDialog { | @@ -213,6 +249,7 @@ export struct CommentCustomDialog { | ||
| 213 | 249 | ||
| 214 | @Component | 250 | @Component |
| 215 | struct emojiView { | 251 | struct emojiView { |
| 252 | + @Consume maxInputLength: number | ||
| 216 | @ObjectLink publishCommentModel: publishCommentModel | 253 | @ObjectLink publishCommentModel: publishCommentModel |
| 217 | /*没找到获取系统emoji的方案*/ | 254 | /*没找到获取系统emoji的方案*/ |
| 218 | private emojiArray = ["😀","😁","😂","😃","😄","😅","😆","😇","😈","😉","😊","😋","😌","😍","😎","😏","😐","😑","😒","😓","😔","😕","😖","😗","😘","😙","😚","😛","😜","😝","😞","😟","😠","😡","😢","😣","😤","😥","😦","😧","😨","😩","😪","😫","😬","😭","😮","😯","😰","😱","😲","😳","😴","😵","😶","😷","😸","😹","😺","😻","😼","😽","😾","😿","🙀","🙅","🙆","🙇","🙈","🙉","🙊","🙋","🙌","🙍","🙎","🙏"] | 255 | private emojiArray = ["😀","😁","😂","😃","😄","😅","😆","😇","😈","😉","😊","😋","😌","😍","😎","😏","😐","😑","😒","😓","😔","😕","😖","😗","😘","😙","😚","😛","😜","😝","😞","😟","😠","😡","😢","😣","😤","😥","😦","😧","😨","😩","😪","😫","😬","😭","😮","😯","😰","😱","😲","😳","😴","😵","😶","😷","😸","😹","😺","😻","😼","😽","😾","😿","🙀","🙅","🙆","🙇","🙈","🙉","🙊","🙋","🙌","🙍","🙎","🙏"] |
| @@ -284,6 +321,10 @@ struct emojiView { | @@ -284,6 +321,10 @@ struct emojiView { | ||
| 284 | 321 | ||
| 285 | } else { | 322 | } else { |
| 286 | Logger.debug(TAG, "charCode: " + emoji.charCodeAt(0) + " ==> " + emoji) | 323 | Logger.debug(TAG, "charCode: " + emoji.charCodeAt(0) + " ==> " + emoji) |
| 324 | + if (this.publishCommentModel.commentContent.length + emoji.length > this.maxInputLength) { | ||
| 325 | + ToastUtils.showToast("已达到输入上限", 3000) | ||
| 326 | + return | ||
| 327 | + } | ||
| 287 | this.publishCommentModel.commentContent = this.publishCommentModel.commentContent + emoji | 328 | this.publishCommentModel.commentContent = this.publishCommentModel.commentContent + emoji |
| 288 | } | 329 | } |
| 289 | 330 |
| @@ -9,9 +9,8 @@ export struct SubscribeListChildComponent{ | @@ -9,9 +9,8 @@ export struct SubscribeListChildComponent{ | ||
| 9 | Row(){ | 9 | Row(){ |
| 10 | Text(`${this.item.dealTime}`) | 10 | Text(`${this.item.dealTime}`) |
| 11 | .margin({top:16,bottom:12}) | 11 | .margin({top:16,bottom:12}) |
| 12 | - .fontWeight(400) | ||
| 13 | .fontSize(12) | 12 | .fontSize(12) |
| 14 | - .lineHeight(17) | 13 | + .lineHeight(16) |
| 15 | .fontColor($r('app.color.color_999999')) | 14 | .fontColor($r('app.color.color_999999')) |
| 16 | }.width('100%') | 15 | }.width('100%') |
| 17 | .backgroundColor($r('app.color.color_F5F5F5')) | 16 | .backgroundColor($r('app.color.color_F5F5F5')) |
| @@ -45,7 +44,6 @@ export struct SubscribeListChildComponent{ | @@ -45,7 +44,6 @@ export struct SubscribeListChildComponent{ | ||
| 45 | Text(`${this.item.desc}`) | 44 | Text(`${this.item.desc}`) |
| 46 | .fontSize(14) | 45 | .fontSize(14) |
| 47 | .lineHeight(20) | 46 | .lineHeight(20) |
| 48 | - .fontWeight(400) | ||
| 49 | .fontColor($r('app.color.color_222222')) | 47 | .fontColor($r('app.color.color_222222')) |
| 50 | .layoutWeight(1) | 48 | .layoutWeight(1) |
| 51 | }.alignItems(VerticalAlign.Center) | 49 | }.alignItems(VerticalAlign.Center) |
| @@ -5,44 +5,53 @@ export struct CustomTitleUI { | @@ -5,44 +5,53 @@ export struct CustomTitleUI { | ||
| 5 | imgBack:boolean = true | 5 | imgBack:boolean = true |
| 6 | titleName:ResourceStr = "默认标题" | 6 | titleName:ResourceStr = "默认标题" |
| 7 | @Prop percent:number = 1 | 7 | @Prop percent:number = 1 |
| 8 | + isShowBottomLine:boolean = false | ||
| 8 | 9 | ||
| 9 | build() { | 10 | build() { |
| 10 | - RelativeContainer() { | ||
| 11 | - //标题栏目 | ||
| 12 | - if(this.imgBack){ | ||
| 13 | - Image($r('app.media.back_icon')) | ||
| 14 | - .width(24) | ||
| 15 | - .height(24) | ||
| 16 | - .objectFit(ImageFit.Auto) | ||
| 17 | - .interpolation(ImageInterpolation.High) | ||
| 18 | - .id("back_icon") | 11 | + Column(){ |
| 12 | + RelativeContainer() { | ||
| 13 | + //标题栏目 | ||
| 14 | + if(this.imgBack){ | ||
| 15 | + Image($r('app.media.back_icon')) | ||
| 16 | + .width(24) | ||
| 17 | + .height(24) | ||
| 18 | + .objectFit(ImageFit.Auto) | ||
| 19 | + .interpolation(ImageInterpolation.High) | ||
| 20 | + .id("back_icon") | ||
| 21 | + .alignRules({ | ||
| 22 | + center: {anchor: "__container__", align: VerticalAlign.Center}, | ||
| 23 | + left: {anchor: "__container__", align: HorizontalAlign.Start} | ||
| 24 | + }) | ||
| 25 | + .margin({left: 16}) | ||
| 26 | + .onClick(()=>{ | ||
| 27 | + router.back() | ||
| 28 | + }) | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + Text(this.titleName) | ||
| 32 | + .maxLines(1) | ||
| 33 | + .id("title") | ||
| 34 | + .fontFamily('PingFang SC-Regular') | ||
| 35 | + .fontSize(18) | ||
| 36 | + .fontWeight(400) | ||
| 37 | + .fontColor($r('app.color.color_222222')) | ||
| 38 | + .lineHeight(26) | ||
| 19 | .alignRules({ | 39 | .alignRules({ |
| 20 | center: {anchor: "__container__", align: VerticalAlign.Center}, | 40 | center: {anchor: "__container__", align: VerticalAlign.Center}, |
| 21 | - left: {anchor: "__container__", align: HorizontalAlign.Start} | ||
| 22 | - }) | ||
| 23 | - .margin({left: 16}) | ||
| 24 | - .onClick(()=>{ | ||
| 25 | - router.back() | 41 | + middle: {anchor: "__container__", align: HorizontalAlign.Center} |
| 26 | }) | 42 | }) |
| 27 | - } | ||
| 28 | 43 | ||
| 29 | - Text(this.titleName) | ||
| 30 | - .maxLines(1) | ||
| 31 | - .id("title") | ||
| 32 | - .fontFamily('PingFang SC-Regular') | ||
| 33 | - .fontSize(18) | ||
| 34 | - .fontWeight(400) | ||
| 35 | - .fontColor($r('app.color.color_222222')) | ||
| 36 | - .lineHeight(26) | ||
| 37 | - .alignRules({ | ||
| 38 | - center: {anchor: "__container__", align: VerticalAlign.Center}, | ||
| 39 | - middle: {anchor: "__container__", align: HorizontalAlign.Center} | ||
| 40 | - }) | 44 | + } |
| 45 | + .height(44) | ||
| 46 | + .width('100%') | ||
| 47 | + .backgroundColor($r('app.color.white')) | ||
| 41 | 48 | ||
| 49 | + if(this.isShowBottomLine){ | ||
| 50 | + Text().backgroundColor($r('app.color.color_EDEDED')) | ||
| 51 | + .width('100%') | ||
| 52 | + .height(1) | ||
| 53 | + } | ||
| 42 | } | 54 | } |
| 43 | - .height(44) | ||
| 44 | - .width('100%') | ||
| 45 | - .backgroundColor($r('app.color.white')) | ||
| 46 | } | 55 | } |
| 47 | 56 | ||
| 48 | calcHeight(value:number): number{ | 57 | calcHeight(value:number): number{ |
| @@ -12,14 +12,14 @@ export struct detailedSkeleton { | @@ -12,14 +12,14 @@ export struct detailedSkeleton { | ||
| 12 | Column() { | 12 | Column() { |
| 13 | Column() { | 13 | Column() { |
| 14 | textArea('100%', 20) | 14 | textArea('100%', 20) |
| 15 | - textArea('50%', 20) | 15 | + textArea('52.5%', 20) |
| 16 | } | 16 | } |
| 17 | .SkeletonStyle() | 17 | .SkeletonStyle() |
| 18 | .alignItems(HorizontalAlign.Start) | 18 | .alignItems(HorizontalAlign.Start) |
| 19 | 19 | ||
| 20 | Column() { | 20 | Column() { |
| 21 | - textArea('30%', 12) | ||
| 22 | - textArea('30%', 12) | 21 | + textArea('23%', 12) |
| 22 | + textArea('23%', 12) | ||
| 23 | } | 23 | } |
| 24 | .SkeletonStyle() | 24 | .SkeletonStyle() |
| 25 | .alignItems(HorizontalAlign.Start) | 25 | .alignItems(HorizontalAlign.Start) |
| @@ -14,10 +14,9 @@ struct ShowUserHeaderPage { | @@ -14,10 +14,9 @@ struct ShowUserHeaderPage { | ||
| 14 | Row() { | 14 | Row() { |
| 15 | Image(this.headPhotoUrl) | 15 | Image(this.headPhotoUrl) |
| 16 | .alt($r('app.media.default_head')) | 16 | .alt($r('app.media.default_head')) |
| 17 | - .width('720lpx') | ||
| 18 | - .height('720lpx') | 17 | + .width('100%') |
| 19 | .objectFit(ImageFit.Auto) | 18 | .objectFit(ImageFit.Auto) |
| 20 | - .clip(new Circle({ width: '720lpx', height: '720lpx' })) | 19 | + // .clip(new Circle({ width: '720lpx', height: '720lpx' })) |
| 21 | } | 20 | } |
| 22 | .width('100%') | 21 | .width('100%') |
| 23 | .height('100%') | 22 | .height('100%') |
| @@ -143,7 +143,7 @@ export struct DetailPlayVLivePage { | @@ -143,7 +143,7 @@ export struct DetailPlayVLivePage { | ||
| 143 | 143 | ||
| 144 | Stack({ alignContent: Alignment.Top }) { | 144 | Stack({ alignContent: Alignment.Top }) { |
| 145 | // 直播背景图,模糊处理 | 145 | // 直播背景图,模糊处理 |
| 146 | - Image(this.liveDetailPageLogic.imgUrl) | 146 | + Image(this.liveDetailPageLogic.getLiveCoverUrl()) |
| 147 | .height('100%') | 147 | .height('100%') |
| 148 | .width('100%') | 148 | .width('100%') |
| 149 | .blur(100) | 149 | .blur(100) |
| @@ -84,4 +84,11 @@ export class LiveDetailPageLogic { | @@ -84,4 +84,11 @@ export class LiveDetailPageLogic { | ||
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | } | 86 | } |
| 87 | + | ||
| 88 | + getLiveCoverUrl() { | ||
| 89 | + if (this.contentDetailData.fullColumnImgUrls.length > 0) { | ||
| 90 | + return this.contentDetailData.fullColumnImgUrls[0].url | ||
| 91 | + } | ||
| 92 | + return '' | ||
| 93 | + } | ||
| 87 | } | 94 | } |
| @@ -88,7 +88,6 @@ export struct DetailVideoListPage { | @@ -88,7 +88,6 @@ export struct DetailVideoListPage { | ||
| 88 | } | 88 | } |
| 89 | await this.getContentDetail(this.contentId, this.relId, this.relType) | 89 | await this.getContentDetail(this.contentId, this.relId, this.relType) |
| 90 | } | 90 | } |
| 91 | - await this.queryVideoList() | ||
| 92 | // console.log(TAG, 'aboutToAppear', JSON.stringify(action.params)) | 91 | // console.log(TAG, 'aboutToAppear', JSON.stringify(action.params)) |
| 93 | 92 | ||
| 94 | } else { | 93 | } else { |
| @@ -100,7 +99,7 @@ export struct DetailVideoListPage { | @@ -100,7 +99,7 @@ export struct DetailVideoListPage { | ||
| 100 | aboutToAppear() { | 99 | aboutToAppear() { |
| 101 | // 在视频详情页 | 100 | // 在视频详情页 |
| 102 | this.peopleShipHomeCreatorId = AppStorage.get<string>('peopleShipHomeCreatorId') || ''; | 101 | this.peopleShipHomeCreatorId = AppStorage.get<string>('peopleShipHomeCreatorId') || ''; |
| 103 | - // console.info(`cj2024 peopleShipHomeCreatorId = ${this.peopleShipHomeCreatorId}`) | 102 | + // console.info(TAG, `cj2024 peopleShipHomeCreatorId = ${this.peopleShipHomeCreatorId}`) |
| 104 | if (this.peopleShipHomeCreatorId) { | 103 | if (this.peopleShipHomeCreatorId) { |
| 105 | // 从人民号号主传过来的 | 104 | // 从人民号号主传过来的 |
| 106 | this.getPeopleShipHomeDetail(this.peopleShipHomeCreatorId); | 105 | this.getPeopleShipHomeDetail(this.peopleShipHomeCreatorId); |
| @@ -246,6 +245,8 @@ export struct DetailVideoListPage { | @@ -246,6 +245,8 @@ export struct DetailVideoListPage { | ||
| 246 | // console.log('获取互动点赞等数据===', JSON.stringify(res)) | 245 | // console.log('获取互动点赞等数据===', JSON.stringify(res)) |
| 247 | }) | 246 | }) |
| 248 | this.data.push(resDTO.data[0]) | 247 | this.data.push(resDTO.data[0]) |
| 248 | + // console.log(TAG, 'getContentDetail 视频列表===', JSON.stringify(this.data)) | ||
| 249 | + await this.queryVideoList() | ||
| 249 | } | 250 | } |
| 250 | }) | 251 | }) |
| 251 | } | 252 | } |
| @@ -332,7 +333,7 @@ export struct DetailVideoListPage { | @@ -332,7 +333,7 @@ export struct DetailVideoListPage { | ||
| 332 | // console.log(TAG, 'cj2024 queryVideoList:', JSON.stringify(res.data)) | 333 | // console.log(TAG, 'cj2024 queryVideoList:', JSON.stringify(res.data)) |
| 333 | await this.getContentInteract(res.data) | 334 | await this.getContentInteract(res.data) |
| 334 | this.data = this.data.concat(res.data) | 335 | this.data = this.data.concat(res.data) |
| 335 | - // console.log('视频列表===', JSON.stringify(res.data)) | 336 | + // console.log(TAG, 'queryVideoList 视频列表===', JSON.stringify(this.data)) |
| 336 | } | 337 | } |
| 337 | }) | 338 | }) |
| 338 | } | 339 | } |
| @@ -70,7 +70,12 @@ struct LoginProtocolWebview { | @@ -70,7 +70,12 @@ struct LoginProtocolWebview { | ||
| 70 | } | 70 | } |
| 71 | .alignItems(VerticalAlign.Center) | 71 | .alignItems(VerticalAlign.Center) |
| 72 | .width('100%') | 72 | .width('100%') |
| 73 | - .height(44) | 73 | + .height(43) |
| 74 | + | ||
| 75 | + Text().backgroundColor("#EDEDED") | ||
| 76 | + .width('100%') | ||
| 77 | + .height(1) | ||
| 78 | + | ||
| 74 | if(this.isConnectNetwork){ | 79 | if(this.isConnectNetwork){ |
| 75 | Web({ src: this.webUrl, controller: this.webviewController }) | 80 | Web({ src: this.webUrl, controller: this.webviewController }) |
| 76 | .backgroundColor(Color.White) | 81 | .backgroundColor(Color.White) |
| @@ -232,15 +232,15 @@ export struct VideoChannelPage { | @@ -232,15 +232,15 @@ export struct VideoChannelPage { | ||
| 232 | .backgroundColor(Color.Transparent) | 232 | .backgroundColor(Color.Transparent) |
| 233 | 233 | ||
| 234 | } | 234 | } |
| 235 | - //顶部渐变遮罩 | ||
| 236 | - // .linearGradient({ | ||
| 237 | - // colors: [ | ||
| 238 | - // ['rgba(0, 0, 0, 0.0)', 0.0], ['rgba(0, 0, 0, 0.3)', 1.0] | ||
| 239 | - // ] | ||
| 240 | - // }) | ||
| 241 | .zIndex(20) | 235 | .zIndex(20) |
| 242 | - .height($r('app.float.top_tab_bar_height_common')) | ||
| 243 | - .margin({ | 236 | + .height(44 + px2vp(this.topSafeHeight)) |
| 237 | + //顶部渐变遮罩 | ||
| 238 | + .linearGradient({ | ||
| 239 | + direction: GradientDirection.Top, // 渐变方向 | ||
| 240 | + colors: this.currentTopNavSelectedIndex === 0 ? [['rgba(18, 18, 18, 0)', 0], | ||
| 241 | + ['rgba(18, 18, 18, 0.5)', 1.0]] : []// 数组末尾元素占比小于1时满足重复着色效果 | ||
| 242 | + }) | ||
| 243 | + .padding({ | ||
| 244 | top: px2vp(this.topSafeHeight) | 244 | top: px2vp(this.topSafeHeight) |
| 245 | }) | 245 | }) |
| 246 | .visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) | 246 | .visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) |
-
Please register or login to post a comment