Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main
* 'main' of http://192.168.1.42/developOne/harmonyPool: ref |> 修复竖屏直播竖屏流有两个全屏按钮问题 ref |> 表情符号删除 fix |> 稿件详情点赞数接口调用逻辑调整 fix: 20198 20127 20050 沉浸式播放,切换底部导航bar,再切换沉浸式播放频道,视频应继续播放(鸿蒙版暂停) fix: 20198 搜索结果、收藏列表、文章详情页推荐列表中单图卡封面图未展示 fix |> 文章详情页点赞数和操作点赞接口调整 fix: 20118 【生产环境】进入热点-查看卡片,多了专题 标签和“2024年中非合作论坛峰会”,ios 不展示,只展示图片 20067 功能缺陷-【uat】精选评论卡评论视频稿件,点击进入视频播放页,应弹出评论弹窗。 ref |> 直播详情直播中动效调整和安卓保持一致 fix |> 修复文章详情页吴评论数时滑到评论区不显示正文标识
Showing
16 changed files
with
221 additions
and
77 deletions
| @@ -39,7 +39,8 @@ export { | @@ -39,7 +39,8 @@ export { | ||
| 39 | postExecuteCollectRecordParams, | 39 | postExecuteCollectRecordParams, |
| 40 | contentListParams, | 40 | contentListParams, |
| 41 | postInteractAccentionOperateParams, | 41 | postInteractAccentionOperateParams, |
| 42 | - contentListItem | 42 | + contentListItem, |
| 43 | + contentInteractParams | ||
| 43 | } from './src/main/ets/bean/detail/MultiPictureDetailPageDTO'; | 44 | } from './src/main/ets/bean/detail/MultiPictureDetailPageDTO'; |
| 44 | 45 | ||
| 45 | export { InteractParam, ContentBean } from './src/main/ets/bean/content/InteractParam'; | 46 | export { InteractParam, ContentBean } from './src/main/ets/bean/content/InteractParam'; |
| @@ -172,6 +172,17 @@ export interface contentListParams { | @@ -172,6 +172,17 @@ export interface contentListParams { | ||
| 172 | contentList: contentListItem[]; | 172 | contentList: contentListItem[]; |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | +export interface contentInteractParams { | ||
| 176 | + contentId: string; | ||
| 177 | + contentType: number; | ||
| 178 | + relType?: string; | ||
| 179 | + contentRelId?: string; | ||
| 180 | + channelId?: number; | ||
| 181 | + detail:number; | ||
| 182 | + readFlag?:number; | ||
| 183 | + rmhPlatform:number; | ||
| 184 | +} | ||
| 185 | + | ||
| 175 | export interface postInteractAccentionOperateParams { | 186 | export interface postInteractAccentionOperateParams { |
| 176 | attentionUserType: string; | 187 | attentionUserType: string; |
| 177 | attentionUserId: string; | 188 | attentionUserId: string; |
| @@ -17,6 +17,7 @@ import { | @@ -17,6 +17,7 @@ import { | ||
| 17 | batchLikeAndCollectParams, | 17 | batchLikeAndCollectParams, |
| 18 | InteractDataDTO, | 18 | InteractDataDTO, |
| 19 | contentListParams, | 19 | contentListParams, |
| 20 | + contentInteractParams | ||
| 20 | } from 'wdBean'; | 21 | } from 'wdBean'; |
| 21 | import DetailViewModel from '../viewmodel/DetailViewModel'; | 22 | import DetailViewModel from '../viewmodel/DetailViewModel'; |
| 22 | import { ImageAndTextWebComponent } from './ImageAndTextWebComponent'; | 23 | import { ImageAndTextWebComponent } from './ImageAndTextWebComponent'; |
| @@ -443,6 +444,10 @@ export struct ImageAndTextPageComponent { | @@ -443,6 +444,10 @@ export struct ImageAndTextPageComponent { | ||
| 443 | contentId: this.contentDetailData?.newsId + '', | 444 | contentId: this.contentDetailData?.newsId + '', |
| 444 | contentType: this.contentDetailData?.newsType + '', | 445 | contentType: this.contentDetailData?.newsType + '', |
| 445 | contentRelId: this.contentDetailData?.reLInfo?.relId || '' + '', | 446 | contentRelId: this.contentDetailData?.reLInfo?.relId || '' + '', |
| 447 | + relType:this.contentDetailData?.reLInfo?.relType || '' + '', | ||
| 448 | + title:this.contentDetailData?.newsTitle, | ||
| 449 | + userName:this.contentDetailData?.userInfo?.userName || '' + '', | ||
| 450 | + channelId:String(this.contentDetailData?.reLInfo?.channelId) || '' + '' | ||
| 446 | } | 451 | } |
| 447 | console.log(TAG, '点赞、取消点赞params', JSON.stringify(params)) | 452 | console.log(TAG, '点赞、取消点赞params', JSON.stringify(params)) |
| 448 | PageRepository.postExecuteLike(params).then(res => { | 453 | PageRepository.postExecuteLike(params).then(res => { |
| @@ -472,17 +477,22 @@ export struct ImageAndTextPageComponent { | @@ -472,17 +477,22 @@ export struct ImageAndTextPageComponent { | ||
| 472 | */ | 477 | */ |
| 473 | queryContentInteractCount() { | 478 | queryContentInteractCount() { |
| 474 | console.error(TAG, 'contentDetailData2222', JSON.stringify(this.contentDetailData)) | 479 | console.error(TAG, 'contentDetailData2222', JSON.stringify(this.contentDetailData)) |
| 475 | - const params: contentListParams = { | ||
| 476 | - contentList: [{ | 480 | + |
| 481 | + const params: contentInteractParams = { | ||
| 477 | contentId: this.contentDetailData?.newsId + '', | 482 | contentId: this.contentDetailData?.newsId + '', |
| 478 | contentType: this.contentDetailData?.newsType, | 483 | contentType: this.contentDetailData?.newsType, |
| 479 | - }] | ||
| 480 | - } | ||
| 481 | - PageRepository.getContentInteract(params).then(res => { | 484 | + contentRelId:this.contentDetailData?.reLInfo?.relId, |
| 485 | + relType:this.contentDetailData?.reLInfo?.relType, | ||
| 486 | + channelId:this.contentDetailData?.reLInfo?.channelId, | ||
| 487 | + rmhPlatform:this.contentDetailData?.rmhPlatform, | ||
| 488 | + readFlag:this.contentDetailData?.readFlag, | ||
| 489 | + detail:1 | ||
| 490 | + } | ||
| 491 | + PageRepository.getImageAndTextInteract(params).then(res => { | ||
| 482 | console.error(TAG, 'queryContentInteractCount', JSON.stringify(res)) | 492 | console.error(TAG, 'queryContentInteractCount', JSON.stringify(res)) |
| 483 | if (res.data) { | 493 | if (res.data) { |
| 484 | - this.interactData = res.data[0] | ||
| 485 | - this.likeNum = Number(res.data[0]?.likeNum) || 0 | 494 | + this.interactData = res.data |
| 495 | + this.likeNum = Number(res.data?.likeNum) || 0 | ||
| 486 | } | 496 | } |
| 487 | }) | 497 | }) |
| 488 | } | 498 | } |
| @@ -47,10 +47,9 @@ export struct Card2Component { | @@ -47,10 +47,9 @@ export struct Card2Component { | ||
| 47 | getCover() { | 47 | getCover() { |
| 48 | if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) { | 48 | if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) { |
| 49 | return this.contentDTO.coverUrl | 49 | return this.contentDTO.coverUrl |
| 50 | - } else if (this.contentDTO.appStyle === CompStyle.Card_02) { | 50 | + } else { |
| 51 | return this.contentDTO.fullColumnImgUrls?.[0]?.url || this.contentDTO.fullColumnImgUrls?.[0]?.fullUrl | 51 | return this.contentDTO.fullColumnImgUrls?.[0]?.url || this.contentDTO.fullColumnImgUrls?.[0]?.fullUrl |
| 52 | } | 52 | } |
| 53 | - return '' | ||
| 54 | } | 53 | } |
| 55 | 54 | ||
| 56 | build() { | 55 | build() { |
| @@ -45,10 +45,9 @@ export struct Card5Component { | @@ -45,10 +45,9 @@ export struct Card5Component { | ||
| 45 | getCover() { | 45 | getCover() { |
| 46 | if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) { | 46 | if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) { |
| 47 | return this.contentDTO.coverUrl | 47 | return this.contentDTO.coverUrl |
| 48 | - } else if (this.contentDTO.appStyle === CompStyle.Card_05) { | 48 | + } else { |
| 49 | return this.contentDTO.fullColumnImgUrls?.[0]?.url || this.contentDTO.fullColumnImgUrls?.[0]?.fullUrl | 49 | return this.contentDTO.fullColumnImgUrls?.[0]?.url || this.contentDTO.fullColumnImgUrls?.[0]?.fullUrl |
| 50 | } | 50 | } |
| 51 | - return '' | ||
| 52 | } | 51 | } |
| 53 | 52 | ||
| 54 | build() { | 53 | build() { |
| @@ -66,7 +65,7 @@ export struct Card5Component { | @@ -66,7 +65,7 @@ export struct Card5Component { | ||
| 66 | ) | 65 | ) |
| 67 | .height(this.loadImg ? '' : 114) | 66 | .height(this.loadImg ? '' : 114) |
| 68 | .autoResize(true) | 67 | .autoResize(true) |
| 69 | - if (this.contentDTO.titleShow == 1 || this.contentDTO.titleShow == null) { | 68 | + if (this.titleShowPolicy == 1) { |
| 70 | Row() | 69 | Row() |
| 71 | .borderRadius( | 70 | .borderRadius( |
| 72 | { | 71 | { |
| @@ -85,6 +84,7 @@ export struct Card5Component { | @@ -85,6 +84,7 @@ export struct Card5Component { | ||
| 85 | }) | 84 | }) |
| 86 | 85 | ||
| 87 | Row() { | 86 | Row() { |
| 87 | + if (this.titleShowPolicy == 1 && this.contentDTO.newsTitle) { | ||
| 88 | Stack() { | 88 | Stack() { |
| 89 | if(this.contentDTO.objectType == '5'){ | 89 | if(this.contentDTO.objectType == '5'){ |
| 90 | Notes({ objectType: this.contentDTO.objectType,objectLevel:this.contentDTO.objectLevel }).height(20).align(Alignment.Center) | 90 | Notes({ objectType: this.contentDTO.objectType,objectLevel:this.contentDTO.objectLevel }).height(20).align(Alignment.Center) |
| @@ -130,6 +130,7 @@ export struct Card5Component { | @@ -130,6 +130,7 @@ export struct Card5Component { | ||
| 130 | ) | 130 | ) |
| 131 | }.alignContent(Alignment.TopStart) | 131 | }.alignContent(Alignment.TopStart) |
| 132 | } | 132 | } |
| 133 | + } | ||
| 133 | .justifyContent(FlexAlign.Start) | 134 | .justifyContent(FlexAlign.Start) |
| 134 | .margin({ left: 12, bottom: 10, right: 12 }) | 135 | .margin({ left: 12, bottom: 10, right: 12 }) |
| 135 | 136 |
| @@ -30,6 +30,7 @@ export struct Card6Component { | @@ -30,6 +30,7 @@ export struct Card6Component { | ||
| 30 | @State contentDTO: ContentDTO = new ContentDTO(); | 30 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 31 | 31 | ||
| 32 | async aboutToAppear(): Promise<void> { | 32 | async aboutToAppear(): Promise<void> { |
| 33 | + console.log('Card6Component', JSON.stringify(this.contentDTO)) | ||
| 33 | this.titleInit(); | 34 | this.titleInit(); |
| 34 | this.loadImg = await onlyWifiLoadImg(); | 35 | this.loadImg = await onlyWifiLoadImg(); |
| 35 | const curRouter = router.getState().name; | 36 | const curRouter = router.getState().name; |
| @@ -43,12 +44,11 @@ export struct Card6Component { | @@ -43,12 +44,11 @@ export struct Card6Component { | ||
| 43 | } | 44 | } |
| 44 | 45 | ||
| 45 | getCover() { | 46 | getCover() { |
| 46 | - if (this.compDTO.compStyle === CompStyle.Card_13) { | 47 | + if (this.compDTO.compStyle) { |
| 47 | return this.contentDTO.coverUrl | 48 | return this.contentDTO.coverUrl |
| 48 | - } else if (this.contentDTO.appStyle === CompStyle.Card_06) { | 49 | + } else { |
| 49 | return this.contentDTO.fullColumnImgUrls?.[0]?.url || this.contentDTO.fullColumnImgUrls?.[0]?.fullUrl | 50 | return this.contentDTO.fullColumnImgUrls?.[0]?.url || this.contentDTO.fullColumnImgUrls?.[0]?.fullUrl |
| 50 | } | 51 | } |
| 51 | - return '' | ||
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | build() { | 54 | build() { |
| 1 | import { inputMethodEngine } from '@kit.IMEKit' | 1 | import { inputMethodEngine } from '@kit.IMEKit' |
| 2 | import { commentInfo } from 'wdBean/Index' | 2 | import { commentInfo } from 'wdBean/Index' |
| 3 | import { VoiceRecoginizer } from 'wdHwAbility' | 3 | import { VoiceRecoginizer } from 'wdHwAbility' |
| 4 | -import { ToastUtils } from 'wdKit/Index' | 4 | +import { Logger, ToastUtils } from 'wdKit/Index' |
| 5 | import { HttpUtils } from 'wdNetwork/Index' | 5 | import { HttpUtils } from 'wdNetwork/Index' |
| 6 | import { commentItemModel } from '../model/CommentModel' | 6 | import { commentItemModel } from '../model/CommentModel' |
| 7 | import { publishCommentModel } from '../model/PublishCommentModel' | 7 | import { publishCommentModel } from '../model/PublishCommentModel' |
| @@ -9,6 +9,8 @@ import commentViewModel from '../viewmodel/CommentViewModel' | @@ -9,6 +9,8 @@ import commentViewModel from '../viewmodel/CommentViewModel' | ||
| 9 | import { VoiceInputView } from './VoiceInputView' | 9 | import { VoiceInputView } from './VoiceInputView' |
| 10 | import { common, UIAbility } from '@kit.AbilityKit' | 10 | import { common, UIAbility } from '@kit.AbilityKit' |
| 11 | 11 | ||
| 12 | +const TAG = "CommentInputDialog" | ||
| 13 | + | ||
| 12 | export interface CommentDialogInputContent { | 14 | export interface CommentDialogInputContent { |
| 13 | comment?: string | 15 | comment?: string |
| 14 | imageUrl?: string | 16 | imageUrl?: string |
| @@ -213,15 +215,16 @@ export struct CommentCustomDialog { | @@ -213,15 +215,16 @@ export struct CommentCustomDialog { | ||
| 213 | struct emojiView { | 215 | struct emojiView { |
| 214 | @ObjectLink publishCommentModel: publishCommentModel | 216 | @ObjectLink publishCommentModel: publishCommentModel |
| 215 | /*没找到获取系统emoji的方案*/ | 217 | /*没找到获取系统emoji的方案*/ |
| 216 | - private emojiString = '😀,😁,😂,😃,😄,😅,😆,😇,😈,😉,😊,😋,😌,😍,😎,😏,😐,😑,😒,😓,😔,😕,😖,😗,😘,😙,😚,😛,😜,😝,😞,😟,😠,😡,😢,😣,😤,😥,😦,😧,😨,😩,😪,😫,😬,😭,😮,😯,😰,😱,😲,😳,😴,😵,😶,😷,😸,😹,😺,😻,😼,😽,😾,😿,🙀,🙅,🙆,🙇,🙈,🙉,🙊,🙋,🙌,🙍,🙎,🙏' | 218 | + private emojiArray = ["😀","😁","😂","😃","😄","😅","😆","😇","😈","😉","😊","😋","😌","😍","😎","😏","😐","😑","😒","😓","😔","😕","😖","😗","😘","😙","😚","😛","😜","😝","😞","😟","😠","😡","😢","😣","😤","😥","😦","😧","😨","😩","😪","😫","😬","😭","😮","😯","😰","😱","😲","😳","😴","😵","😶","😷","😸","😹","😺","😻","😼","😽","😾","😿","🙀","🙅","🙆","🙇","🙈","🙉","🙊","🙋","🙌","🙍","🙎","🙏"] |
| 219 | + // private emojiCharCodeArray: number[] = [] | ||
| 217 | private displayArray: string[][] = [] | 220 | private displayArray: string[][] = [] |
| 218 | private swiperController: SwiperController = new SwiperController() | 221 | private swiperController: SwiperController = new SwiperController() |
| 219 | 222 | ||
| 220 | aboutToAppear(): void { | 223 | aboutToAppear(): void { |
| 221 | 224 | ||
| 222 | 225 | ||
| 223 | - | ||
| 224 | - this.displayArray = chunk(this.emojiString.split(','), 20) | 226 | + // this.emojiCharCodeArray = this.emojiArray.map((a) => { return a.charCodeAt(0) }) |
| 227 | + this.displayArray = chunk(this.emojiArray, 20) | ||
| 225 | 228 | ||
| 226 | //补上删除按钮以及空白占位 | 229 | //补上删除按钮以及空白占位 |
| 227 | let lastElement = this.displayArray.slice(-1)[0]; | 230 | let lastElement = this.displayArray.slice(-1)[0]; |
| @@ -260,10 +263,27 @@ struct emojiView { | @@ -260,10 +263,27 @@ struct emojiView { | ||
| 260 | // .backgroundColor(Color.Orange) | 263 | // .backgroundColor(Color.Orange) |
| 261 | }.onClick(() => { | 264 | }.onClick(() => { |
| 262 | if (emoji == '删除') { | 265 | if (emoji == '删除') { |
| 263 | - this.publishCommentModel.commentContent = this.publishCommentModel.commentContent.substring(0, this.publishCommentModel.commentContent.length -1) | 266 | + let content = this.publishCommentModel.commentContent |
| 267 | + // if (content.length > 3) { | ||
| 268 | + // if (isEmojiCharacter(content.substring(content.length-4))) { | ||
| 269 | + // content = content.substring(0, content.length -4) | ||
| 270 | + // this.publishCommentModel.commentContent = content | ||
| 271 | + // return | ||
| 272 | + // } | ||
| 273 | + // } | ||
| 274 | + if (content.length > 1) { | ||
| 275 | + if (isEmojiCharacter(content.substring(content.length-2))) { | ||
| 276 | + content = content.substring(0, content.length -2) | ||
| 277 | + this.publishCommentModel.commentContent = content | ||
| 278 | + return | ||
| 279 | + } | ||
| 280 | + } | ||
| 281 | + content = content.substring(0, content.length -1) | ||
| 282 | + this.publishCommentModel.commentContent = content | ||
| 264 | } else if (emoji == '') { | 283 | } else if (emoji == '') { |
| 265 | 284 | ||
| 266 | } else { | 285 | } else { |
| 286 | + Logger.debug(TAG, "charCode: " + emoji.charCodeAt(0) + " ==> " + emoji) | ||
| 267 | this.publishCommentModel.commentContent = this.publishCommentModel.commentContent + emoji | 287 | this.publishCommentModel.commentContent = this.publishCommentModel.commentContent + emoji |
| 268 | } | 288 | } |
| 269 | 289 | ||
| @@ -295,6 +315,45 @@ function chunk<T>(array: T[], size: number): T[][] { | @@ -295,6 +315,45 @@ function chunk<T>(array: T[], size: number): T[][] { | ||
| 295 | return result; | 315 | return result; |
| 296 | } | 316 | } |
| 297 | 317 | ||
| 298 | - | ||
| 299 | - | ||
| 300 | - | 318 | +// https://blog.csdn.net/liaowenfeng/article/details/120484855 |
| 319 | +function isEmojiCharacter(substring: string): boolean { | ||
| 320 | + for (let i = 0; i < substring.length; i++) { | ||
| 321 | + let hs = substring.charCodeAt(i); | ||
| 322 | + if (0xd800 <= hs && hs <= 0xdbff) { | ||
| 323 | + if (substring.length > 1) { | ||
| 324 | + let ls = substring.charCodeAt(i + 1); | ||
| 325 | + let uc = ((hs - 0xd800) * 0x400) + (ls - 0xdc00) + 0x10000; | ||
| 326 | + if (0x1d000 <= uc && uc <= 0x1f77f) { | ||
| 327 | + return true; | ||
| 328 | + } | ||
| 329 | + if (0x1f900 <= uc && uc <= 0x1f9ff) { | ||
| 330 | + // SupplementalSymBolsAndPictographs 字符串含有表情字符[U+1F900,U+1F90F] | ||
| 331 | + // https://www.fileformat.info/info/unicode/block/supplemental_symbols_and_pictographs/index.htm | ||
| 332 | + // https://www.fileformat.info/info/unicode/char/1f964/index.htm | ||
| 333 | + return true; | ||
| 334 | + } | ||
| 335 | + } | ||
| 336 | + } | ||
| 337 | + else if (substring.length > 1) { | ||
| 338 | + let ls = substring.charCodeAt(i + 1); | ||
| 339 | + if (ls == 0x20e3) { | ||
| 340 | + return true; | ||
| 341 | + } | ||
| 342 | + } else { | ||
| 343 | + if (0x2100 <= hs && hs <= 0x27ff) { | ||
| 344 | + return true; | ||
| 345 | + } else if (0x2B05 <= hs && hs <= 0x2b07) { | ||
| 346 | + return true; | ||
| 347 | + } else if (0x2934 <= hs && hs <= 0x2935) { | ||
| 348 | + return true; | ||
| 349 | + } else if (0x3297 <= hs && hs <= 0x3299) { | ||
| 350 | + return true; | ||
| 351 | + } else if (hs == 0xa9 || hs == 0xae || hs == 0x303d || hs == 0x3030 || | ||
| 352 | + hs == 0x2b55 || hs == 0x2b1c || hs == 0x2b1b || | ||
| 353 | + hs == 0x2b50) { | ||
| 354 | + return true; | ||
| 355 | + } | ||
| 356 | + } | ||
| 357 | + } | ||
| 358 | + return false; | ||
| 359 | +} |
| @@ -185,7 +185,25 @@ export struct CommentIconComponent { | @@ -185,7 +185,25 @@ export struct CommentIconComponent { | ||
| 185 | Image(this.styleType == 1 ? $r('app.media.comment_icon') : | 185 | Image(this.styleType == 1 ? $r('app.media.comment_icon') : |
| 186 | $r('app.media.comment_icon_white')).width(24).height(24) | 186 | $r('app.media.comment_icon_white')).width(24).height(24) |
| 187 | // Stack({alignContent:Alignment.Start}) { | 187 | // Stack({alignContent:Alignment.Start}) { |
| 188 | + | ||
| 189 | + if (this.showMainText) { | ||
| 190 | + this.commentIcon() | ||
| 191 | + }else { | ||
| 188 | if (Number.parseInt(this.publishCommentModel.totalCommentNumer) != 0) { | 192 | if (Number.parseInt(this.publishCommentModel.totalCommentNumer) != 0) { |
| 193 | + this.commentIcon() | ||
| 194 | + } | ||
| 195 | + } | ||
| 196 | + } | ||
| 197 | + } | ||
| 198 | + .width(24) | ||
| 199 | + .height(24) | ||
| 200 | + .visibility(this.contentDetail.appstyle !== 9 ? Visibility.Visible : Visibility.Hidden) | ||
| 201 | + | ||
| 202 | + // .backgroundColor(Color.Blue) | ||
| 203 | + } | ||
| 204 | + | ||
| 205 | + @Builder | ||
| 206 | + commentIcon() { | ||
| 189 | RelativeContainer() { | 207 | RelativeContainer() { |
| 190 | Image(this.styleType == 1 ? this.showMainText?$r('app.media.comment_icon_text_bg'):$r('app.media.comment_icon_number_bg') : this.showMainText?$r('app.media.comment_icon_text_block_bg'):$r('app.media.ic_like_back_Select')) | 208 | Image(this.styleType == 1 ? this.showMainText?$r('app.media.comment_icon_text_bg'):$r('app.media.comment_icon_number_bg') : this.showMainText?$r('app.media.comment_icon_text_block_bg'):$r('app.media.ic_like_back_Select')) |
| 191 | .objectFit(ImageFit.Fill) | 209 | .objectFit(ImageFit.Fill) |
| @@ -231,15 +249,6 @@ export struct CommentIconComponent { | @@ -231,15 +249,6 @@ export struct CommentIconComponent { | ||
| 231 | x: this.showMainText?8:12, | 249 | x: this.showMainText?8:12, |
| 232 | y: -2 | 250 | y: -2 |
| 233 | }) | 251 | }) |
| 234 | - | ||
| 235 | - } | ||
| 236 | - } | ||
| 237 | - } | ||
| 238 | - .width(24) | ||
| 239 | - .height(24) | ||
| 240 | - .visibility(this.contentDetail.appstyle !== 9 ? Visibility.Visible : Visibility.Hidden) | ||
| 241 | - | ||
| 242 | - // .backgroundColor(Color.Blue) | ||
| 243 | } | 252 | } |
| 244 | 253 | ||
| 245 | private getMeasureText(text: string) { | 254 | private getMeasureText(text: string) { |
| @@ -140,6 +140,14 @@ export struct ZhSingleRow06 { | @@ -140,6 +140,14 @@ export struct ZhSingleRow06 { | ||
| 140 | .borderRadius(4) | 140 | .borderRadius(4) |
| 141 | .margin({bottom: 12}) | 141 | .margin({bottom: 12}) |
| 142 | .onClick(() => { | 142 | .onClick(() => { |
| 143 | + let contentBean = ProcessUtils.commentBeanToContentBean(this.compDTO.operDataList[0]?.commentInfo as commentInfo) | ||
| 144 | + if(contentBean !== null && contentBean !== undefined){ | ||
| 145 | + let type = contentBean.objectType; | ||
| 146 | + if (type == "1") { | ||
| 147 | + AppStorage.setOrCreate<number>('isZhingleRow06', 1) | ||
| 148 | + } | ||
| 149 | + } | ||
| 150 | + | ||
| 143 | ProcessUtils.commentGotoWeb(this.compDTO.operDataList[0]?.commentInfo as commentInfo) | 151 | ProcessUtils.commentGotoWeb(this.compDTO.operDataList[0]?.commentInfo as commentInfo) |
| 144 | }) | 152 | }) |
| 145 | 153 |
| @@ -25,7 +25,8 @@ import { | @@ -25,7 +25,8 @@ import { | ||
| 25 | postExecuteCollectRecordParams, | 25 | postExecuteCollectRecordParams, |
| 26 | postExecuteLikeParams, | 26 | postExecuteLikeParams, |
| 27 | postInteractAccentionOperateParams, | 27 | postInteractAccentionOperateParams, |
| 28 | - postRecommendListParams | 28 | + postRecommendListParams, |
| 29 | + contentInteractParams | ||
| 29 | } from 'wdBean'; | 30 | } from 'wdBean'; |
| 30 | import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; | 31 | import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; |
| 31 | import { SpConstants } from 'wdConstant/Index'; | 32 | import { SpConstants } from 'wdConstant/Index'; |
| @@ -146,8 +147,27 @@ export class PageRepository { | @@ -146,8 +147,27 @@ export class PageRepository { | ||
| 146 | return url; | 147 | return url; |
| 147 | } | 148 | } |
| 148 | 149 | ||
| 149 | - static getInteractDataUrl() { | ||
| 150 | - let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_DATA_PATH; | 150 | + static getInteractDataUrl(params: contentInteractParams) { |
| 151 | + let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_V2_DATA_PATH; | ||
| 152 | + if (params.contentType == 8 && params.readFlag != 1) { | ||
| 153 | + url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_DATA_PATH; | ||
| 154 | + } | ||
| 155 | + url = url + "?contentId=" + params.contentId | ||
| 156 | + + "&contentType=" + params.contentType | ||
| 157 | + if (!StringUtils.isEmpty(params.contentRelId)) { | ||
| 158 | + url = url + "&contentRelId=" + params.contentRelId; | ||
| 159 | + } | ||
| 160 | + if (!StringUtils.isEmpty(params.relType)) { | ||
| 161 | + url = url + "&relType=" + params.relType; | ||
| 162 | + } | ||
| 163 | + if (!StringUtils.isEmpty(params.channelId)) { | ||
| 164 | + url = url + "&channelId=" + params.channelId; | ||
| 165 | + } | ||
| 166 | + if (params.contentType == 8){ | ||
| 167 | + url = url + "&readFlag=" + params.readFlag; | ||
| 168 | + } | ||
| 169 | + url = url + "&rmhPlatform=" + params.rmhPlatform; | ||
| 170 | + url = url + "&detail=" + '1'; | ||
| 151 | Logger.info(TAG, "getInteractDataUrl url = " + url) | 171 | Logger.info(TAG, "getInteractDataUrl url = " + url) |
| 152 | return url; | 172 | return url; |
| 153 | } | 173 | } |
| @@ -305,7 +325,8 @@ export class PageRepository { | @@ -305,7 +325,8 @@ export class PageRepository { | ||
| 305 | }; | 325 | }; |
| 306 | 326 | ||
| 307 | static fetchInteractData(param: object) { | 327 | static fetchInteractData(param: object) { |
| 308 | - let url = PageRepository.getInteractDataUrl() | 328 | + // let url = PageRepository.getInteractDataUrl() |
| 329 | + let url = HttpUrlUtils.getHost() + HttpUrlUtils.INTERACT_DATA_PATH | ||
| 309 | return WDHttp.post<ResponseDTO<InteractDataDTO[]>>(url, param) | 330 | return WDHttp.post<ResponseDTO<InteractDataDTO[]>>(url, param) |
| 310 | }; | 331 | }; |
| 311 | 332 | ||
| @@ -344,6 +365,15 @@ export class PageRepository { | @@ -344,6 +365,15 @@ export class PageRepository { | ||
| 344 | return WDHttp.post(url, params) | 365 | return WDHttp.post(url, params) |
| 345 | } | 366 | } |
| 346 | 367 | ||
| 368 | + /** | ||
| 369 | + *文章详情页点赞数 | ||
| 370 | + * @returns | ||
| 371 | + */ | ||
| 372 | + static getImageAndTextInteract(params: contentInteractParams) { | ||
| 373 | + let url = PageRepository.getInteractDataUrl(params) | ||
| 374 | + return WDHttp.get<ResponseDTO<InteractDataDTO>>(url) | ||
| 375 | + } | ||
| 376 | + | ||
| 347 | // 浏览历史新增、删除接口 | 377 | // 浏览历史新增、删除接口 |
| 348 | static fetchInteractBrowsOperate(param: object) { | 378 | static fetchInteractBrowsOperate(param: object) { |
| 349 | let url = PageRepository.getInteractBrowsOperateUrl() | 379 | let url = PageRepository.getInteractBrowsOperateUrl() |
| @@ -213,12 +213,12 @@ export struct PlayUIComponent { | @@ -213,12 +213,12 @@ export struct PlayUIComponent { | ||
| 213 | LottieView({ | 213 | LottieView({ |
| 214 | name: 'live_status_wait', | 214 | name: 'live_status_wait', |
| 215 | path: "lottie/live_detail_living.json", | 215 | path: "lottie/live_detail_living.json", |
| 216 | - lottieWidth: 9, | ||
| 217 | - lottieHeight: 9, | 216 | + lottieWidth: 12, |
| 217 | + lottieHeight: 12, | ||
| 218 | autoplay: true, | 218 | autoplay: true, |
| 219 | loop: true, | 219 | loop: true, |
| 220 | }) | 220 | }) |
| 221 | - .margin({ right: 2 }) | 221 | + .margin({ right: 3 }) |
| 222 | } | 222 | } |
| 223 | 223 | ||
| 224 | Text('直播中') | 224 | Text('直播中') |
| @@ -121,12 +121,12 @@ export struct PlayerTitleComponent { | @@ -121,12 +121,12 @@ export struct PlayerTitleComponent { | ||
| 121 | LottieView({ | 121 | LottieView({ |
| 122 | name: 'live_status_wait', | 122 | name: 'live_status_wait', |
| 123 | path: "lottie/live_detail_living.json", | 123 | path: "lottie/live_detail_living.json", |
| 124 | - lottieWidth: 9, | ||
| 125 | - lottieHeight: 9, | 124 | + lottieWidth: 12, |
| 125 | + lottieHeight: 12, | ||
| 126 | autoplay: true, | 126 | autoplay: true, |
| 127 | loop: true, | 127 | loop: true, |
| 128 | }) | 128 | }) |
| 129 | - .margin({ right: 2 }) | 129 | + .margin({ right: 3 }) |
| 130 | }.margin({ right: 1 }) | 130 | }.margin({ right: 1 }) |
| 131 | 131 | ||
| 132 | // Image($r('app.media.icon_live_status_running')) | 132 | // Image($r('app.media.icon_live_status_running')) |
| @@ -59,7 +59,7 @@ export struct PlayerUIComponent { | @@ -59,7 +59,7 @@ export struct PlayerUIComponent { | ||
| 59 | } | 59 | } |
| 60 | this.isFullScreen = true | 60 | this.isFullScreen = true |
| 61 | }) | 61 | }) |
| 62 | - .visibility(!this.isFullScreen ? Visibility.Visible : Visibility.Hidden) | 62 | + .visibility(!this.isFullScreen && this.isSmall ? Visibility.Visible : Visibility.Hidden) |
| 63 | .margin({ top: 301}) // 195 + 211 - 105 | 63 | .margin({ top: 301}) // 195 + 211 - 105 |
| 64 | .position({ x: '96.8%' }) | 64 | .position({ x: '96.8%' }) |
| 65 | .markAnchor({ x: '96.8%' }) | 65 | .markAnchor({ x: '96.8%' }) |
| @@ -62,36 +62,36 @@ export struct PlayerVideoControlComponent { | @@ -62,36 +62,36 @@ export struct PlayerVideoControlComponent { | ||
| 62 | }) | 62 | }) |
| 63 | } | 63 | } |
| 64 | //全屏按钮 | 64 | //全屏按钮 |
| 65 | - if(!this.isSmall) { | ||
| 66 | - Image($r('app.media.icon_live_player_full_screen')) | ||
| 67 | - .height(32) | ||
| 68 | - .width(32) | ||
| 69 | - .padding(5) | ||
| 70 | - .borderRadius($r('app.float.vp_16')) | ||
| 71 | - .border({width:0.5}) | ||
| 72 | - .borderColor(0x4DFFFFFF) | ||
| 73 | - .backgroundColor(0x4D222222) | ||
| 74 | - .margin({right:10}) | ||
| 75 | - .onClick(() => { | ||
| 76 | - WindowModel.shared.setSpecificSystemBarEnabled(false) | ||
| 77 | - this.displayDirection = DisplayDirection.VIDEO_HORIZONTAL | ||
| 78 | - WindowModel.shared.setPreferredOrientation( | ||
| 79 | - window.Orientation.LANDSCAPE) | ||
| 80 | - if(this.playerController){ | ||
| 81 | - // if(this.playerController.onVideoSizePlayerUIComponentMethod){ | ||
| 82 | - // this.playerController.onVideoSizePlayerUIComponentMethod(1,2) | 65 | + // if(!this.isSmall) { |
| 66 | + // Image($r('app.media.icon_live_player_full_screen')) | ||
| 67 | + // .height(32) | ||
| 68 | + // .width(32) | ||
| 69 | + // .padding(5) | ||
| 70 | + // .borderRadius($r('app.float.vp_16')) | ||
| 71 | + // .border({width:0.5}) | ||
| 72 | + // .borderColor(0x4DFFFFFF) | ||
| 73 | + // .backgroundColor(0x4D222222) | ||
| 74 | + // .margin({right:10}) | ||
| 75 | + // .onClick(() => { | ||
| 76 | + // WindowModel.shared.setSpecificSystemBarEnabled(false) | ||
| 77 | + // this.displayDirection = DisplayDirection.VIDEO_HORIZONTAL | ||
| 78 | + // WindowModel.shared.setPreferredOrientation( | ||
| 79 | + // window.Orientation.LANDSCAPE) | ||
| 80 | + // if(this.playerController){ | ||
| 81 | + // // if(this.playerController.onVideoSizePlayerUIComponentMethod){ | ||
| 82 | + // // this.playerController.onVideoSizePlayerUIComponentMethod(1,2) | ||
| 83 | + // // } | ||
| 84 | + // if(this.playerController.onVideoSizePlayerComponentBack){ | ||
| 85 | + // this.playerController.onVideoSizePlayerComponentBack(1,2) | ||
| 86 | + // } | ||
| 87 | + // | ||
| 88 | + // if(this.playerController.onVideoSizePlayerTitleComponentBack){ | ||
| 89 | + // this.playerController.onVideoSizePlayerTitleComponentBack(1,2) | ||
| 90 | + // } | ||
| 91 | + // } | ||
| 92 | + // this.isFullScreen = true | ||
| 93 | + // }) | ||
| 83 | // } | 94 | // } |
| 84 | - if(this.playerController.onVideoSizePlayerComponentBack){ | ||
| 85 | - this.playerController.onVideoSizePlayerComponentBack(1,2) | ||
| 86 | - } | ||
| 87 | - | ||
| 88 | - if(this.playerController.onVideoSizePlayerTitleComponentBack){ | ||
| 89 | - this.playerController.onVideoSizePlayerTitleComponentBack(1,2) | ||
| 90 | - } | ||
| 91 | - } | ||
| 92 | - this.isFullScreen = true | ||
| 93 | - }) | ||
| 94 | - } | ||
| 95 | } | 95 | } |
| 96 | .alignItems(VerticalAlign.Center) | 96 | .alignItems(VerticalAlign.Center) |
| 97 | // .linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] }) | 97 | // .linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] }) |
| @@ -93,12 +93,14 @@ export struct DetailPlayShortVideoPage { | @@ -93,12 +93,14 @@ export struct DetailPlayShortVideoPage { | ||
| 93 | async videoStatusChange() { | 93 | async videoStatusChange() { |
| 94 | if (this.currentIndex === this.index) { | 94 | if (this.currentIndex === this.index) { |
| 95 | if (this.switchVideoStatus && this.isPlay && this.onlyWifiLoadVideo) { | 95 | if (this.switchVideoStatus && this.isPlay && this.onlyWifiLoadVideo) { |
| 96 | - await this.playerController.play() | 96 | + // await this.playerController.play() |
| 97 | + this.playerController?.switchPlayOrPause(); | ||
| 97 | await this.playerController.startRenderFrame(() => { | 98 | await this.playerController.startRenderFrame(() => { |
| 98 | this.imageVisible = false | 99 | this.imageVisible = false |
| 99 | }) | 100 | }) |
| 100 | } else { | 101 | } else { |
| 101 | - this.playerController.stop() | 102 | + // this.playerController.stop() |
| 103 | + this.playerController.pause() | ||
| 102 | } | 104 | } |
| 103 | } | 105 | } |
| 104 | } | 106 | } |
| @@ -246,7 +248,8 @@ export struct DetailPlayShortVideoPage { | @@ -246,7 +248,8 @@ export struct DetailPlayShortVideoPage { | ||
| 246 | async aboutToDisappear(): Promise<void> { | 248 | async aboutToDisappear(): Promise<void> { |
| 247 | console.log(TAG, 'aboutToDisappear', this.index) | 249 | console.log(TAG, 'aboutToDisappear', this.index) |
| 248 | await this.playerController?.pause() | 250 | await this.playerController?.pause() |
| 249 | - await this.playerController?.release(); | 251 | + // await this.playerController?.stop() |
| 252 | + // await this.playerController?.release(); | ||
| 250 | } | 253 | } |
| 251 | 254 | ||
| 252 | /** | 255 | /** |
| @@ -266,6 +269,7 @@ export struct DetailPlayShortVideoPage { | @@ -266,6 +269,7 @@ export struct DetailPlayShortVideoPage { | ||
| 266 | // height = rect.width | 269 | // height = rect.width |
| 267 | // } | 270 | // } |
| 268 | // 视频宽高比屏幕大,则宽度撑满 | 271 | // 视频宽高比屏幕大,则宽度撑满 |
| 272 | + //console.log(`cj2024 ratio = ${this.ratio} width / height = ${width / height}`) | ||
| 269 | if (this.ratio > width / height) { | 273 | if (this.ratio > width / height) { |
| 270 | this.playerWidth = '100%' | 274 | this.playerWidth = '100%' |
| 271 | this.playerHeight = px2vp(width / this.ratio) | 275 | this.playerHeight = px2vp(width / this.ratio) |
| @@ -274,7 +278,7 @@ export struct DetailPlayShortVideoPage { | @@ -274,7 +278,7 @@ export struct DetailPlayShortVideoPage { | ||
| 274 | this.playerHeight = '100%' | 278 | this.playerHeight = '100%' |
| 275 | this.playerWidth = px2vp(height * this.ratio) | 279 | this.playerWidth = px2vp(height * this.ratio) |
| 276 | } | 280 | } |
| 277 | - console.log('calculatePlayerRect=====', width, height) | 281 | + //console.log('cj2024 calculatePlayerRect=====', width, height,px2vp(this.windowHeight),this.playerHeight) |
| 278 | 282 | ||
| 279 | } | 283 | } |
| 280 | 284 | ||
| @@ -321,6 +325,7 @@ export struct DetailPlayShortVideoPage { | @@ -321,6 +325,7 @@ export struct DetailPlayShortVideoPage { | ||
| 321 | } | 325 | } |
| 322 | 326 | ||
| 323 | } | 327 | } |
| 328 | + // .backgroundColor(Color.Green) | ||
| 324 | .width('100%') | 329 | .width('100%') |
| 325 | .layoutWeight(1) | 330 | .layoutWeight(1) |
| 326 | .onClick(() => { | 331 | .onClick(() => { |
| @@ -467,6 +472,8 @@ export struct DetailPlayShortVideoPage { | @@ -467,6 +472,8 @@ export struct DetailPlayShortVideoPage { | ||
| 467 | } | 472 | } |
| 468 | .width('100%') | 473 | .width('100%') |
| 469 | .height('100%') | 474 | .height('100%') |
| 475 | + // .backgroundColor(Color.Orange) | ||
| 476 | + // .opacity(0.2) | ||
| 470 | 477 | ||
| 471 | } | 478 | } |
| 472 | 479 |
| @@ -45,6 +45,7 @@ export struct PlayerRightView { | @@ -45,6 +45,7 @@ export struct PlayerRightView { | ||
| 45 | @Consume pageId: string | 45 | @Consume pageId: string |
| 46 | followUserId: string = '' | 46 | followUserId: string = '' |
| 47 | followUserName: string = '' | 47 | followUserName: string = '' |
| 48 | + @State isZhingleRow06: number = AppStorage.get<number>('isZhingleRow06') || 0 | ||
| 48 | 49 | ||
| 49 | aboutToAppear() { | 50 | aboutToAppear() { |
| 50 | // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 | 51 | // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 |
| @@ -53,6 +54,14 @@ export struct PlayerRightView { | @@ -53,6 +54,14 @@ export struct PlayerRightView { | ||
| 53 | // console.log(TAG, 'this.likesStyle', this.likesStyle) | 54 | // console.log(TAG, 'this.likesStyle', this.likesStyle) |
| 54 | // console.log(TAG, 'this.openLikes', this.openLikes) | 55 | // console.log(TAG, 'this.openLikes', this.openLikes) |
| 55 | this.contentTrackingDict() | 56 | this.contentTrackingDict() |
| 57 | + if (this.isZhingleRow06 == 1) { //锐评精选卡视频类自动弹评论框 | ||
| 58 | + this.showCommentList = true | ||
| 59 | + } | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + aboutToDisappear(): void { | ||
| 63 | + AppStorage.setOrCreate<number>('isZhingleRow06', 0) | ||
| 64 | + this.showCommentList = false | ||
| 56 | } | 65 | } |
| 57 | 66 | ||
| 58 | contentTrackingDict() { | 67 | contentTrackingDict() { |
-
Please register or login to post a comment