Showing
44 changed files
with
318 additions
and
462 deletions
| @@ -203,6 +203,7 @@ export class ProcessUtils { | @@ -203,6 +203,7 @@ export class ProcessUtils { | ||
| 203 | relType: content?.relType, | 203 | relType: content?.relType, |
| 204 | relId: content?.relId, | 204 | relId: content?.relId, |
| 205 | channelId: content?.channelId, | 205 | channelId: content?.channelId, |
| 206 | + pageId: content?.pageId | ||
| 206 | } as ExtraDTO | 207 | } as ExtraDTO |
| 207 | } as Params, | 208 | } as Params, |
| 208 | }; | 209 | }; |
| @@ -10,6 +10,7 @@ export interface ExtraDTO extends ItemDTO { | @@ -10,6 +10,7 @@ export interface ExtraDTO extends ItemDTO { | ||
| 10 | topicId: string; | 10 | topicId: string; |
| 11 | channelId: string; | 11 | channelId: string; |
| 12 | compId: string; | 12 | compId: string; |
| 13 | + pageId: string; | ||
| 13 | sourcePage: string; | 14 | sourcePage: string; |
| 14 | relId: string; | 15 | relId: string; |
| 15 | relType: string; | 16 | relType: string; |
| @@ -25,5 +25,6 @@ export interface Params { | @@ -25,5 +25,6 @@ export interface Params { | ||
| 25 | creatorId?: string; //号主id | 25 | creatorId?: string; //号主id |
| 26 | videoUrl?: string; | 26 | videoUrl?: string; |
| 27 | videoCoverUrl?: string; | 27 | videoCoverUrl?: string; |
| 28 | + pageId?: string; | ||
| 28 | backVisibility?: boolean; //展示顶部返回栏 | 29 | backVisibility?: boolean; //展示顶部返回栏 |
| 29 | } | 30 | } |
| @@ -6,6 +6,7 @@ import { VideoInfoDTO } from './VideoInfoDTO'; | @@ -6,6 +6,7 @@ import { VideoInfoDTO } from './VideoInfoDTO'; | ||
| 6 | import { RmhInfoDTO } from './RmhInfoDTO' | 6 | import { RmhInfoDTO } from './RmhInfoDTO' |
| 7 | import { UserInfoDTO } from './UserInfoDTO' | 7 | import { UserInfoDTO } from './UserInfoDTO' |
| 8 | 8 | ||
| 9 | + | ||
| 9 | /** | 10 | /** |
| 10 | * 接口定义: | 11 | * 接口定义: |
| 11 | * http://192.168.1.3:3300/project/3802/interface/api/200915 | 12 | * http://192.168.1.3:3300/project/3802/interface/api/200915 |
| @@ -40,7 +41,7 @@ export interface ContentDetailDTO { | @@ -40,7 +41,7 @@ export interface ContentDetailDTO { | ||
| 40 | shareInfo: ShareInfoDTO; | 41 | shareInfo: ShareInfoDTO; |
| 41 | photoList: any[]; | 42 | photoList: any[]; |
| 42 | videoInfo: VideoInfoDTO[]; | 43 | videoInfo: VideoInfoDTO[]; |
| 43 | - liveInfo?: any; | 44 | + liveInfo?: any ; |
| 44 | voteInfo?: any; | 45 | voteInfo?: any; |
| 45 | rmhInfo?: RmhInfoDTO | null; | 46 | rmhInfo?: RmhInfoDTO | null; |
| 46 | userInfo?: UserInfoDTO | null; | 47 | userInfo?: UserInfoDTO | null; |
| 1 | +import { FullColumnImgUrlDTO } from '../detail/FullColumnImgUrlDTO' | ||
| 2 | +import { ReLInfoDTO } from '../detail/ReLInfoDTO' | ||
| 1 | import { RmhInfoDTO } from '../detail/RmhInfoDTO' | 3 | import { RmhInfoDTO } from '../detail/RmhInfoDTO' |
| 2 | 4 | ||
| 3 | export interface LiveDetailsBean { | 5 | export interface LiveDetailsBean { |
| 4 | - /** | ||
| 5 | - * { | ||
| 6 | - "code": "0", | ||
| 7 | - "data": [ | ||
| 8 | - { | ||
| 9 | - "activityInfos": [], | ||
| 10 | - "appstyle": 2, | ||
| 11 | - "audioList": [], | ||
| 12 | - "authorList": [ | ||
| 13 | - { | ||
| 14 | - "authorName": "雷崔捷" | ||
| 15 | - } | ||
| 16 | - ], | ||
| 17 | - "bestNoticer": null, | ||
| 18 | - "commentDisplay": 0, | ||
| 19 | - "editorName": "", | ||
| 20 | - "firstFrameImageUri": "", | ||
| 21 | - "fullColumnImgUrls": [ | ||
| 22 | - { | ||
| 23 | - "format": null, | ||
| 24 | - "height": null, | ||
| 25 | - "landscape": null, | ||
| 26 | - "size": null, | ||
| 27 | - "url": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/rmrb_71671711971849.png", | ||
| 28 | - "weight": null | ||
| 29 | - } | ||
| 30 | - ], | ||
| 31 | - "hasPopUp": null, | ||
| 32 | - "isNewspaper": false, | ||
| 33 | - "itemId": "", | ||
| 34 | - "itemTypeCode": "", | ||
| 35 | - "keyArticle": 0, | ||
| 36 | - "likesStyle": null, | ||
| 37 | - "liveInfo": { | ||
| 38 | - "background": { | ||
| 39 | - "imageUrl": "", | ||
| 40 | - "name": "" | ||
| 41 | - }, | ||
| 42 | - "backgroundStyle": null, | ||
| 43 | - "cornerFlag": 0, | ||
| 44 | - "cornerImgUrl": "", | ||
| 45 | - "cornerLinkUrl": "", | ||
| 46 | - "createUserId": "", | ||
| 47 | - "createUserName": "", | ||
| 48 | - "endTime": "2024-04-03 11:08:00", | ||
| 49 | - "handAngleImageUri": "", | ||
| 50 | - "handAngleLink": "", | ||
| 51 | - "handAngleSwitch": false, | ||
| 52 | - "likeEnable": 1, | ||
| 53 | - "likesStyle": "thumb", | ||
| 54 | - "liveExperience": 1, | ||
| 55 | - "liveExperienceTime": 3, | ||
| 56 | - "liveLandScape": "news", | ||
| 57 | - "liveState": "end", | ||
| 58 | - "liveStyle": 0, | ||
| 59 | - "liveWay": 0, | ||
| 60 | - "mlive": { | ||
| 61 | - "barrageShowEnable": false, | ||
| 62 | - "giftEnable": false, | ||
| 63 | - "mliveId": 20000016257, | ||
| 64 | - "roomId": "5381b934-cea8-4338-bd12-5bf70af43e0c" | ||
| 65 | - }, | ||
| 66 | - "notice": "", | ||
| 67 | - "openComment": 1, | ||
| 68 | - "padImageUri": "", | ||
| 69 | - "planStartTime": "2024-04-03 05:00:00", | ||
| 70 | - "playbackSwitch": true, | ||
| 71 | - "preCommentFlag": 1, | ||
| 72 | - "previewType": 1, | ||
| 73 | - "previewUrl": "", | ||
| 74 | - "shareSwitch": "", | ||
| 75 | - "startTime": "2024-04-03 05:03:23", | ||
| 76 | - "tplId": 5, | ||
| 77 | - "vlive": [ | ||
| 78 | - { | ||
| 79 | - "coverImageUrl": "", | ||
| 80 | - "definition": [], | ||
| 81 | - "liveStreamManagerId": null, | ||
| 82 | - "liveStreamType": 1, | ||
| 83 | - "liveUrl": "https://plwbthird.live.weibo.com/alicdn/5018938748437049.m3u8", | ||
| 84 | - "name": "线路1", | ||
| 85 | - "replayUri": "http://mlive3.video.weibocdn.com/record/alicdn/5018726527666338/index.m3u8", | ||
| 86 | - "serialNum": null, | ||
| 87 | - "shiftEnable": false, | ||
| 88 | - "showPad": false, | ||
| 89 | - "type": "play", | ||
| 90 | - "vliveId": 186728 | ||
| 91 | - } | ||
| 92 | - ], | ||
| 93 | - "vrType": 0 | ||
| 94 | - }, | ||
| 95 | - "menuShow": 1, | ||
| 96 | - "newIntroduction": "眼前有山河,心中有家国!每年清明节前夕,宁夏固原市第二中学和固原市弘文中学会组织入学新生,一天之内徒步54公里从学校往返任山河烈士陵园,用这种方式缅怀烈士们,这份坚定与执着已经延续了29年。", | ||
| 97 | - "newLinkObject": null, | ||
| 98 | - "newsBodyTitle": "", | ||
| 99 | - "newsContent": "", | ||
| 100 | - "newsContentBak": "", | ||
| 101 | - "newsDownTitle": "", | ||
| 102 | - "newsId": 20000016229, | ||
| 103 | - "newsLinkUrl": "", | ||
| 104 | - "newsShortTitle": "", | ||
| 105 | - "newsSource": "41", | ||
| 106 | - "newsSourceName": "", | ||
| 107 | - "newsSummary": "", | ||
| 108 | - "newsTags": "", | ||
| 109 | - "newsTitle": "徒步54公里的思政课,坚守29年的薪火传承", | ||
| 110 | - "newsType": 2, | ||
| 111 | - "oldNewsId": "7218507", | ||
| 112 | - "openAudio": 0, | ||
| 113 | - "openComment": null, | ||
| 114 | - "openLikes": null, | ||
| 115 | - "photoList": [], | ||
| 116 | - "popUps": [], | ||
| 117 | - "preCommentFlag": null, | ||
| 118 | - "publishTime": "2024-04-01 19:44:00", | ||
| 119 | - "reLInfo": { | ||
| 120 | - "channelId": 2061, | ||
| 121 | - "relId": "500005272745", | ||
| 122 | - "relObjectId": 2061, | ||
| 123 | - "relType": "1" | ||
| 124 | - }, | ||
| 125 | - "readFlag": 0, | ||
| 126 | - "recommendShow": null, | ||
| 127 | - "rmhInfo": null, | ||
| 128 | - "rmhPlatform": 0, | ||
| 129 | - "sceneId": "", | ||
| 130 | - "serials": null, | ||
| 131 | - "shareInfo": { | ||
| 132 | - "shareCoverUrl": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404011944259539.png?x-oss-process=image/resize,w_400", | ||
| 133 | - "shareOpen": 1, | ||
| 134 | - "sharePosterCoverUrl": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/rmrb_71671711971849.png?x-oss-process=image/resize,m_fill,h_450,w_800,limit_0/quality,q_90", | ||
| 135 | - "sharePosterOpen": 1, | ||
| 136 | - "shareSummary": "人民日报,有品质的新闻", | ||
| 137 | - "shareTitle": "徒步54公里的思政课,坚守29年的薪火传承", | ||
| 138 | - "shareUrl": "https://people.pdnews.cn/column/20000016229-500005272745" | ||
| 139 | - }, | ||
| 140 | - "specialColumnId": null, | ||
| 141 | - "specialColumnName": "", | ||
| 142 | - "subSceneId": "", | ||
| 143 | - "timeline": null, | ||
| 144 | - "topicInfo": null, | ||
| 145 | - "traceId": "", | ||
| 146 | - "traceInfo": "", | ||
| 147 | - "userInfo": null, | ||
| 148 | - "videoInfo": [], | ||
| 149 | - "viewCount": 0, | ||
| 150 | - "visitorComment": 1, | ||
| 151 | - "voteInfo": null | ||
| 152 | - } | ||
| 153 | - ], | ||
| 154 | - "message": "Success", | ||
| 155 | - "meta": null, | ||
| 156 | - "requestId": "", | ||
| 157 | - "success": true, | ||
| 158 | - "timestamp": 1712807514322 | ||
| 159 | - } | ||
| 160 | - */ | 6 | + |
| 7 | + | ||
| 8 | + visitorComment: number | ||
| 9 | + newsType: number; | ||
| 10 | + keyArticle: number | ||
| 161 | liveInfo: LiveInfo | 11 | liveInfo: LiveInfo |
| 162 | - fullColumnImgUrls: Array<FullColumnImgUrlBean> | 12 | + fullColumnImgUrls: Array<FullColumnImgUrlDTO> |
| 163 | newsTitle: string | 13 | newsTitle: string |
| 164 | newsId: string | 14 | newsId: string |
| 165 | newIntroduction: string | 15 | newIntroduction: string |
| 166 | //迁移id | 16 | //迁移id |
| 167 | oldNewsId: string | 17 | oldNewsId: string |
| 168 | - reLInfo: ReLInfo | 18 | + reLInfo: ReLInfoDTO |
| 169 | rmhInfo: RmhInfoDTO | 19 | rmhInfo: RmhInfoDTO |
| 170 | } | 20 | } |
| 171 | 21 | ||
| @@ -188,13 +38,6 @@ export interface MLive { | @@ -188,13 +38,6 @@ export interface MLive { | ||
| 188 | mliveId: string | 38 | mliveId: string |
| 189 | } | 39 | } |
| 190 | 40 | ||
| 191 | -export interface FullColumnImgUrlBean { | ||
| 192 | - url: string | ||
| 193 | - height: string | ||
| 194 | - landscape: number | ||
| 195 | - size: string | ||
| 196 | - weight: string | ||
| 197 | -} | ||
| 198 | 41 | ||
| 199 | export interface Vlive { | 42 | export interface Vlive { |
| 200 | //拉流直播 url | 43 | //拉流直播 url |
| @@ -205,9 +48,7 @@ export interface Vlive { | @@ -205,9 +48,7 @@ export interface Vlive { | ||
| 205 | liveStreamType: number | null | 48 | liveStreamType: number | null |
| 206 | } | 49 | } |
| 207 | 50 | ||
| 208 | -export interface ReLInfo { | ||
| 209 | - relId: string | ||
| 210 | -} | 51 | + |
| 211 | 52 | ||
| 212 | export interface joinPeopleNum { | 53 | export interface joinPeopleNum { |
| 213 | barrageNum: number, | 54 | barrageNum: number, |
| 1 | -import { FullColumnImgUrlBean } from './LiveDetailsBean' | ||
| 2 | - | 1 | +import { FullColumnImgUrlDTO } from '../detail/FullColumnImgUrlDTO' |
| 3 | export interface LiveRoomBean { | 2 | export interface LiveRoomBean { |
| 4 | pageNum: number | 3 | pageNum: number |
| 5 | pageSize: number | 4 | pageSize: number |
| @@ -32,6 +31,6 @@ export interface LiveRoomItemBean { | @@ -32,6 +31,6 @@ export interface LiveRoomItemBean { | ||
| 32 | //音频地址 | 31 | //音频地址 |
| 33 | audioUrl: string | 32 | audioUrl: string |
| 34 | //详情页面插入数据bean | 33 | //详情页面插入数据bean |
| 35 | - fullColumnImgUrlDto: FullColumnImgUrlBean | 34 | + fullColumnImgUrlDto: FullColumnImgUrlDTO |
| 36 | 35 | ||
| 37 | } | 36 | } |
| @@ -15,7 +15,7 @@ export struct InteractMComponent { | @@ -15,7 +15,7 @@ export struct InteractMComponent { | ||
| 15 | build() { | 15 | build() { |
| 16 | Row(){ | 16 | Row(){ |
| 17 | Image(this.messageModel.InteractMsubM.headUrl) | 17 | Image(this.messageModel.InteractMsubM.headUrl) |
| 18 | - .alt($r('app.media.default_head')) | 18 | + .alt(this.messageModel.InteractMsubM.userType === '1'?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon')) |
| 19 | .width(36) | 19 | .width(36) |
| 20 | .height(36) | 20 | .height(36) |
| 21 | .borderRadius(18) | 21 | .borderRadius(18) |
| @@ -3,7 +3,7 @@ import { CompList, ContentDTO, InteractDataDTO} from 'wdBean'; | @@ -3,7 +3,7 @@ import { CompList, ContentDTO, InteractDataDTO} from 'wdBean'; | ||
| 3 | import { BreakpointConstants } from 'wdConstant'; | 3 | import { BreakpointConstants } from 'wdConstant'; |
| 4 | import { Logger } from 'wdKit'; | 4 | import { Logger } from 'wdKit'; |
| 5 | import { PaperSingleColumn999CardView } from '../page/CardView'; | 5 | import { PaperSingleColumn999CardView } from '../page/CardView'; |
| 6 | -import { EmptyComponent } from '../view/EmptyComponent'; | 6 | +import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent'; |
| 7 | 7 | ||
| 8 | const TAG = 'SingleColumn999Component'; | 8 | const TAG = 'SingleColumn999Component'; |
| 9 | 9 | ||
| @@ -153,9 +153,8 @@ export struct SingleColumn999Component { | @@ -153,9 +153,8 @@ export struct SingleColumn999Component { | ||
| 153 | }) | 153 | }) |
| 154 | } else { | 154 | } else { |
| 155 | if (this.compListItem && this.compListItem?.operDataList) { | 155 | if (this.compListItem && this.compListItem?.operDataList) { |
| 156 | - EmptyComponent({ emptyHeight: 200 }) | 156 | + EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoListContent}) |
| 157 | } | 157 | } |
| 158 | - | ||
| 159 | } | 158 | } |
| 160 | } | 159 | } |
| 161 | 160 | ||
| @@ -170,9 +169,13 @@ export struct SingleColumn999Component { | @@ -170,9 +169,13 @@ export struct SingleColumn999Component { | ||
| 170 | */ | 169 | */ |
| 171 | @Builder | 170 | @Builder |
| 172 | buildPaperItem(item: ContentDTO, index: number) { | 171 | buildPaperItem(item: ContentDTO, index: number) { |
| 173 | - PaperSingleColumn999CardView({ | ||
| 174 | - item: item, | ||
| 175 | - index: index, | ||
| 176 | - }) | 172 | + ///屏蔽早晚报 音频 |
| 173 | + if (item.objectType != '13'){ | ||
| 174 | + PaperSingleColumn999CardView({ | ||
| 175 | + item: item, | ||
| 176 | + index: index, | ||
| 177 | + }) | ||
| 178 | + } | ||
| 179 | + | ||
| 177 | } | 180 | } |
| 178 | } | 181 | } |
| @@ -12,6 +12,7 @@ import { EmptyComponent } from '../components/view/EmptyComponent'; | @@ -12,6 +12,7 @@ import { EmptyComponent } from '../components/view/EmptyComponent'; | ||
| 12 | import { NetworkUtil, WindowModel } from 'wdKit'; | 12 | import { NetworkUtil, WindowModel } from 'wdKit'; |
| 13 | import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare' | 13 | import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare' |
| 14 | import { common } from '@kit.AbilityKit'; | 14 | import { common } from '@kit.AbilityKit'; |
| 15 | +import { PageRepository } from '../repository/PageRepository'; | ||
| 15 | 16 | ||
| 16 | const TAG: string = 'SpacialTopicPageComponent' | 17 | const TAG: string = 'SpacialTopicPageComponent' |
| 17 | 18 | ||
| @@ -59,7 +60,6 @@ export struct SpacialTopicPageComponent { | @@ -59,7 +60,6 @@ export struct SpacialTopicPageComponent { | ||
| 59 | 60 | ||
| 60 | private async getDetail() { | 61 | private async getDetail() { |
| 61 | this.isNetConnected = NetworkUtil.isNetConnected() | 62 | this.isNetConnected = NetworkUtil.isNetConnected() |
| 62 | - | ||
| 63 | let contentId: string = '' | 63 | let contentId: string = '' |
| 64 | let relId: string = '' | 64 | let relId: string = '' |
| 65 | let relType: string = '' | 65 | let relType: string = '' |
| @@ -74,23 +74,31 @@ export struct SpacialTopicPageComponent { | @@ -74,23 +74,31 @@ export struct SpacialTopicPageComponent { | ||
| 74 | if (this.action.params.extra.relType) { | 74 | if (this.action.params.extra.relType) { |
| 75 | relType = this.action.params.extra.relType | 75 | relType = this.action.params.extra.relType |
| 76 | } | 76 | } |
| 77 | - | ||
| 78 | } | 77 | } |
| 79 | - let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType) | ||
| 80 | - if (detailBeans && detailBeans.length > 0) { | ||
| 81 | - this.contentDetailData = detailBeans[0]; | ||
| 82 | - this.viewBlogInsightIntentShare() | ||
| 83 | - // if (this.contentDetailData[0]?.openComment) { | ||
| 84 | - this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '') | ||
| 85 | - this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '') | ||
| 86 | - this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle | ||
| 87 | - this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '') | ||
| 88 | - this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '') | ||
| 89 | - this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '') | ||
| 90 | - this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '') | ||
| 91 | - this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '') | ||
| 92 | - // } | ||
| 93 | - this.trySendData2H5() | 78 | + let pageId = this.action.params.extra?.pageId |
| 79 | + console.log('pageIdpageId',pageId) | ||
| 80 | + if(pageId){ | ||
| 81 | + let pageInfoMsg = await PageRepository.fetchMorningEveningPageInfo(pageId) | ||
| 82 | + let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType) | ||
| 83 | + if (detailBeans?.length > 0) { | ||
| 84 | + this.contentDetailData = JSON.parse(JSON.stringify(detailBeans[0])); | ||
| 85 | + this.viewBlogInsightIntentShare() | ||
| 86 | + // if (this.contentDetailData[0]?.openComment) { | ||
| 87 | + this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '') | ||
| 88 | + this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '') | ||
| 89 | + this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle | ||
| 90 | + this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '') | ||
| 91 | + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '') | ||
| 92 | + this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '') | ||
| 93 | + this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '') | ||
| 94 | + this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '') | ||
| 95 | + // } | ||
| 96 | + this.trySendData2H5() | ||
| 97 | + } | ||
| 98 | + if(pageInfoMsg && pageInfoMsg.data){ | ||
| 99 | + this.contentDetailData.openComment = Number(pageInfoMsg.data.topicInfo.commentFlag) | ||
| 100 | + this.contentDetailData.commentDisplay = Number(pageInfoMsg.data.topicInfo.commentShowFlag) | ||
| 101 | + } | ||
| 94 | } | 102 | } |
| 95 | } | 103 | } |
| 96 | } | 104 | } |
| @@ -14,6 +14,8 @@ import font from '@ohos.font'; | @@ -14,6 +14,8 @@ import font from '@ohos.font'; | ||
| 14 | export struct CardMediaInfo { | 14 | export struct CardMediaInfo { |
| 15 | 15 | ||
| 16 | @State livePeopleNum :boolean = true | 16 | @State livePeopleNum :boolean = true |
| 17 | + //@ObjectLink compDTO: CompDTO | ||
| 18 | + @State beused: string = ''; // 2024-05-28 给CardMediaInfo组件添加beused的字段让其知道被哪个组件使用,不传默认为空 | ||
| 17 | @State contentDTO: ContentDTO = new ContentDTO() // 如果有duraion,代表点播,显示时长;如果不传或者传0,显示直播中 | 19 | @State contentDTO: ContentDTO = new ContentDTO() // 如果有duraion,代表点播,显示时长;如果不传或者传0,显示直播中 |
| 18 | @State joinPeopleNum: number = 0; | 20 | @State joinPeopleNum: number = 0; |
| 19 | // objectType 0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频, | 21 | // objectType 0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频, |
| @@ -154,12 +156,17 @@ export struct CardMediaInfo { | @@ -154,12 +156,17 @@ export struct CardMediaInfo { | ||
| 154 | } | 156 | } |
| 155 | 157 | ||
| 156 | } | 158 | } |
| 157 | - if (!!this.joinPeopleNum) { | ||
| 158 | - Text(' | ') | ||
| 159 | - .mediaText() | ||
| 160 | - Text(`${this.handlerNum(this.joinPeopleNum.toString())}人参加`) | ||
| 161 | - .mediaText() | ||
| 162 | - } | 159 | + // 备注直播间观看人数在轮播图卡不显示 |
| 160 | + if(this.beused !== 'Zh_Carousel_Layout_01'){ | ||
| 161 | + if (!!this.joinPeopleNum) { | ||
| 162 | + Text(' | ') | ||
| 163 | + .mediaText() | ||
| 164 | + Text(`${this.handlerNum(this.joinPeopleNum.toString())}人参加`) | ||
| 165 | + .mediaText() | ||
| 166 | + } | ||
| 167 | + } | ||
| 168 | + | ||
| 169 | + | ||
| 163 | // } else if (this.contentDTO?.liveInfo?.liveState === 'end' && this.contentDTO?.liveInfo | 170 | // } else if (this.contentDTO?.liveInfo?.liveState === 'end' && this.contentDTO?.liveInfo |
| 164 | // ?.replayUri) { | 171 | // ?.replayUri) { |
| 165 | // // Image($r('app.media.card_live')) | 172 | // // Image($r('app.media.card_live')) |
| @@ -77,15 +77,8 @@ export struct Card10Component { | @@ -77,15 +77,8 @@ export struct Card10Component { | ||
| 77 | InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName) | 77 | InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName) |
| 78 | ProcessUtils.processPage(this.contentDTO) | 78 | ProcessUtils.processPage(this.contentDTO) |
| 79 | }) | 79 | }) |
| 80 | - if(this.contentDTO.objectType == '5'){ | ||
| 81 | - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center).margin({ left: 5, bottom: 5 }) | ||
| 82 | - } else { | ||
| 83 | - if (this.contentDTO.seoTags) { | ||
| 84 | - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) | ||
| 85 | - } | ||
| 86 | - if (this.contentDTO.newTags) { | ||
| 87 | - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) | ||
| 88 | - } | 80 | + if (this.contentDTO.objectType == '5') { |
| 81 | + Notes({ objectType: 5 }).margin({ left: 5, bottom: 5 }) | ||
| 89 | } | 82 | } |
| 90 | }.alignContent(Alignment.BottomStart) | 83 | }.alignContent(Alignment.BottomStart) |
| 91 | 84 | ||
| @@ -135,15 +128,8 @@ export struct Card10Component { | @@ -135,15 +128,8 @@ export struct Card10Component { | ||
| 135 | Row() { | 128 | Row() { |
| 136 | Column() { | 129 | Column() { |
| 137 | Stack() { | 130 | Stack() { |
| 138 | - if(this.contentDTO.objectType == '5'){ | ||
| 139 | - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) | ||
| 140 | - } else { | ||
| 141 | - if (this.contentDTO.seoTags) { | ||
| 142 | - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) | ||
| 143 | - } | ||
| 144 | - if (this.contentDTO.newTags) { | ||
| 145 | - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) | ||
| 146 | - } | 131 | + if (item.objectType == '5') { |
| 132 | + Notes({ objectType: 5 }) | ||
| 147 | } | 133 | } |
| 148 | Text(item.newsTitle) | 134 | Text(item.newsTitle) |
| 149 | .fontSize($r('app.float.font_size_17')) | 135 | .fontSize($r('app.float.font_size_17')) |
| @@ -151,12 +137,10 @@ export struct Card10Component { | @@ -151,12 +137,10 @@ export struct Card10Component { | ||
| 151 | .fontColor($r('app.color.color_222222')) | 137 | .fontColor($r('app.color.color_222222')) |
| 152 | .maxLines(2) | 138 | .maxLines(2) |
| 153 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 139 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 154 | - .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 && | ||
| 155 | - (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 : | ||
| 156 | - ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 : | ||
| 157 | - 0 ) | 140 | + .textIndent(item.objectType == '5' ? 38 : 0) |
| 158 | }.alignContent(Alignment.TopStart) | 141 | }.alignContent(Alignment.TopStart) |
| 159 | 142 | ||
| 143 | + Blank() | ||
| 160 | //bottom 评论等信息 | 144 | //bottom 评论等信息 |
| 161 | CardSourceInfo( | 145 | CardSourceInfo( |
| 162 | { | 146 | { |
| @@ -166,6 +150,7 @@ export struct Card10Component { | @@ -166,6 +150,7 @@ export struct Card10Component { | ||
| 166 | ) | 150 | ) |
| 167 | } | 151 | } |
| 168 | .layoutWeight(1) | 152 | .layoutWeight(1) |
| 153 | + .height(78) | ||
| 169 | .alignItems(HorizontalAlign.Start) | 154 | .alignItems(HorizontalAlign.Start) |
| 170 | 155 | ||
| 171 | // 右侧图片 | 156 | // 右侧图片 |
| @@ -183,6 +168,7 @@ export struct Card10Component { | @@ -183,6 +168,7 @@ export struct Card10Component { | ||
| 183 | }) | 168 | }) |
| 184 | } | 169 | } |
| 185 | .alignContent(Alignment.BottomEnd) | 170 | .alignContent(Alignment.BottomEnd) |
| 171 | + .height(78) | ||
| 186 | } | 172 | } |
| 187 | } | 173 | } |
| 188 | .padding({ top: 10, bottom: 10 }) | 174 | .padding({ top: 10, bottom: 10 }) |
| @@ -39,13 +39,13 @@ export struct Card11Component { | @@ -39,13 +39,13 @@ export struct Card11Component { | ||
| 39 | Column() { | 39 | Column() { |
| 40 | Stack() { | 40 | Stack() { |
| 41 | if(this.contentDTO.objectType == '5'){ | 41 | if(this.contentDTO.objectType == '5'){ |
| 42 | - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) | 42 | + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center) |
| 43 | } else { | 43 | } else { |
| 44 | if (this.contentDTO.seoTags) { | 44 | if (this.contentDTO.seoTags) { |
| 45 | - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) | 45 | + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center) |
| 46 | } | 46 | } |
| 47 | if (this.contentDTO.newTags) { | 47 | if (this.contentDTO.newTags) { |
| 48 | - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) | 48 | + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center) |
| 49 | } | 49 | } |
| 50 | } | 50 | } |
| 51 | Text() { | 51 | Text() { |
| @@ -61,13 +61,13 @@ export struct Card2Component { | @@ -61,13 +61,13 @@ export struct Card2Component { | ||
| 61 | // } | 61 | // } |
| 62 | // } | 62 | // } |
| 63 | if(this.contentDTO.objectType == '5'){ | 63 | if(this.contentDTO.objectType == '5'){ |
| 64 | - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) | 64 | + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center) |
| 65 | } else { | 65 | } else { |
| 66 | if (this.contentDTO.seoTags) { | 66 | if (this.contentDTO.seoTags) { |
| 67 | - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) | 67 | + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center) |
| 68 | } | 68 | } |
| 69 | if (this.contentDTO.newTags) { | 69 | if (this.contentDTO.newTags) { |
| 70 | - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) | 70 | + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center) |
| 71 | } | 71 | } |
| 72 | } | 72 | } |
| 73 | //新闻标题 | 73 | //新闻标题 |
| @@ -42,13 +42,13 @@ export struct Card3Component { | @@ -42,13 +42,13 @@ export struct Card3Component { | ||
| 42 | // Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center) | 42 | // Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center) |
| 43 | // } | 43 | // } |
| 44 | if(this.contentDTO.objectType == '5'){ | 44 | if(this.contentDTO.objectType == '5'){ |
| 45 | - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) | 45 | + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center) |
| 46 | } else { | 46 | } else { |
| 47 | if (this.contentDTO.seoTags) { | 47 | if (this.contentDTO.seoTags) { |
| 48 | - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) | 48 | + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center) |
| 49 | } | 49 | } |
| 50 | if (this.contentDTO.newTags) { | 50 | if (this.contentDTO.newTags) { |
| 51 | - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) | 51 | + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center) |
| 52 | } | 52 | } |
| 53 | } | 53 | } |
| 54 | Text() { | 54 | Text() { |
| @@ -58,13 +58,13 @@ export struct Card5Component { | @@ -58,13 +58,13 @@ export struct Card5Component { | ||
| 58 | Row() { | 58 | Row() { |
| 59 | Stack() { | 59 | Stack() { |
| 60 | if(this.contentDTO.objectType == '5'){ | 60 | if(this.contentDTO.objectType == '5'){ |
| 61 | - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) | 61 | + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center) |
| 62 | } else { | 62 | } else { |
| 63 | if (this.contentDTO.seoTags) { | 63 | if (this.contentDTO.seoTags) { |
| 64 | - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) | 64 | + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center) |
| 65 | } | 65 | } |
| 66 | if (this.contentDTO.newTags) { | 66 | if (this.contentDTO.newTags) { |
| 67 | - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) | 67 | + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center) |
| 68 | } | 68 | } |
| 69 | } | 69 | } |
| 70 | 70 |
| @@ -53,17 +53,16 @@ export struct Card6Component { | @@ -53,17 +53,16 @@ export struct Card6Component { | ||
| 53 | // } | 53 | // } |
| 54 | Stack() { | 54 | Stack() { |
| 55 | if(this.contentDTO.objectType == '5'){ | 55 | if(this.contentDTO.objectType == '5'){ |
| 56 | - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) | 56 | + Notes({ objectType: this.contentDTO.objectType }).height(28).align(Alignment.Center) |
| 57 | } else { | 57 | } else { |
| 58 | if (this.contentDTO.seoTags) { | 58 | if (this.contentDTO.seoTags) { |
| 59 | - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) | 59 | + Notes({ newTags: this.contentDTO.seoTags }).height(28).align(Alignment.Center) |
| 60 | } | 60 | } |
| 61 | if (this.contentDTO.newTags) { | 61 | if (this.contentDTO.newTags) { |
| 62 | - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) | 62 | + Notes({ newTags: this.contentDTO.newTags }).height(28).align(Alignment.Center) |
| 63 | } | 63 | } |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | - | ||
| 67 | Text() { | 66 | Text() { |
| 68 | if (this.titleMarked) { | 67 | if (this.titleMarked) { |
| 69 | ForEach(this.textArr, (textItem: textItem) => { | 68 | ForEach(this.textArr, (textItem: textItem) => { |
| @@ -89,14 +89,14 @@ export struct Card9Component { | @@ -89,14 +89,14 @@ export struct Card9Component { | ||
| 89 | topRight: $r('app.float.image_border_radius') | 89 | topRight: $r('app.float.image_border_radius') |
| 90 | }) | 90 | }) |
| 91 | if(this.contentDTO.objectType == '5'){ | 91 | if(this.contentDTO.objectType == '5'){ |
| 92 | - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) | 92 | + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center) |
| 93 | .margin({ left: 5, bottom: 5 }) | 93 | .margin({ left: 5, bottom: 5 }) |
| 94 | } else { | 94 | } else { |
| 95 | if (this.contentDTO.seoTags) { | 95 | if (this.contentDTO.seoTags) { |
| 96 | - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) | 96 | + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center) |
| 97 | } | 97 | } |
| 98 | if (this.contentDTO.newTags) { | 98 | if (this.contentDTO.newTags) { |
| 99 | - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) | 99 | + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center) |
| 100 | } | 100 | } |
| 101 | } | 101 | } |
| 102 | 102 |
| @@ -7,6 +7,7 @@ import MinePageDatasModel from '../../model/MinePageDatasModel'; | @@ -7,6 +7,7 @@ import MinePageDatasModel from '../../model/MinePageDatasModel'; | ||
| 7 | import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'; | 7 | import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'; |
| 8 | import { SearchDescription } from '../../viewmodel/SearchResultContentItem'; | 8 | import { SearchDescription } from '../../viewmodel/SearchResultContentItem'; |
| 9 | import { CardParser } from '../CardParser' | 9 | import { CardParser } from '../CardParser' |
| 10 | +import { Card9Component } from './Card9Component'; | ||
| 10 | 11 | ||
| 11 | const TAG: string = 'More_Comp'; | 12 | const TAG: string = 'More_Comp'; |
| 12 | 13 | ||
| @@ -23,7 +24,11 @@ export struct MoreComponent { | @@ -23,7 +24,11 @@ export struct MoreComponent { | ||
| 23 | build() { | 24 | build() { |
| 24 | if (this.showDetail) { | 25 | if (this.showDetail) { |
| 25 | ForEach(this.contentDTO.sameContentList, (item: ContentDTO, index: number) => { | 26 | ForEach(this.contentDTO.sameContentList, (item: ContentDTO, index: number) => { |
| 26 | - CardParser({compDTO:new CompDTO, contentDTO: item }) | 27 | + if (item.appStyle !== "9") { |
| 28 | + CardParser({compDTO:new CompDTO, contentDTO: item }) | ||
| 29 | + } else { | ||
| 30 | + Card9Component({ compDTO: new CompDTO, contentDTO:item, pageId: "", pageName: "" }) | ||
| 31 | + } | ||
| 27 | }) | 32 | }) |
| 28 | } else { | 33 | } else { |
| 29 | Column() { | 34 | Column() { |
| @@ -204,7 +204,8 @@ struct CarouselLayout01CardView { | @@ -204,7 +204,8 @@ struct CarouselLayout01CardView { | ||
| 204 | Column() { | 204 | Column() { |
| 205 | // 这里用于展示轮播图右上角信息,这里只对直播类型的展示 | 205 | // 这里用于展示轮播图右上角信息,这里只对直播类型的展示 |
| 206 | if (this.item.objectType === '2' || this.item.objectType === '4') { | 206 | if (this.item.objectType === '2' || this.item.objectType === '4') { |
| 207 | - CardMediaInfo({ contentDTO: this.item,livePeopleNum:false }) | 207 | + // 2024-05-28 给CardMediaInfo组件添加beused的字段让其知道被哪个组件使用,不传默认为空 |
| 208 | + CardMediaInfo({ contentDTO: this.item,livePeopleNum:false ,beused:'Zh_Carousel_Layout_01'}) | ||
| 208 | .width(CommonConstants.FULL_PARENT) | 209 | .width(CommonConstants.FULL_PARENT) |
| 209 | } | 210 | } |
| 210 | Blank() | 211 | Blank() |
| @@ -16,7 +16,7 @@ export default struct MinePagePersonFunctionUI { | @@ -16,7 +16,7 @@ export default struct MinePagePersonFunctionUI { | ||
| 16 | Grid(){ | 16 | Grid(){ |
| 17 | ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{ | 17 | ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{ |
| 18 | GridItem(){ | 18 | GridItem(){ |
| 19 | - PagePersonFunction({ item: item, noDivider : (index % 4 < 3 && index != this.personalData.length-1) ? false : true}) | 19 | + PagePersonFunction({ item: item, noDivider : (index % 5 < 4 && index != this.personalData.length-1) ? false : true}) |
| 20 | }.onClick(()=>{ | 20 | }.onClick(()=>{ |
| 21 | console.log(index+"") | 21 | console.log(index+"") |
| 22 | switch (item.msg){ | 22 | switch (item.msg){ |
| @@ -77,14 +77,14 @@ export default struct MinePagePersonFunctionUI { | @@ -77,14 +77,14 @@ export default struct MinePagePersonFunctionUI { | ||
| 77 | break; | 77 | break; |
| 78 | } | 78 | } |
| 79 | } | 79 | } |
| 80 | - }).width('169lpx') | 80 | + }).width('142lpx') |
| 81 | .height('117lpx') | 81 | .height('117lpx') |
| 82 | }) | 82 | }) |
| 83 | } | 83 | } |
| 84 | - .rowsTemplate('1fr 1fr') | ||
| 85 | - .columnsTemplate('1fr 1fr 1fr 1fr') | ||
| 86 | - .height('234lpx') | ||
| 87 | - .margin({top:'31lpx',left:'23lpx',right:'23lpx' }) | 84 | + .rowsTemplate('1fr') |
| 85 | + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') | ||
| 86 | + .height('117lpx') | ||
| 87 | + .margin({top:'31lpx'}) | ||
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | messageClick(){ | 90 | messageClick(){ |
| @@ -542,11 +542,19 @@ export struct PaperSingleColumn999CardView { | @@ -542,11 +542,19 @@ export struct PaperSingleColumn999CardView { | ||
| 542 | if (this.item) { | 542 | if (this.item) { |
| 543 | Row() { | 543 | Row() { |
| 544 | Row() { | 544 | Row() { |
| 545 | + | ||
| 546 | + if (this.item.corner.length > 0){ | ||
| 547 | + Text(this.item.corner) | ||
| 548 | + .fontSize(12) | ||
| 549 | + .fontColor('#ED2800') | ||
| 550 | + .margin({ left: 16 }) | ||
| 551 | + } | ||
| 552 | + | ||
| 545 | if (this.buildSourceString().length > 0) { | 553 | if (this.buildSourceString().length > 0) { |
| 546 | Text(this.buildSourceString()) | 554 | Text(this.buildSourceString()) |
| 547 | .fontSize(12) | 555 | .fontSize(12) |
| 548 | .fontColor('#B0B0B0') | 556 | .fontColor('#B0B0B0') |
| 549 | - .margin({ left: 16 }) | 557 | + .margin({ left: this.item.corner.length > 0?10:16 }) |
| 550 | 558 | ||
| 551 | ///不显示时间或者不显示评论 | 559 | ///不显示时间或者不显示评论 |
| 552 | if (this.getPublishTime().length > 0 || this.item.objectType != '2' && this.interactData && this.interactData.commentNum && Number(this.interactData.commentNum) > 0) { | 560 | if (this.getPublishTime().length > 0 || this.item.objectType != '2' && this.interactData && this.interactData.commentNum && Number(this.interactData.commentNum) > 0) { |
| @@ -114,6 +114,7 @@ struct MyCollectionListPage { | @@ -114,6 +114,7 @@ struct MyCollectionListPage { | ||
| 114 | .height(CommonConstants.FULL_HEIGHT) | 114 | .height(CommonConstants.FULL_HEIGHT) |
| 115 | } | 115 | } |
| 116 | } | 116 | } |
| 117 | + .backgroundColor('#FFFFFF') | ||
| 117 | .width(CommonConstants.FULL_WIDTH) | 118 | .width(CommonConstants.FULL_WIDTH) |
| 118 | .height(CommonConstants.FULL_HEIGHT) | 119 | .height(CommonConstants.FULL_HEIGHT) |
| 119 | } | 120 | } |
| @@ -43,7 +43,8 @@ export struct SearchComponent { | @@ -43,7 +43,8 @@ export struct SearchComponent { | ||
| 43 | this.getSearchHistoryData() | 43 | this.getSearchHistoryData() |
| 44 | 44 | ||
| 45 | let intervalID = setInterval(() => { | 45 | let intervalID = setInterval(() => { |
| 46 | - sendEventByKey("searchId", 10, "") | 46 | + // sendEventByKey("searchId", 10, "") //这个报错 暂时替换下面这个 |
| 47 | + focusControl.requestFocus('searchId') | ||
| 47 | clearInterval(intervalID); | 48 | clearInterval(intervalID); |
| 48 | }, 1000); | 49 | }, 1000); |
| 49 | } | 50 | } |
| @@ -180,6 +181,11 @@ export struct SearchComponent { | @@ -180,6 +181,11 @@ export struct SearchComponent { | ||
| 180 | trackSearchClick(this.fromTabName,content) | 181 | trackSearchClick(this.fromTabName,content) |
| 181 | //赋值 | 182 | //赋值 |
| 182 | this.searchText = content | 183 | this.searchText = content |
| 184 | + | ||
| 185 | + if(StringUtils.isNotEmpty(this.searchText)){ | ||
| 186 | + this.hasInputContent = true | ||
| 187 | + } | ||
| 188 | + | ||
| 183 | //保存搜索记录 | 189 | //保存搜索记录 |
| 184 | SearcherAboutDataModel.putSearchHistoryData(this.searchText) | 190 | SearcherAboutDataModel.putSearchHistoryData(this.searchText) |
| 185 | //获取搜索记录 | 191 | //获取搜索记录 |
| @@ -10,7 +10,7 @@ import { | @@ -10,7 +10,7 @@ import { | ||
| 10 | } from 'wdBean/Index' | 10 | } from 'wdBean/Index' |
| 11 | import { LiveInfoDTO } from 'wdBean/src/main/ets/bean/detail/LiveInfoDTO' | 11 | import { LiveInfoDTO } from 'wdBean/src/main/ets/bean/detail/LiveInfoDTO' |
| 12 | import { VoiceInfoDTO } from 'wdBean/src/main/ets/bean/detail/VoiceInfoDTO' | 12 | import { VoiceInfoDTO } from 'wdBean/src/main/ets/bean/detail/VoiceInfoDTO' |
| 13 | -import { LazyDataSource, Logger, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index' | 13 | +import { LazyDataSource, StringUtils, UserDataLocal } from 'wdKit/Index' |
| 14 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' | 14 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' |
| 15 | import MinePageDatasModel from '../../model/MinePageDatasModel' | 15 | import MinePageDatasModel from '../../model/MinePageDatasModel' |
| 16 | import SearcherAboutDataModel from '../../model/SearcherAboutDataModel' | 16 | import SearcherAboutDataModel from '../../model/SearcherAboutDataModel' |
| @@ -21,7 +21,6 @@ import { FollowListStatusRequestItem } from '../../viewmodel/FollowListStatusReq | @@ -21,7 +21,6 @@ import { FollowListStatusRequestItem } from '../../viewmodel/FollowListStatusReq | ||
| 21 | import { QueryListIsFollowedItem } from '../../viewmodel/QueryListIsFollowedItem' | 21 | import { QueryListIsFollowedItem } from '../../viewmodel/QueryListIsFollowedItem' |
| 22 | import { SearchResultContentData } from '../../viewmodel/SearchResultContentData' | 22 | import { SearchResultContentData } from '../../viewmodel/SearchResultContentData' |
| 23 | import { | 23 | import { |
| 24 | - SearchDescription, | ||
| 25 | SearchResultContentItem, SearchRmhDescription } from '../../viewmodel/SearchResultContentItem' | 24 | SearchResultContentItem, SearchRmhDescription } from '../../viewmodel/SearchResultContentItem' |
| 26 | import { CardParser } from '../CardParser' | 25 | import { CardParser } from '../CardParser' |
| 27 | import { FollowChildComponent } from '../mine/follow/FollowChildComponent' | 26 | import { FollowChildComponent } from '../mine/follow/FollowChildComponent' |
| @@ -30,6 +29,7 @@ import { ActivityItemComponent } from './ActivityItemComponent' | @@ -30,6 +29,7 @@ import { ActivityItemComponent } from './ActivityItemComponent' | ||
| 30 | import { SearchCreatorComponent } from './SearchCreatorComponent' | 29 | import { SearchCreatorComponent } from './SearchCreatorComponent' |
| 31 | import { JSON } from '@kit.ArkTS' | 30 | import { JSON } from '@kit.ArkTS' |
| 32 | import { MoreComponent } from '../cardview/MoreComponent' | 31 | import { MoreComponent } from '../cardview/MoreComponent' |
| 32 | +import { Card9Component } from '../cardview/Card9Component' | ||
| 33 | 33 | ||
| 34 | const TAG = "SearchResultContentComponent" | 34 | const TAG = "SearchResultContentComponent" |
| 35 | 35 | ||
| @@ -264,6 +264,11 @@ export struct SearchResultContentComponent { | @@ -264,6 +264,11 @@ export struct SearchResultContentComponent { | ||
| 264 | ActivityItemComponent({ contentDTO: item }) | 264 | ActivityItemComponent({ contentDTO: item }) |
| 265 | }else if(item.sameContentListSize > 0){ | 265 | }else if(item.sameContentListSize > 0){ |
| 266 | MoreComponent({ contentDTO: item }) | 266 | MoreComponent({ contentDTO: item }) |
| 267 | + }else if(item.appStyle == "9"){ | ||
| 268 | + Column(){ | ||
| 269 | + Card9Component({ compDTO: new CompDTO, contentDTO:item, pageId: "", pageName: "" }) | ||
| 270 | + Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | ||
| 271 | + } | ||
| 267 | } else { | 272 | } else { |
| 268 | CardParser({compDTO:new CompDTO, contentDTO: item }) | 273 | CardParser({compDTO:new CompDTO, contentDTO: item }) |
| 269 | } | 274 | } |
| @@ -459,7 +464,7 @@ export struct SearchResultContentComponent { | @@ -459,7 +464,7 @@ export struct SearchResultContentComponent { | ||
| 459 | contentDTO.tagWord = -1 | 464 | contentDTO.tagWord = -1 |
| 460 | contentDTO.isSelect = true | 465 | contentDTO.isSelect = true |
| 461 | contentDTO.rmhInfo = {} as RmhInfoDTO | 466 | contentDTO.rmhInfo = {} as RmhInfoDTO |
| 462 | - contentDTO.photoNum = -1 | 467 | + contentDTO.photoNum = StringUtils.isEmpty(value.data.picCount) ? 0 : Number(value.data.picCount) |
| 463 | contentDTO.liveInfo = {} as LiveInfoDTO; | 468 | contentDTO.liveInfo = {} as LiveInfoDTO; |
| 464 | contentDTO.videoInfo = { | 469 | contentDTO.videoInfo = { |
| 465 | videoDuration: Number.parseInt(value.data.duration) | 470 | videoDuration: Number.parseInt(value.data.duration) |
| @@ -482,7 +487,7 @@ export struct SearchResultContentComponent { | @@ -482,7 +487,7 @@ export struct SearchResultContentComponent { | ||
| 482 | contentDTO.bottomNavId = ''; | 487 | contentDTO.bottomNavId = ''; |
| 483 | contentDTO.openType = ''; | 488 | contentDTO.openType = ''; |
| 484 | contentDTO.extra = ''; | 489 | contentDTO.extra = ''; |
| 485 | - contentDTO.titleShow = value.data.type == "5" ? 1 : 0; | 490 | + contentDTO.titleShow = value.data.titleShow == "1" ? 0 : 1 |
| 486 | contentDTO.rmhInfo = rmhInfo | 491 | contentDTO.rmhInfo = rmhInfo |
| 487 | contentDTO.shareFlag = value.data.shareFlag | 492 | contentDTO.shareFlag = value.data.shareFlag |
| 488 | contentDTO.contentText = value.data.contentText | 493 | contentDTO.contentText = value.data.contentText |
| @@ -49,7 +49,7 @@ export struct LikeComponent { | @@ -49,7 +49,7 @@ export struct LikeComponent { | ||
| 49 | // 2:竖屏直播页 3:图集 4:横屏直播页 | 49 | // 2:竖屏直播页 3:图集 4:横屏直播页 |
| 50 | if(this.pageComponentType == 2 || this.pageComponentType == 4) { | 50 | if(this.pageComponentType == 2 || this.pageComponentType == 4) { |
| 51 | // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福 | 51 | // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福 |
| 52 | - this.likesStyle = this.contentDetailData?.liveInfo?.likesStyle | 52 | + this.likesStyle = String(this.contentDetailData?.liveInfo?.likesStyle) |
| 53 | this.openLikes = this.contentDetailData?.liveInfo?.likeEnable == 1 ? true : false | 53 | this.openLikes = this.contentDetailData?.liveInfo?.likeEnable == 1 ? true : false |
| 54 | } else { | 54 | } else { |
| 55 | // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 | 55 | // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 |
| 1 | -import { ToastUtils, Logger, NumberFormatterUtils, SPHelper } from 'wdKit'; | 1 | +import { NumberFormatterUtils, SPHelper } from 'wdKit'; |
| 2 | import promptAction from '@ohos.promptAction'; | 2 | import promptAction from '@ohos.promptAction'; |
| 3 | import { | 3 | import { |
| 4 | - InputMethodProperty, | ||
| 5 | - batchLikeAndCollectResult, | ||
| 6 | batchLikeAndCollectParams, | 4 | batchLikeAndCollectParams, |
| 5 | + batchLikeAndCollectResult, | ||
| 7 | ContentDetailDTO, | 6 | ContentDetailDTO, |
| 8 | - postExecuteLikeParams, | ||
| 9 | contentListParams, | 7 | contentListParams, |
| 10 | InteractDataDTO, | 8 | InteractDataDTO, |
| 11 | postExecuteCollectRecordParams | 9 | postExecuteCollectRecordParams |
| @@ -13,16 +11,15 @@ import { | @@ -13,16 +11,15 @@ import { | ||
| 13 | import router from '@ohos.router'; | 11 | import router from '@ohos.router'; |
| 14 | import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel'; | 12 | import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel'; |
| 15 | import { LikeComponent } from './LikeComponent'; | 13 | import { LikeComponent } from './LikeComponent'; |
| 16 | -import { CommentTabComponent, CommentIconComponent, } from '../comment/view/CommentTabComponent'; | ||
| 17 | -import { publishCommentModel } from '../comment/model/PublishCommentModel' | ||
| 18 | -import { HttpUrlUtils } from 'wdNetwork/Index'; | 14 | +import { CommentIconComponent, CommentTabComponent, } from '../comment/view/CommentTabComponent'; |
| 15 | +import { publishCommentModel } from '../comment/model/PublishCommentModel'; | ||
| 19 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | 16 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; |
| 20 | import { PageRepository } from '../../repository/PageRepository'; | 17 | import { PageRepository } from '../../repository/PageRepository'; |
| 21 | import { SpConstants } from 'wdConstant/Index'; | 18 | import { SpConstants } from 'wdConstant/Index'; |
| 22 | import { WDShare } from 'wdShare/Index'; | 19 | import { WDShare } from 'wdShare/Index'; |
| 23 | -import { AudioSuspensionModel } from '../../viewmodel/AudioSuspensionModel' | ||
| 24 | -import { EmitterEventId, EmitterUtils } from 'wdKit/Index' | ||
| 25 | -import { PlayerConstants } from 'wdPlayer' | 20 | +import { AudioSuspensionModel } from '../../viewmodel/AudioSuspensionModel'; |
| 21 | +import { EmitterEventId, EmitterUtils } from 'wdKit/Index'; | ||
| 22 | +import { PlayerConstants } from 'wdPlayer'; | ||
| 26 | import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index'; | 23 | import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index'; |
| 27 | 24 | ||
| 28 | const TAG = 'OperRowListView'; | 25 | const TAG = 'OperRowListView'; |
| @@ -830,7 +830,7 @@ class MinePageDatasModel{ | @@ -830,7 +830,7 @@ class MinePageDatasModel{ | ||
| 830 | contentDTO.tagWord = -1 | 830 | contentDTO.tagWord = -1 |
| 831 | contentDTO.isSelect = true | 831 | contentDTO.isSelect = true |
| 832 | contentDTO.rmhInfo = {} as RmhInfoDTO | 832 | contentDTO.rmhInfo = {} as RmhInfoDTO |
| 833 | - contentDTO.photoNum = -1 | 833 | + contentDTO.photoNum = StringUtils.isEmpty(value.picCount) ? 0 : Number(value.picCount) |
| 834 | contentDTO.liveInfo = {} as LiveInfoDTO; | 834 | contentDTO.liveInfo = {} as LiveInfoDTO; |
| 835 | contentDTO.videoInfo = { | 835 | contentDTO.videoInfo = { |
| 836 | videoDuration: Number.parseInt(value.duration) | 836 | videoDuration: Number.parseInt(value.duration) |
| @@ -853,7 +853,7 @@ class MinePageDatasModel{ | @@ -853,7 +853,7 @@ class MinePageDatasModel{ | ||
| 853 | contentDTO.bottomNavId = ''; | 853 | contentDTO.bottomNavId = ''; |
| 854 | contentDTO.openType = ''; | 854 | contentDTO.openType = ''; |
| 855 | contentDTO.extra = ''; | 855 | contentDTO.extra = ''; |
| 856 | - contentDTO.titleShow = value.type == "5" ? 1 : 0; | 856 | + contentDTO.titleShow = value.titleShow == "1" ? 0 : 1 |
| 857 | contentDTO.rmhInfo = rmhInfo | 857 | contentDTO.rmhInfo = rmhInfo |
| 858 | contentDTO.shareFlag = value.shareFlag | 858 | contentDTO.shareFlag = value.shareFlag |
| 859 | contentDTO.contentText = value.contentText | 859 | contentDTO.contentText = value.contentText |
| @@ -62,8 +62,7 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent | @@ -62,8 +62,7 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent | ||
| 62 | commentCount: _item?.interactData?.commentNum || 0, | 62 | commentCount: _item?.interactData?.commentNum || 0, |
| 63 | favorites: _item?.interactData?.collectNum || 0, | 63 | favorites: _item?.interactData?.collectNum || 0, |
| 64 | viewCount: _item?.interactData?.readNum || 0, | 64 | viewCount: _item?.interactData?.readNum || 0, |
| 65 | - rankingHint: 99, | ||
| 66 | - isPublicData: true | 65 | + rankingHint: 99 |
| 67 | } | 66 | } |
| 68 | } | 67 | } |
| 69 | insightIntentArray.push(viewBlogInsightIntentItem) | 68 | insightIntentArray.push(viewBlogInsightIntentItem) |
| @@ -113,8 +112,7 @@ export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext, | @@ -113,8 +112,7 @@ export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext, | ||
| 113 | forwardCount: interactData?.shareNum || 0, | 112 | forwardCount: interactData?.shareNum || 0, |
| 114 | commentCount: interactData?.commentNum || 0, | 113 | commentCount: interactData?.commentNum || 0, |
| 115 | favorites: interactData?.collectNum || 0, | 114 | favorites: interactData?.collectNum || 0, |
| 116 | - rankingHint: 99, | ||
| 117 | - isPublicData: true | 115 | + rankingHint: 99 |
| 118 | } | 116 | } |
| 119 | } | 117 | } |
| 120 | 118 | ||
| @@ -147,8 +145,7 @@ export function viewColumInsightIntentShare(context: common.UIAbilityContext, en | @@ -147,8 +145,7 @@ export function viewColumInsightIntentShare(context: common.UIAbilityContext, en | ||
| 147 | activityType: ['RecentViews'], | 145 | activityType: ['RecentViews'], |
| 148 | columnTitle: pageInfoBean?.topicInfo?.title, | 146 | columnTitle: pageInfoBean?.topicInfo?.title, |
| 149 | columnSubTitle: pageInfoBean?.shareSummary, | 147 | columnSubTitle: pageInfoBean?.shareSummary, |
| 150 | - rankingHint: 99, | ||
| 151 | - isPublicData: true | 148 | + rankingHint: 99 |
| 152 | } | 149 | } |
| 153 | } | 150 | } |
| 154 | console.log('yzl viewColumInsightIntentShare', JSON.stringify(viewColumInsightIntentItem)) | 151 | console.log('yzl viewColumInsightIntentShare', JSON.stringify(viewColumInsightIntentItem)) |
sight_harmony/features/wdComponent/src/main/resources/base/media/AccountOwner_DefaultIcon.png
0 → 100644
4.68 KB
| 1 | -import { Action, ContentDetailDTO, LiveDetailsBean } from 'wdBean/Index'; | 1 | +import { Action, ContentDetailDTO } from 'wdBean/Index'; |
| 2 | import { LiveViewModel } from '../viewModel/LiveViewModel'; | 2 | import { LiveViewModel } from '../viewModel/LiveViewModel'; |
| 3 | import router from '@ohos.router'; | 3 | import router from '@ohos.router'; |
| 4 | 4 | ||
| @@ -10,12 +10,12 @@ import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment | @@ -10,12 +10,12 @@ import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment | ||
| 10 | const TAG = 'DetailPlayLiveCommon' | 10 | const TAG = 'DetailPlayLiveCommon' |
| 11 | 11 | ||
| 12 | /** | 12 | /** |
| 13 | - * @Description: 沉浸式和非沉浸式直播页面 | 13 | + * @Description: 沉浸式和非沉浸式直播页面 |
| 14 | * @Author: | 14 | * @Author: |
| 15 | * @Email: | 15 | * @Email: |
| 16 | * @CreateDate: | 16 | * @CreateDate: |
| 17 | - * @UpdateRemark: 更新说明 | ||
| 18 | - * @Version: 1.0 | 17 | + * @UpdateRemark: 更新说明 |
| 18 | + * @Version: 1.0 | ||
| 19 | */ | 19 | */ |
| 20 | @Entry | 20 | @Entry |
| 21 | @Component | 21 | @Component |
| @@ -31,9 +31,10 @@ export struct DetailPlayLiveCommon { | @@ -31,9 +31,10 @@ export struct DetailPlayLiveCommon { | ||
| 31 | @Provide pageShow: number = -1 | 31 | @Provide pageShow: number = -1 |
| 32 | @Provide pageHide: number = -1 | 32 | @Provide pageHide: number = -1 |
| 33 | @Provide pageBackPress: number = -1 | 33 | @Provide pageBackPress: number = -1 |
| 34 | - @Provide liveDetailsBean: LiveDetailsBean = {} as LiveDetailsBean | ||
| 35 | @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO | 34 | @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO |
| 36 | @Provide publishCommentModel: publishCommentModel = new publishCommentModel() | 35 | @Provide publishCommentModel: publishCommentModel = new publishCommentModel() |
| 36 | + // 横屏或竖屏 general-竖屏,news-横屏 | ||
| 37 | + @State liveLandscape: string = '' | ||
| 37 | 38 | ||
| 38 | async aboutToAppear(): Promise<void> { | 39 | async aboutToAppear(): Promise<void> { |
| 39 | const par: Action = router.getParams() as Action; | 40 | const par: Action = router.getParams() as Action; |
| @@ -48,11 +49,11 @@ export struct DetailPlayLiveCommon { | @@ -48,11 +49,11 @@ export struct DetailPlayLiveCommon { | ||
| 48 | build() { | 49 | build() { |
| 49 | Column() { | 50 | Column() { |
| 50 | // 直播预约或横屏直播统一进横屏直播 | 51 | // 直播预约或横屏直播统一进横屏直播 |
| 51 | - if (this.liveState === 'wait' || this.liveStyle === 0) { | ||
| 52 | - // 非沉浸式 | 52 | + if (this.liveState === 'wait' || this.liveLandscape === 'news') { |
| 53 | + // 非沉浸式直播 | ||
| 53 | DetailPlayLivePage({ contentId: this.contentId, relId: this.relId, relType: this.relType }) | 54 | DetailPlayLivePage({ contentId: this.contentId, relId: this.relId, relType: this.relType }) |
| 54 | - } else if (this.liveStyle === 1) { | ||
| 55 | - // 沉浸式 | 55 | + } else if (this.liveLandscape === 'general') { |
| 56 | + // 沉浸式直播 | ||
| 56 | DetailPlayVLivePage() | 57 | DetailPlayVLivePage() |
| 57 | } | 58 | } |
| 58 | } | 59 | } |
| @@ -70,58 +71,45 @@ export struct DetailPlayLiveCommon { | @@ -70,58 +71,45 @@ export struct DetailPlayLiveCommon { | ||
| 70 | .then((data: Array<ContentDetailDTO>) => { | 71 | .then((data: Array<ContentDetailDTO>) => { |
| 71 | console.log(TAG, '查询视频详情用于评论展示 getContentDetail:', JSON.stringify(data)) | 72 | console.log(TAG, '查询视频详情用于评论展示 getContentDetail:', JSON.stringify(data)) |
| 72 | if (data) { | 73 | if (data) { |
| 73 | - this.contentDetailData = data[0]; | ||
| 74 | - | ||
| 75 | - // if (this.contentDetailData.openComment === 1) { | ||
| 76 | - console.log(TAG, '查询视频详情用于评论展示 openComment:', this.contentDetailData.openComment) | ||
| 77 | - this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '') | ||
| 78 | - this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '') | ||
| 79 | - this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle | ||
| 80 | - this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '') | ||
| 81 | - this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '') | ||
| 82 | - this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '') | ||
| 83 | - this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '') | ||
| 84 | - this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '') | ||
| 85 | - this.publishCommentModel.commentContent = '' | ||
| 86 | 74 | ||
| 87 | - this.getLiveDetails() | ||
| 88 | - // } | ||
| 89 | - } | ||
| 90 | - }) | ||
| 91 | - } | 75 | + let detailData = data[0] |
| 76 | + this.liveLandscape = | ||
| 77 | + detailData?.liveInfo?.liveLandScape //String(this.contentDetailData?.liveInfo?.liveLandScape || '') | ||
| 92 | 78 | ||
| 93 | - /** | ||
| 94 | - * 获取直播信息,可区分横竖屏直播 | ||
| 95 | - */ | ||
| 96 | - getLiveDetails() { | 79 | + this.liveState = detailData.liveInfo?.liveState |
| 97 | 80 | ||
| 98 | - this.liveViewModel.getLiveDetails(this.contentId, this.relId, this.relType) | ||
| 99 | - .then( | ||
| 100 | - (data) => { | ||
| 101 | - if (data.length > 0) { | ||
| 102 | 81 | ||
| 82 | + if (this.liveState === 'wait' || this.liveLandscape === 'news') { | ||
| 83 | + this.contentDetailData = data[0] | ||
| 84 | + } else if (this.liveLandscape === 'general') { | ||
| 103 | //todo 不加setTimeOut ,接口返回的数据 就没法让PlayerComponent #@Consume @Watch('updateData') liveDetailsBean 的updateData方法运行 | 85 | //todo 不加setTimeOut ,接口返回的数据 就没法让PlayerComponent #@Consume @Watch('updateData') liveDetailsBean 的updateData方法运行 |
| 104 | setTimeout(() => { | 86 | setTimeout(() => { |
| 105 | - this.liveDetailsBean = data[0] | 87 | + this.contentDetailData = data[0] |
| 106 | }, 10) | 88 | }, 10) |
| 89 | + } | ||
| 107 | 90 | ||
| 108 | - this.liveState = data[0].liveInfo?.liveState | ||
| 109 | - this.liveStyle = data[0].liveInfo.liveStyle | ||
| 110 | - | ||
| 111 | - if (data[0].fullColumnImgUrls && data[0].fullColumnImgUrls.length > 0) { | ||
| 112 | - this.imgUrl = data[0].fullColumnImgUrls[0].url | ||
| 113 | - } | ||
| 114 | - | ||
| 115 | - if (data[0].liveInfo.liveState == 'end') { | ||
| 116 | - this.playUrl = data[0].liveInfo.vlive[0].replayUri | ||
| 117 | - } | 91 | + console.log(TAG, '查询视频详情用于评论展示 openComment:', detailData.openComment) |
| 92 | + this.publishCommentModel.targetId = String(detailData?.newsId || '') | ||
| 93 | + this.publishCommentModel.targetRelId = String(detailData?.reLInfo?.relId || '') | ||
| 94 | + this.publishCommentModel.targetTitle = detailData?.newsTitle | ||
| 95 | + this.publishCommentModel.targetRelType = String(detailData?.reLInfo?.relType || '') | ||
| 96 | + this.publishCommentModel.targetRelObjectId = String(detailData?.reLInfo?.relObjectId || '') | ||
| 97 | + this.publishCommentModel.keyArticle = String(detailData?.keyArticle || '') | ||
| 98 | + this.publishCommentModel.targetType = String(detailData?.newsType || '') | ||
| 99 | + this.publishCommentModel.visitorComment = String(detailData?.visitorComment || '') | ||
| 100 | + this.publishCommentModel.commentContent = '' | ||
| 101 | + this.liveStyle = detailData.liveInfo?.liveStyle | ||
| 118 | 102 | ||
| 119 | - // console.log(TAG, 'getLiveDetails:', JSON.stringify((this.liveDetailsBean))) | 103 | + if (detailData.fullColumnImgUrls && detailData.fullColumnImgUrls.length > 0) { |
| 104 | + this.imgUrl = detailData.fullColumnImgUrls[0].url | ||
| 120 | } | 105 | } |
| 121 | - }, | ||
| 122 | - () => { | ||
| 123 | 106 | ||
| 124 | - }) | 107 | + if (detailData.liveInfo.liveState == 'end') { |
| 108 | + this.playUrl = detailData.liveInfo.vlive[0].replayUri | ||
| 109 | + } | ||
| 110 | + //console.error('XXXXZZZZ', "liveLandscape =" + this.liveLandscape + ' this.liveState =' + this.liveState) | ||
| 111 | + } | ||
| 112 | + }) | ||
| 125 | } | 113 | } |
| 126 | 114 | ||
| 127 | onPageShow() { | 115 | onPageShow() { |
| 1 | -import { ContentDetailDTO, LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index'; | 1 | +import { ContentDetailDTO, LiveRoomDataBean } from 'wdBean/Index'; |
| 2 | import { LiveViewModel } from '../viewModel/LiveViewModel'; | 2 | import { LiveViewModel } from '../viewModel/LiveViewModel'; |
| 3 | import { TabComponent } from '../widgets/details/TabComponent'; | 3 | import { TabComponent } from '../widgets/details/TabComponent'; |
| 4 | import { TopPlayComponent } from '../widgets/details/video/TopPlayComponet'; | 4 | import { TopPlayComponent } from '../widgets/details/video/TopPlayComponet'; |
| @@ -6,12 +6,9 @@ import { DisplayDirection } from 'wdConstant/Index'; | @@ -6,12 +6,9 @@ import { DisplayDirection } from 'wdConstant/Index'; | ||
| 6 | import mediaquery from '@ohos.mediaquery'; | 6 | import mediaquery from '@ohos.mediaquery'; |
| 7 | import { Logger, WindowModel } from 'wdKit/Index'; | 7 | import { Logger, WindowModel } from 'wdKit/Index'; |
| 8 | import { router, window } from '@kit.ArkUI'; | 8 | import { router, window } from '@kit.ArkUI'; |
| 9 | -import { devicePLSensorManager } from 'wdDetailPlayApi/Index'; | ||
| 10 | -import { LiveCommentComponent } from 'wdComponent/Index'; | ||
| 11 | -import { WDAliPlayerController, WDPlayerController } from 'wdPlayer/Index'; | 9 | +import { WDAliPlayerController } from 'wdPlayer/Index'; |
| 12 | import { OperRowListView } from 'wdComponent/src/main/ets/components/view/OperRowListView'; | 10 | import { OperRowListView } from 'wdComponent/src/main/ets/components/view/OperRowListView'; |
| 13 | import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel'; | 11 | import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel'; |
| 14 | -import { ResponseDTO } from 'wdNetwork/Index'; | ||
| 15 | 12 | ||
| 16 | let TAG: string = 'DetailPlayLivePage'; | 13 | let TAG: string = 'DetailPlayLivePage'; |
| 17 | 14 | ||
| @@ -37,7 +34,6 @@ export struct DetailPlayLivePage { | @@ -37,7 +34,6 @@ export struct DetailPlayLivePage { | ||
| 37 | @Consume @Watch('onBackPressCus') pageBackPress: number | 34 | @Consume @Watch('onBackPressCus') pageBackPress: number |
| 38 | @Consume contentDetailData: ContentDetailDTO | 35 | @Consume contentDetailData: ContentDetailDTO |
| 39 | @Consume publishCommentModel: publishCommentModel | 36 | @Consume publishCommentModel: publishCommentModel |
| 40 | - @Consume liveDetailsBean: LiveDetailsBean | ||
| 41 | 37 | ||
| 42 | aboutToAppear(): void { | 38 | aboutToAppear(): void { |
| 43 | Logger.info(TAG, `wyj-aboutToAppear`) | 39 | Logger.info(TAG, `wyj-aboutToAppear`) |
| @@ -65,11 +61,14 @@ export struct DetailPlayLivePage { | @@ -65,11 +61,14 @@ export struct DetailPlayLivePage { | ||
| 65 | 61 | ||
| 66 | build() { | 62 | build() { |
| 67 | Column() { | 63 | Column() { |
| 64 | + | ||
| 68 | TopPlayComponent({ playerController: this.playerController }) | 65 | TopPlayComponent({ playerController: this.playerController }) |
| 69 | - .height(this.displayDirection == DisplayDirection.VERTICAL ?211:'100%') | 66 | + .height(this.displayDirection == DisplayDirection.VERTICAL ? 211 : '100%') |
| 67 | + | ||
| 70 | TabComponent({ tabs: this.tabs, changeToTab: this.changeToTab }) | 68 | TabComponent({ tabs: this.tabs, changeToTab: this.changeToTab }) |
| 71 | .layoutWeight(1) | 69 | .layoutWeight(1) |
| 72 | .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) | 70 | .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) |
| 71 | + | ||
| 73 | OperRowListView({ | 72 | OperRowListView({ |
| 74 | componentType: 4, | 73 | componentType: 4, |
| 75 | operationButtonList: ['comment', 'collect', 'share', 'like'], | 74 | operationButtonList: ['comment', 'collect', 'share', 'like'], |
| @@ -81,8 +80,7 @@ export struct DetailPlayLivePage { | @@ -81,8 +80,7 @@ export struct DetailPlayLivePage { | ||
| 81 | // 切换到大家聊 | 80 | // 切换到大家聊 |
| 82 | this.changeToTab = Math.random() | 81 | this.changeToTab = Math.random() |
| 83 | } | 82 | } |
| 84 | - }) | ||
| 85 | - .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) | 83 | + }).visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) |
| 86 | 84 | ||
| 87 | // LiveCommentComponent({ heartNum: this.liveRoomDataBean.likeNum }) | 85 | // LiveCommentComponent({ heartNum: this.liveRoomDataBean.likeNum }) |
| 88 | // .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) | 86 | // .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) |
| @@ -120,7 +118,9 @@ export struct DetailPlayLivePage { | @@ -120,7 +118,9 @@ export struct DetailPlayLivePage { | ||
| 120 | } | 118 | } |
| 121 | 119 | ||
| 122 | getLiveDetails() { | 120 | getLiveDetails() { |
| 123 | - const data = this.liveDetailsBean | 121 | + const data = this.contentDetailData |
| 122 | + console.error("XXXXZZZZ", 'contentDetailData ----liveState==>' + data.liveInfo?.liveState) | ||
| 123 | + console.error("XXXXZZZZ", 'contentDetailData ----liveStyle==>' + data.liveInfo?.liveStyle) | ||
| 124 | if (data.liveInfo?.liveState == 'wait') { | 124 | if (data.liveInfo?.liveState == 'wait') { |
| 125 | //直播样式 0-正常模式 , 1-隐藏直播间,2-隐藏大家聊 【人民号发布是竖屏的,为空】 | 125 | //直播样式 0-正常模式 , 1-隐藏直播间,2-隐藏大家聊 【人民号发布是竖屏的,为空】 |
| 126 | if (data.liveInfo?.liveStyle == 1) { | 126 | if (data.liveInfo?.liveStyle == 1) { |
| @@ -131,7 +131,13 @@ export struct DetailPlayLivePage { | @@ -131,7 +131,13 @@ export struct DetailPlayLivePage { | ||
| 131 | this.tabs = ['简介', '直播间', '大家聊'] | 131 | this.tabs = ['简介', '直播间', '大家聊'] |
| 132 | } | 132 | } |
| 133 | } else { | 133 | } else { |
| 134 | - this.tabs = ['直播间', '大家聊'] | 134 | + if (data.liveInfo?.liveStyle == 1) { |
| 135 | + this.tabs = ['大家聊'] | ||
| 136 | + } else if (data.liveInfo?.liveStyle == 2) { | ||
| 137 | + this.tabs = ['直播间',] | ||
| 138 | + } else { | ||
| 139 | + this.tabs = ['直播间', '大家聊'] | ||
| 140 | + } | ||
| 135 | } | 141 | } |
| 136 | 142 | ||
| 137 | } | 143 | } |
| 1 | -import { Action, LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index'; | 1 | +import { LiveRoomDataBean } from 'wdBean/Index'; |
| 2 | import { LiveViewModel } from '../viewModel/LiveViewModel'; | 2 | import { LiveViewModel } from '../viewModel/LiveViewModel'; |
| 3 | -import router from '@ohos.router'; | ||
| 4 | import { WindowModel } from 'wdKit/Index'; | 3 | import { WindowModel } from 'wdKit/Index'; |
| 5 | import { PlayerComponent } from '../widgets/vertical/PlayerComponent'; | 4 | import { PlayerComponent } from '../widgets/vertical/PlayerComponent'; |
| 6 | import { PlayerInfoComponent } from '../widgets/vertical/PlayerInfoComponent'; | 5 | import { PlayerInfoComponent } from '../widgets/vertical/PlayerInfoComponent'; |
| 7 | -import { WDAliPlayerController, WDPlayerController } from 'wdPlayer/Index'; | 6 | +import { WDAliPlayerController } from 'wdPlayer/Index'; |
| 8 | import { DisplayDirection } from 'wdConstant/Index'; | 7 | import { DisplayDirection } from 'wdConstant/Index'; |
| 9 | import { LiveEmptyComponent, WDLiveViewDefaultType } from 'wdComponent/Index'; | 8 | import { LiveEmptyComponent, WDLiveViewDefaultType } from 'wdComponent/Index'; |
| 10 | import { PlayerEndView } from '../widgets/vertical/PlayerEndView'; | 9 | import { PlayerEndView } from '../widgets/vertical/PlayerEndView'; |
| @@ -33,7 +32,6 @@ export struct DetailPlayVLivePage { | @@ -33,7 +32,6 @@ export struct DetailPlayVLivePage { | ||
| 33 | @Consume @Watch('openFullScreen') pageShow: number | 32 | @Consume @Watch('openFullScreen') pageShow: number |
| 34 | @Consume @Watch('closeFullScreen') pageHide: number | 33 | @Consume @Watch('closeFullScreen') pageHide: number |
| 35 | @Consume contentId: string | 34 | @Consume contentId: string |
| 36 | - @Consume liveDetailsBean: LiveDetailsBean | ||
| 37 | @State swiperIndex: number = 1 | 35 | @State swiperIndex: number = 1 |
| 38 | 36 | ||
| 39 | aboutToAppear(): void { | 37 | aboutToAppear(): void { |
| @@ -117,5 +115,7 @@ export struct DetailPlayVLivePage { | @@ -117,5 +115,7 @@ export struct DetailPlayVLivePage { | ||
| 117 | console.error(TAG, 'getLiveDetails catch', message) | 115 | console.error(TAG, 'getLiveDetails catch', message) |
| 118 | }) | 116 | }) |
| 119 | } | 117 | } |
| 118 | + | ||
| 119 | + | ||
| 120 | } | 120 | } |
| 121 | 121 |
| 1 | import font from '@ohos.font' | 1 | import font from '@ohos.font' |
| 2 | -import { LiveDetailsBean } from 'wdBean/Index' | 2 | +import { ContentDetailDTO } from 'wdBean/Index' |
| 3 | import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index' | 3 | import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index' |
| 4 | import { LiveViewModel } from '../../viewModel/LiveViewModel' | 4 | import { LiveViewModel } from '../../viewModel/LiveViewModel' |
| 5 | import { HttpUtils } from 'wdNetwork/Index' | 5 | import { HttpUtils } from 'wdNetwork/Index' |
| @@ -7,7 +7,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' | @@ -7,7 +7,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' | ||
| 7 | 7 | ||
| 8 | @Component | 8 | @Component |
| 9 | export struct LiveCountdownComponent { | 9 | export struct LiveCountdownComponent { |
| 10 | - @State liveDetailsBean: LiveDetailsBean = {} as LiveDetailsBean | 10 | + @State liveDetailsBean: ContentDetailDTO = {} as ContentDetailDTO |
| 11 | textTimerController: TextTimerController = new TextTimerController() | 11 | textTimerController: TextTimerController = new TextTimerController() |
| 12 | @State format: string = 'HH:mm:ss' | 12 | @State format: string = 'HH:mm:ss' |
| 13 | @State month: string = '' | 13 | @State month: string = '' |
| @@ -141,7 +141,7 @@ export struct LiveCountdownComponent { | @@ -141,7 +141,7 @@ export struct LiveCountdownComponent { | ||
| 141 | } | 141 | } |
| 142 | //2024-04-01 19:44:00-trim->2024-04-0119:44:00 | 142 | //2024-04-01 19:44:00-trim->2024-04-0119:44:00 |
| 143 | if (StringUtils.isNotEmpty(this.liveDetailsBean.liveInfo?.planStartTime)) { | 143 | if (StringUtils.isNotEmpty(this.liveDetailsBean.liveInfo?.planStartTime)) { |
| 144 | - let playStartTimeTmp = this.liveDetailsBean.liveInfo?.planStartTime?.trim() | 144 | + let playStartTimeTmp = this.liveDetailsBean.liveInfo?.planStartTime+'' |
| 145 | this.month = Number(playStartTimeTmp.substring(5, 7)).toString() | 145 | this.month = Number(playStartTimeTmp.substring(5, 7)).toString() |
| 146 | this.day = playStartTimeTmp.substring(8, 10) | 146 | this.day = playStartTimeTmp.substring(8, 10) |
| 147 | this.hour = playStartTimeTmp.substring(11, 13) | 147 | this.hour = playStartTimeTmp.substring(11, 13) |
| @@ -152,7 +152,7 @@ export struct LiveCountdownComponent { | @@ -152,7 +152,7 @@ export struct LiveCountdownComponent { | ||
| 152 | getLiveAppointmentStatus() { | 152 | getLiveAppointmentStatus() { |
| 153 | this.liveViewModel.getLiveAppointmentStatus( | 153 | this.liveViewModel.getLiveAppointmentStatus( |
| 154 | this.liveDetailsBean.reLInfo ? this.liveDetailsBean.reLInfo.relId : '', | 154 | this.liveDetailsBean.reLInfo ? this.liveDetailsBean.reLInfo.relId : '', |
| 155 | - this.liveDetailsBean.newsId | 155 | + this.liveDetailsBean.newsId+'' |
| 156 | ).then( | 156 | ).then( |
| 157 | (data) => { | 157 | (data) => { |
| 158 | this.isAppointmentLive = data | 158 | this.isAppointmentLive = data |
| @@ -165,7 +165,7 @@ export struct LiveCountdownComponent { | @@ -165,7 +165,7 @@ export struct LiveCountdownComponent { | ||
| 165 | liveAppointment() { | 165 | liveAppointment() { |
| 166 | this.liveViewModel.liveAppointment( | 166 | this.liveViewModel.liveAppointment( |
| 167 | this.liveDetailsBean.reLInfo ? this.liveDetailsBean.reLInfo.relId : '', | 167 | this.liveDetailsBean.reLInfo ? this.liveDetailsBean.reLInfo.relId : '', |
| 168 | - this.liveDetailsBean.newsId, | 168 | + this.liveDetailsBean.newsId+'', |
| 169 | !this.isAppointmentLive).then( | 169 | !this.isAppointmentLive).then( |
| 170 | (data) => { | 170 | (data) => { |
| 171 | if (data.success) { | 171 | if (data.success) { |
| 1 | -import { LiveDetailsBean, LiveRoomItemBean } from 'wdBean/Index' | 1 | +import { ContentDetailDTO, LiveDetailsBean, LiveRoomItemBean } from 'wdBean/Index' |
| 2 | import { EmptyComponent, ErrorComponent, WDViewDefaultType } from 'wdComponent/Index' | 2 | import { EmptyComponent, ErrorComponent, WDViewDefaultType } from 'wdComponent/Index' |
| 3 | import CustomRefreshLoadLayout from 'wdComponent/src/main/ets/components/page/CustomRefreshLoadLayout' | 3 | import CustomRefreshLoadLayout from 'wdComponent/src/main/ets/components/page/CustomRefreshLoadLayout' |
| 4 | import RefreshLayout from 'wdComponent/src/main/ets/components/page/RefreshLayout' | 4 | import RefreshLayout from 'wdComponent/src/main/ets/components/page/RefreshLayout' |
| @@ -17,7 +17,7 @@ export struct TabChatComponent { | @@ -17,7 +17,7 @@ export struct TabChatComponent { | ||
| 17 | @State private pageModel: PageModel = new PageModel() | 17 | @State private pageModel: PageModel = new PageModel() |
| 18 | liveViewModel: LiveViewModel = new LiveViewModel() | 18 | liveViewModel: LiveViewModel = new LiveViewModel() |
| 19 | @State liveChatList: Array<LiveRoomItemBean> = [] | 19 | @State liveChatList: Array<LiveRoomItemBean> = [] |
| 20 | - @Consume liveDetailsBean: LiveDetailsBean | 20 | + @Consume contentDetailData: ContentDetailDTO |
| 21 | @Consume publishCommentModel: publishCommentModel | 21 | @Consume publishCommentModel: publishCommentModel |
| 22 | 22 | ||
| 23 | aboutToAppear(): void { | 23 | aboutToAppear(): void { |
| @@ -102,8 +102,8 @@ export struct TabChatComponent { | @@ -102,8 +102,8 @@ export struct TabChatComponent { | ||
| 102 | this.pageModel.currentPage = 1 | 102 | this.pageModel.currentPage = 1 |
| 103 | this.liveViewModel.getLiveChatList( | 103 | this.liveViewModel.getLiveChatList( |
| 104 | this.pageModel.currentPage, | 104 | this.pageModel.currentPage, |
| 105 | - this.liveDetailsBean?.liveInfo?.mlive?.mliveId, | ||
| 106 | - this.liveDetailsBean?.newsId, | 105 | + this.contentDetailData?.liveInfo?.mlive?.mliveId, |
| 106 | + String( this.contentDetailData.newsId), | ||
| 107 | 20,) | 107 | 20,) |
| 108 | .then( | 108 | .then( |
| 109 | (data) => { | 109 | (data) => { |
| 1 | -import { LiveDetailsBean } from 'wdBean/Index' | 1 | +import { ContentDetailDTO, LiveDetailsBean } from 'wdBean/Index' |
| 2 | import { LiveCountdownComponent } from './LiveCountdownComponent' | 2 | import { LiveCountdownComponent } from './LiveCountdownComponent' |
| 3 | 3 | ||
| 4 | @Component | 4 | @Component |
| 5 | export struct TabInfoComponent { | 5 | export struct TabInfoComponent { |
| 6 | - @Consume liveDetailsBean: LiveDetailsBean | ||
| 7 | - | 6 | + @Consume contentDetailData: ContentDetailDTO |
| 8 | aboutToAppear(): void { | 7 | aboutToAppear(): void { |
| 9 | } | 8 | } |
| 10 | 9 | ||
| @@ -12,7 +11,7 @@ export struct TabInfoComponent { | @@ -12,7 +11,7 @@ export struct TabInfoComponent { | ||
| 12 | Column() { | 11 | Column() { |
| 13 | this.showLiveTitle() | 12 | this.showLiveTitle() |
| 14 | this.showLiveDetails() | 13 | this.showLiveDetails() |
| 15 | - LiveCountdownComponent({liveDetailsBean:this.liveDetailsBean}) | 14 | + LiveCountdownComponent({liveDetailsBean:this.contentDetailData}) |
| 16 | }.margin({ | 15 | }.margin({ |
| 17 | top: 13, | 16 | top: 13, |
| 18 | left: 16, | 17 | left: 16, |
| @@ -27,7 +26,7 @@ export struct TabInfoComponent { | @@ -27,7 +26,7 @@ export struct TabInfoComponent { | ||
| 27 | 26 | ||
| 28 | @Builder | 27 | @Builder |
| 29 | showLiveTitle() { | 28 | showLiveTitle() { |
| 30 | - Text(this.liveDetailsBean.newsTitle) | 29 | + Text(this.contentDetailData.newsTitle) |
| 31 | .maxLines(2) | 30 | .maxLines(2) |
| 32 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 31 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 33 | .fontSize('18vp') | 32 | .fontSize('18vp') |
| @@ -38,7 +37,7 @@ export struct TabInfoComponent { | @@ -38,7 +37,7 @@ export struct TabInfoComponent { | ||
| 38 | 37 | ||
| 39 | @Builder | 38 | @Builder |
| 40 | showLiveDetails() { | 39 | showLiveDetails() { |
| 41 | - Text(this.liveDetailsBean.newIntroduction) | 40 | + Text(this.contentDetailData.newIntroduction) |
| 42 | .maxLines(5) | 41 | .maxLines(5) |
| 43 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 42 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 44 | .fontSize('14vp') | 43 | .fontSize('14vp') |
| 1 | -import { LiveDetailsBean, LiveRoomItemBean } from 'wdBean/Index' | 1 | +import { ContentDetailDTO, LiveDetailsBean, LiveRoomItemBean } from 'wdBean/Index' |
| 2 | import { EmptyComponent, ErrorComponent, ListHasNoMoreDataUI, WDViewDefaultType } from 'wdComponent/Index' | 2 | import { EmptyComponent, ErrorComponent, ListHasNoMoreDataUI, WDViewDefaultType } from 'wdComponent/Index' |
| 3 | import { TabLiveItemComponent } from './TabLiveItemComponent' | 3 | import { TabLiveItemComponent } from './TabLiveItemComponent' |
| 4 | import CustomRefreshLoadLayout from 'wdComponent/src/main/ets/components/page/CustomRefreshLoadLayout' | 4 | import CustomRefreshLoadLayout from 'wdComponent/src/main/ets/components/page/CustomRefreshLoadLayout' |
| @@ -12,12 +12,14 @@ import { Logger } from 'wdKit' | @@ -12,12 +12,14 @@ import { Logger } from 'wdKit' | ||
| 12 | 12 | ||
| 13 | const TAG: string = 'TabLiveComponent'; | 13 | const TAG: string = 'TabLiveComponent'; |
| 14 | 14 | ||
| 15 | - | 15 | +/** |
| 16 | + * 非沉浸式直播间组件 | ||
| 17 | + */ | ||
| 16 | @Component | 18 | @Component |
| 17 | export struct TabLiveComponent { | 19 | export struct TabLiveComponent { |
| 18 | liveViewModel: LiveViewModel = new LiveViewModel() | 20 | liveViewModel: LiveViewModel = new LiveViewModel() |
| 19 | @State liveList: Array<LiveRoomItemBean> = [] | 21 | @State liveList: Array<LiveRoomItemBean> = [] |
| 20 | - @Consume @Watch('updateData') liveDetailsBean: LiveDetailsBean | 22 | + @Consume @Watch('updateData') contentDetailData: ContentDetailDTO |
| 21 | @State private pageModel: PageModel = new PageModel() | 23 | @State private pageModel: PageModel = new PageModel() |
| 22 | 24 | ||
| 23 | aboutToAppear(): void { | 25 | aboutToAppear(): void { |
| @@ -81,15 +83,15 @@ export struct TabLiveComponent { | @@ -81,15 +83,15 @@ export struct TabLiveComponent { | ||
| 81 | } | 83 | } |
| 82 | 84 | ||
| 83 | getLiveList() { | 85 | getLiveList() { |
| 84 | - if (!this.liveDetailsBean || !this.liveDetailsBean.newsId) { | 86 | + if (!this.contentDetailData || !this.contentDetailData.newsId) { |
| 85 | // 参数不够,直接拦截接口 | 87 | // 参数不够,直接拦截接口 |
| 86 | return | 88 | return |
| 87 | } | 89 | } |
| 88 | this.pageModel.currentPage = 1 | 90 | this.pageModel.currentPage = 1 |
| 89 | this.liveViewModel.getLiveList( | 91 | this.liveViewModel.getLiveList( |
| 90 | this.pageModel.currentPage, | 92 | this.pageModel.currentPage, |
| 91 | - this.liveDetailsBean?.liveInfo?.mlive?.mliveId, | ||
| 92 | - this.liveDetailsBean?.newsId, | 93 | + this.contentDetailData?.liveInfo?.mlive?.mliveId, |
| 94 | + this.contentDetailData?.newsId+'', | ||
| 93 | 20) | 95 | 20) |
| 94 | .then( | 96 | .then( |
| 95 | (data) => { | 97 | (data) => { |
| @@ -110,16 +112,16 @@ export struct TabLiveComponent { | @@ -110,16 +112,16 @@ export struct TabLiveComponent { | ||
| 110 | this.pageModel.hasMore = true; | 112 | this.pageModel.hasMore = true; |
| 111 | } else { | 113 | } else { |
| 112 | this.pageModel.hasMore = false; | 114 | this.pageModel.hasMore = false; |
| 113 | - if (StringUtils.isEmpty(this.liveDetailsBean.oldNewsId) | ||
| 114 | - && this.liveDetailsBean | ||
| 115 | - && this.liveDetailsBean.liveInfo.liveState != 'wait') { | 115 | + if (StringUtils.isEmpty(this.contentDetailData.oldNewsId) |
| 116 | + && this.contentDetailData | ||
| 117 | + && this.contentDetailData.liveInfo.liveState != 'wait') { | ||
| 116 | this.updateLiveListData() | 118 | this.updateLiveListData() |
| 117 | } | 119 | } |
| 118 | } | 120 | } |
| 119 | } else { | 121 | } else { |
| 120 | - if (StringUtils.isEmpty(this.liveDetailsBean.oldNewsId) | ||
| 121 | - && this.liveDetailsBean | ||
| 122 | - && this.liveDetailsBean.liveInfo.liveState != 'wait') { | 122 | + if (StringUtils.isEmpty(this.contentDetailData.oldNewsId) |
| 123 | + && this.contentDetailData | ||
| 124 | + && this.contentDetailData.liveInfo.liveState != 'wait') { | ||
| 123 | this.pageModel.viewType = ViewType.LOADED; | 125 | this.pageModel.viewType = ViewType.LOADED; |
| 124 | this.updateLiveListData() | 126 | this.updateLiveListData() |
| 125 | } else { | 127 | } else { |
| @@ -136,12 +138,12 @@ export struct TabLiveComponent { | @@ -136,12 +138,12 @@ export struct TabLiveComponent { | ||
| 136 | 138 | ||
| 137 | updateLiveListData() { | 139 | updateLiveListData() { |
| 138 | let liveRoomItemBeanTemp: LiveRoomItemBean = {} as LiveRoomItemBean | 140 | let liveRoomItemBeanTemp: LiveRoomItemBean = {} as LiveRoomItemBean |
| 139 | - liveRoomItemBeanTemp.text = this.liveDetailsBean.newIntroduction | 141 | + liveRoomItemBeanTemp.text = this.contentDetailData.newIntroduction |
| 140 | liveRoomItemBeanTemp.senderUserName = '人民日报主持人' | 142 | liveRoomItemBeanTemp.senderUserName = '人民日报主持人' |
| 141 | liveRoomItemBeanTemp.pictureUrls = [] | 143 | liveRoomItemBeanTemp.pictureUrls = [] |
| 142 | - liveRoomItemBeanTemp.pictureUrls.push(this.liveDetailsBean?.fullColumnImgUrls[0]?.url) | 144 | + liveRoomItemBeanTemp.pictureUrls.push(this.contentDetailData?.fullColumnImgUrls[0]?.url) |
| 143 | liveRoomItemBeanTemp.dataType = 'ZH_TEXT_AND_IMAGE_MSG' | 145 | liveRoomItemBeanTemp.dataType = 'ZH_TEXT_AND_IMAGE_MSG' |
| 144 | - let temp = this.liveDetailsBean?.fullColumnImgUrls[0] | 146 | + let temp = this.contentDetailData?.fullColumnImgUrls[0] |
| 145 | if (temp) { | 147 | if (temp) { |
| 146 | liveRoomItemBeanTemp.pictureResolutions = [] | 148 | liveRoomItemBeanTemp.pictureResolutions = [] |
| 147 | liveRoomItemBeanTemp.pictureResolutions.push(`${temp.height}*${temp.weight}`) | 149 | liveRoomItemBeanTemp.pictureResolutions.push(`${temp.height}*${temp.weight}`) |
| @@ -3,7 +3,7 @@ import lottie from '@ohos/lottie'; | @@ -3,7 +3,7 @@ import lottie from '@ohos/lottie'; | ||
| 3 | 3 | ||
| 4 | import { NumberFormatterUtils, StringUtils, WindowModel } from 'wdKit/Index' | 4 | import { NumberFormatterUtils, StringUtils, WindowModel } from 'wdKit/Index' |
| 5 | import { DateFormatUtil, WDAliPlayerController, WDPlayerController } from 'wdPlayer/Index' | 5 | import { DateFormatUtil, WDAliPlayerController, WDPlayerController } from 'wdPlayer/Index' |
| 6 | -import { LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index' | 6 | +import { ContentDetailDTO, LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index' |
| 7 | import { DisplayDirection } from 'wdConstant/Index' | 7 | import { DisplayDirection } from 'wdConstant/Index' |
| 8 | import { LiveFollowComponent, LottieView } from 'wdComponent/Index' | 8 | import { LiveFollowComponent, LottieView } from 'wdComponent/Index' |
| 9 | 9 | ||
| @@ -12,7 +12,8 @@ export struct PlayUIComponent { | @@ -12,7 +12,8 @@ export struct PlayUIComponent { | ||
| 12 | playerController?: WDAliPlayerController; | 12 | playerController?: WDAliPlayerController; |
| 13 | //菜单键是否可见 | 13 | //菜单键是否可见 |
| 14 | @State @Watch('onChangeMenuVisible') isMenuVisible: boolean = true | 14 | @State @Watch('onChangeMenuVisible') isMenuVisible: boolean = true |
| 15 | - @Consume liveDetailsBean: LiveDetailsBean | 15 | +// @Consume liveDetailsBean: LiveDetailsBean |
| 16 | + @Consume contentDetailData: ContentDetailDTO | ||
| 16 | @Consume liveRoomDataBean: LiveRoomDataBean | 17 | @Consume liveRoomDataBean: LiveRoomDataBean |
| 17 | @State currentTime: string = '' | 18 | @State currentTime: string = '' |
| 18 | @State totalTime: string = '' | 19 | @State totalTime: string = '' |
| @@ -24,8 +25,8 @@ export struct PlayUIComponent { | @@ -24,8 +25,8 @@ export struct PlayUIComponent { | ||
| 24 | @Prop isShowBottom: boolean | 25 | @Prop isShowBottom: boolean |
| 25 | 26 | ||
| 26 | onChangeMenuVisible() { | 27 | onChangeMenuVisible() { |
| 27 | - if (!this.liveDetailsBean || !this.liveDetailsBean.liveInfo || | ||
| 28 | - this.liveDetailsBean?.liveInfo?.liveState === 'wait') { | 28 | + if (!this.contentDetailData || !this.contentDetailData.liveInfo || |
| 29 | + this.contentDetailData?.liveInfo?.liveState === 'wait') { | ||
| 29 | return | 30 | return |
| 30 | } | 31 | } |
| 31 | let time: number = 0 | 32 | let time: number = 0 |
| @@ -51,14 +52,14 @@ export struct PlayUIComponent { | @@ -51,14 +52,14 @@ export struct PlayUIComponent { | ||
| 51 | } | 52 | } |
| 52 | 53 | ||
| 53 | aboutToDisappear(): void { | 54 | aboutToDisappear(): void { |
| 54 | - if (this.liveDetailsBean.liveInfo?.liveState == 'running') { | 55 | + if (this.contentDetailData.liveInfo?.liveState == 'running') { |
| 55 | lottie.destroy('live_status_wait') | 56 | lottie.destroy('live_status_wait') |
| 56 | } | 57 | } |
| 57 | } | 58 | } |
| 58 | 59 | ||
| 59 | build() { | 60 | build() { |
| 60 | Column() { | 61 | Column() { |
| 61 | - if (this.liveDetailsBean && this.liveDetailsBean.liveInfo) { | 62 | + if (this.contentDetailData && this.contentDetailData.liveInfo) { |
| 62 | this.getTopUIComponent() | 63 | this.getTopUIComponent() |
| 63 | this.getMiddleUIComponent() | 64 | this.getMiddleUIComponent() |
| 64 | if(this.isShowBottom){ | 65 | if(this.isShowBottom){ |
| @@ -92,8 +93,8 @@ export struct PlayUIComponent { | @@ -92,8 +93,8 @@ export struct PlayUIComponent { | ||
| 92 | // window.Orientation.PORTRAIT : | 93 | // window.Orientation.PORTRAIT : |
| 93 | // window.Orientation.LANDSCAPE); | 94 | // window.Orientation.LANDSCAPE); |
| 94 | }) | 95 | }) |
| 95 | - if (this.liveDetailsBean.liveInfo?.liveState != 'wait') { | ||
| 96 | - Text(this.liveDetailsBean.newsTitle) | 96 | + if (this.contentDetailData.liveInfo?.liveState != 'wait') { |
| 97 | + Text(this.contentDetailData.newsTitle) | ||
| 97 | .maxLines(1) | 98 | .maxLines(1) |
| 98 | .textOverflow({ overflow: TextOverflow.MARQUEE }) | 99 | .textOverflow({ overflow: TextOverflow.MARQUEE }) |
| 99 | .fontSize(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '18vp' : '16vp') | 100 | .fontSize(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? '18vp' : '16vp') |
| @@ -116,9 +117,9 @@ export struct PlayUIComponent { | @@ -116,9 +117,9 @@ export struct PlayUIComponent { | ||
| 116 | }) | 117 | }) |
| 117 | 118 | ||
| 118 | Row() { | 119 | Row() { |
| 119 | - if (this.liveDetailsBean?.rmhInfo) { | 120 | + if (this.contentDetailData?.rmhInfo) { |
| 120 | LiveFollowComponent({ | 121 | LiveFollowComponent({ |
| 121 | - rmhInfo: this.liveDetailsBean.rmhInfo | 122 | + rmhInfo: this.contentDetailData.rmhInfo |
| 122 | }) | 123 | }) |
| 123 | .margin({ | 124 | .margin({ |
| 124 | right: 10 | 125 | right: 10 |
| @@ -144,7 +145,7 @@ export struct PlayUIComponent { | @@ -144,7 +145,7 @@ export struct PlayUIComponent { | ||
| 144 | getLiveStatusView() { | 145 | getLiveStatusView() { |
| 145 | // 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停 | 146 | // 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停 |
| 146 | // 预约 | 147 | // 预约 |
| 147 | - if (this.liveDetailsBean.liveInfo?.liveState == 'wait') { | 148 | + if (this.contentDetailData.liveInfo?.liveState == 'wait') { |
| 148 | Row() { | 149 | Row() { |
| 149 | 150 | ||
| 150 | Image($r('app.media.icon_live_status_wait')) | 151 | Image($r('app.media.icon_live_status_wait')) |
| @@ -163,7 +164,7 @@ export struct PlayUIComponent { | @@ -163,7 +164,7 @@ export struct PlayUIComponent { | ||
| 163 | }) | 164 | }) |
| 164 | } | 165 | } |
| 165 | // 直播中 | 166 | // 直播中 |
| 166 | - else if (this.liveDetailsBean.liveInfo?.liveState == 'running') { | 167 | + else if (this.contentDetailData.liveInfo?.liveState == 'running') { |
| 167 | Row() { | 168 | Row() { |
| 168 | Stack() { | 169 | Stack() { |
| 169 | Image($r('app.media.icon_live_status_running_back')) | 170 | Image($r('app.media.icon_live_status_running_back')) |
| @@ -204,7 +205,7 @@ export struct PlayUIComponent { | @@ -204,7 +205,7 @@ export struct PlayUIComponent { | ||
| 204 | }) | 205 | }) |
| 205 | } | 206 | } |
| 206 | //回看 | 207 | //回看 |
| 207 | - else if (this.liveDetailsBean.liveInfo?.liveState == 'end') { | 208 | + else if (this.contentDetailData.liveInfo?.liveState == 'end') { |
| 208 | Row() { | 209 | Row() { |
| 209 | Text('回看') | 210 | Text('回看') |
| 210 | .fontSize('11vp') | 211 | .fontSize('11vp') |
| @@ -240,7 +241,7 @@ export struct PlayUIComponent { | @@ -240,7 +241,7 @@ export struct PlayUIComponent { | ||
| 240 | .layoutWeight(1) | 241 | .layoutWeight(1) |
| 241 | .width('100%') | 242 | .width('100%') |
| 242 | .onClick(() => { | 243 | .onClick(() => { |
| 243 | - if (this.liveDetailsBean?.liveInfo?.liveState === 'wait') { | 244 | + if (this.contentDetailData?.liveInfo?.liveState === 'wait') { |
| 244 | return | 245 | return |
| 245 | } | 246 | } |
| 246 | this.isMenuVisible = !this.isMenuVisible | 247 | this.isMenuVisible = !this.isMenuVisible |
| @@ -250,13 +251,13 @@ export struct PlayUIComponent { | @@ -250,13 +251,13 @@ export struct PlayUIComponent { | ||
| 250 | @Builder | 251 | @Builder |
| 251 | getBottomUIComponent() { | 252 | getBottomUIComponent() { |
| 252 | Row() { | 253 | Row() { |
| 253 | - if (this.liveDetailsBean?.liveInfo?.liveState == 'wait') { | 254 | + if (this.contentDetailData?.liveInfo?.liveState == 'wait') { |
| 254 | Blank() | 255 | Blank() |
| 255 | - } else if (this.liveDetailsBean?.liveInfo?.liveState == 'running') { | 256 | + } else if (this.contentDetailData?.liveInfo?.liveState == 'running') { |
| 256 | this.playOrPauseBtn() | 257 | this.playOrPauseBtn() |
| 257 | Blank() | 258 | Blank() |
| 258 | - } else if (this.liveDetailsBean?.liveInfo?.liveState == 'end') { | ||
| 259 | - if (StringUtils.isEmpty(this.liveDetailsBean?.liveInfo?.vlive[0]?.replayUri)) { | 259 | + } else if (this.contentDetailData?.liveInfo?.liveState == 'end') { |
| 260 | + if (StringUtils.isEmpty(this.contentDetailData?.liveInfo?.vlive[0]?.replayUri)) { | ||
| 260 | Blank() | 261 | Blank() |
| 261 | } else { | 262 | } else { |
| 262 | this.playOrPauseBtn() | 263 | this.playOrPauseBtn() |
| @@ -277,9 +278,9 @@ export struct PlayUIComponent { | @@ -277,9 +278,9 @@ export struct PlayUIComponent { | ||
| 277 | }) | 278 | }) |
| 278 | } | 279 | } |
| 279 | } | 280 | } |
| 280 | - if (this.liveDetailsBean?.liveInfo?.liveState == 'running' | ||
| 281 | - || (this.liveDetailsBean?.liveInfo?.liveState == 'end' && | ||
| 282 | - StringUtils.isNotEmpty(this.liveDetailsBean?.liveInfo?.vlive[0]?.replayUri)) | 281 | + if (this.contentDetailData?.liveInfo?.liveState == 'running' |
| 282 | + || (this.contentDetailData?.liveInfo?.liveState == 'end' && | ||
| 283 | + StringUtils.isNotEmpty(this.contentDetailData?.liveInfo?.vlive[0]?.replayUri)) | ||
| 283 | ) { | 284 | ) { |
| 284 | Image($r('app.media.icon_live_player_full_screen')) | 285 | Image($r('app.media.icon_live_player_full_screen')) |
| 285 | .width(24) | 286 | .width(24) |
| 1 | -import { LiveDetailsBean } from 'wdBean/Index'; | 1 | +import { ContentDetailDTO, LiveDetailsBean } from 'wdBean/Index'; |
| 2 | import { Logger, StringUtils } from 'wdKit/Index'; | 2 | import { Logger, StringUtils } from 'wdKit/Index'; |
| 3 | import { PlayerConstants, WDAliPlayerController, WDPlayerRenderLiveView } from 'wdPlayer/Index'; | 3 | import { PlayerConstants, WDAliPlayerController, WDPlayerRenderLiveView } from 'wdPlayer/Index'; |
| 4 | import { PlayUIComponent } from './PlayUIComponent'; | 4 | import { PlayUIComponent } from './PlayUIComponent'; |
| @@ -6,10 +6,12 @@ import { PictureLoading } from '../../vertical/PictureLoading'; | @@ -6,10 +6,12 @@ import { PictureLoading } from '../../vertical/PictureLoading'; | ||
| 6 | 6 | ||
| 7 | const TAG: string = 'TopPlayComponent' | 7 | const TAG: string = 'TopPlayComponent' |
| 8 | 8 | ||
| 9 | - | 9 | +/** |
| 10 | + * 非沉浸式直播 --- 顶部播放器组件 | ||
| 11 | + */ | ||
| 10 | @Component | 12 | @Component |
| 11 | export struct TopPlayComponent { | 13 | export struct TopPlayComponent { |
| 12 | - @Consume @Watch('updateData') liveDetailsBean: LiveDetailsBean | 14 | + @Consume @Watch('updateData') contentDetailData: ContentDetailDTO |
| 13 | playerController?: WDAliPlayerController | 15 | playerController?: WDAliPlayerController |
| 14 | @State imgUrl: string = '' | 16 | @State imgUrl: string = '' |
| 15 | //未开始 | 17 | //未开始 |
| @@ -55,26 +57,26 @@ export struct TopPlayComponent { | @@ -55,26 +57,26 @@ export struct TopPlayComponent { | ||
| 55 | 57 | ||
| 56 | updateData() { | 58 | updateData() { |
| 57 | //直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停 | 59 | //直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停 |
| 58 | - if (this.liveDetailsBean.liveInfo && this.liveDetailsBean.liveInfo.previewUrl && | ||
| 59 | - this.liveDetailsBean.liveInfo.previewUrl.length > 0) { | ||
| 60 | - this.imgUrl = this.liveDetailsBean.liveInfo.previewUrl | 60 | + if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewUrl && |
| 61 | + this.contentDetailData.liveInfo.previewUrl.length > 0) { | ||
| 62 | + this.imgUrl = this.contentDetailData.liveInfo.previewUrl | ||
| 61 | Logger.debug(TAG, 'ok+' + `${this.imgUrl}`) | 63 | Logger.debug(TAG, 'ok+' + `${this.imgUrl}`) |
| 62 | - } else if (this.liveDetailsBean.fullColumnImgUrls && this.liveDetailsBean.fullColumnImgUrls.length > 0) { | ||
| 63 | - this.imgUrl = this.liveDetailsBean.fullColumnImgUrls[0].url | 64 | + } else if (this.contentDetailData.fullColumnImgUrls && this.contentDetailData.fullColumnImgUrls.length > 0) { |
| 65 | + this.imgUrl = this.contentDetailData.fullColumnImgUrls[0].url | ||
| 64 | Logger.debug(TAG, 'ok-' + `${this.imgUrl}`) | 66 | Logger.debug(TAG, 'ok-' + `${this.imgUrl}`) |
| 65 | } | 67 | } |
| 66 | - this.isWait = this.liveDetailsBean?.liveInfo?.liveState == 'wait' | 68 | + this.isWait = this.contentDetailData?.liveInfo?.liveState == 'wait' |
| 67 | if(this.isWait ){ | 69 | if(this.isWait ){ |
| 68 | this.isLoading = true | 70 | this.isLoading = true |
| 69 | } | 71 | } |
| 70 | - this.isEnd = this.liveDetailsBean?.liveInfo?.liveState === 'end' && | ||
| 71 | - StringUtils.isEmpty(this.liveDetailsBean?.liveInfo?.vlive[0]?.replayUri) | ||
| 72 | - if (!this.isWait && this.liveDetailsBean.liveInfo && this.liveDetailsBean.liveInfo.vlive.length > 0) { | 72 | + this.isEnd = this.contentDetailData?.liveInfo?.liveState === 'end' && |
| 73 | + StringUtils.isEmpty(this.contentDetailData?.liveInfo?.vlive[0]?.replayUri) | ||
| 74 | + if (!this.isWait && this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.vlive.length > 0) { | ||
| 73 | let playUrl = '' | 75 | let playUrl = '' |
| 74 | - if (this.liveDetailsBean.liveInfo.liveState == 'running') { | ||
| 75 | - playUrl = this.liveDetailsBean.liveInfo.vlive[0].liveUrl | ||
| 76 | - } else if (this.liveDetailsBean.liveInfo.liveState == 'end') { | ||
| 77 | - playUrl = this.liveDetailsBean.liveInfo.vlive[0].replayUri | 76 | + if (this.contentDetailData.liveInfo.liveState == 'running') { |
| 77 | + playUrl = this.contentDetailData.liveInfo.vlive[0].liveUrl | ||
| 78 | + } else if (this.contentDetailData.liveInfo.liveState == 'end') { | ||
| 79 | + playUrl = this.contentDetailData.liveInfo.vlive[0].replayUri | ||
| 78 | } | 80 | } |
| 79 | // this.playerController?.firstPlay('https://rmrbcmsonline.peopleapp.com/upload/rmh/video/mp4/202404/1713752415708fb81d0b8f137b.mp4'); | 81 | // this.playerController?.firstPlay('https://rmrbcmsonline.peopleapp.com/upload/rmh/video/mp4/202404/1713752415708fb81d0b8f137b.mp4'); |
| 80 | if (StringUtils.isNotEmpty(playUrl)) { | 82 | if (StringUtils.isNotEmpty(playUrl)) { |
| 1 | -import { LiveDetailsBean } from 'wdBean/Index' | 1 | +import { ContentDetailDTO } from 'wdBean/Index' |
| 2 | 2 | ||
| 3 | @Component | 3 | @Component |
| 4 | export struct ChartItemCompereComponent { | 4 | export struct ChartItemCompereComponent { |
| 5 | - @Consume liveDetailsBean: LiveDetailsBean | ||
| 6 | - | 5 | + // @Consume liveDetailsBean: LiveDetailsBean |
| 6 | + @Consume contentDetailData: ContentDetailDTO | ||
| 7 | aboutToAppear(): void { | 7 | aboutToAppear(): void { |
| 8 | } | 8 | } |
| 9 | 9 | ||
| @@ -32,7 +32,7 @@ export struct ChartItemCompereComponent { | @@ -32,7 +32,7 @@ export struct ChartItemCompereComponent { | ||
| 32 | .margin({ bottom: 8 }) | 32 | .margin({ bottom: 8 }) |
| 33 | .justifyContent(FlexAlign.Start) | 33 | .justifyContent(FlexAlign.Start) |
| 34 | 34 | ||
| 35 | - Text(this.liveDetailsBean.newIntroduction).lineHeight(22).fontColor('#FFFFFFFF').fontSize(14) | 35 | + Text(this.contentDetailData.newIntroduction).lineHeight(22).fontColor('#FFFFFFFF').fontSize(14) |
| 36 | } | 36 | } |
| 37 | .backgroundColor('#4D000000') | 37 | .backgroundColor('#4D000000') |
| 38 | .borderRadius(3) | 38 | .borderRadius(3) |
| @@ -17,12 +17,11 @@ const TAG = "PlayerCommentComponent" | @@ -17,12 +17,11 @@ const TAG = "PlayerCommentComponent" | ||
| 17 | @Component | 17 | @Component |
| 18 | export struct PlayerCommentComponent { | 18 | export struct PlayerCommentComponent { |
| 19 | liveViewModel: LiveViewModel = new LiveViewModel() | 19 | liveViewModel: LiveViewModel = new LiveViewModel() |
| 20 | - @Consume @Watch('liveDetailsBeanChange') liveDetailsBean: LiveDetailsBean | ||
| 21 | @Consume liveRoomDataBean: LiveRoomDataBean | 20 | @Consume liveRoomDataBean: LiveRoomDataBean |
| 22 | @Consume displayDirection: DisplayDirection | 21 | @Consume displayDirection: DisplayDirection |
| 23 | @State private pageModel: PageModel = new PageModel() | 22 | @State private pageModel: PageModel = new PageModel() |
| 24 | @State liveChatList: Array<LiveRoomItemBean> = [] | 23 | @State liveChatList: Array<LiveRoomItemBean> = [] |
| 25 | - @Consume contentDetailData: ContentDetailDTO | 24 | + @Consume @Watch('liveDetailsBeanChange') contentDetailData: ContentDetailDTO |
| 26 | @Consume publishCommentModel: publishCommentModel | 25 | @Consume publishCommentModel: publishCommentModel |
| 27 | scroller: Scroller = new Scroller() | 26 | scroller: Scroller = new Scroller() |
| 28 | 27 | ||
| @@ -65,8 +64,8 @@ export struct PlayerCommentComponent { | @@ -65,8 +64,8 @@ export struct PlayerCommentComponent { | ||
| 65 | this.pageModel.currentPage = 1 | 64 | this.pageModel.currentPage = 1 |
| 66 | this.liveViewModel.getLiveChatList( | 65 | this.liveViewModel.getLiveChatList( |
| 67 | 1, | 66 | 1, |
| 68 | - this.liveDetailsBean?.liveInfo?.mlive?.mliveId, | ||
| 69 | - this.liveDetailsBean?.newsId, | 67 | + this.contentDetailData?.liveInfo?.mlive?.mliveId, |
| 68 | + this.contentDetailData?.newsId+'', | ||
| 70 | 20,) | 69 | 20,) |
| 71 | .then( | 70 | .then( |
| 72 | (data) => { | 71 | (data) => { |
| @@ -98,7 +97,7 @@ export struct PlayerCommentComponent { | @@ -98,7 +97,7 @@ export struct PlayerCommentComponent { | ||
| 98 | Column() { | 97 | Column() { |
| 99 | List({ scroller: this.scroller }) { | 98 | List({ scroller: this.scroller }) { |
| 100 | // 主持人 | 99 | // 主持人 |
| 101 | - if (this.liveDetailsBean.oldNewsId) { | 100 | + if (this.contentDetailData.oldNewsId) { |
| 102 | ChartItemCompereComponent() | 101 | ChartItemCompereComponent() |
| 103 | } | 102 | } |
| 104 | ForEach(this.liveChatList, (item: LiveRoomItemBean) => { | 103 | ForEach(this.liveChatList, (item: LiveRoomItemBean) => { |
| 1 | -import { LiveDetailsBean } from 'wdBean/Index'; | ||
| 2 | -import { WDPlayerController, WDPlayerRenderVLiveView, WDPlayerRenderView, WDAliPlayerController, | ||
| 3 | - AliPlayerRenderView } from 'wdPlayer/Index'; | 1 | +import { ContentDetailDTO } from 'wdBean/Index'; |
| 2 | +import { AliPlayerRenderView, WDAliPlayerController, WDPlayerRenderVLiveView } from 'wdPlayer/Index'; | ||
| 4 | import { PictureLoading } from './PictureLoading'; | 3 | import { PictureLoading } from './PictureLoading'; |
| 5 | 4 | ||
| 6 | const TAG = 'PlayerComponent' | 5 | const TAG = 'PlayerComponent' |
| @@ -8,7 +7,7 @@ const TAG = 'PlayerComponent' | @@ -8,7 +7,7 @@ const TAG = 'PlayerComponent' | ||
| 8 | @Component | 7 | @Component |
| 9 | export struct PlayerComponent { | 8 | export struct PlayerComponent { |
| 10 | @Prop playerController: WDAliPlayerController; | 9 | @Prop playerController: WDAliPlayerController; |
| 11 | - @Consume @Watch('updateData') liveDetailsBean: LiveDetailsBean | 10 | + @Consume @Watch('updateData') contentDetailData: ContentDetailDTO |
| 12 | @Consume @Watch('pageShowChange') pageShow: number | 11 | @Consume @Watch('pageShowChange') pageShow: number |
| 13 | @Consume @Watch('pageHideChange') pageHide: number | 12 | @Consume @Watch('pageHideChange') pageHide: number |
| 14 | @Consume isShowControl: boolean | 13 | @Consume isShowControl: boolean |
| @@ -21,7 +20,6 @@ export struct PlayerComponent { | @@ -21,7 +20,6 @@ export struct PlayerComponent { | ||
| 21 | @State playUrl: string = '' | 20 | @State playUrl: string = '' |
| 22 | @State isCanplay: boolean = false | 21 | @State isCanplay: boolean = false |
| 23 | 22 | ||
| 24 | - | ||
| 25 | pageShowChange() { | 23 | pageShowChange() { |
| 26 | this.playerController?.play() | 24 | this.playerController?.play() |
| 27 | } | 25 | } |
| @@ -42,19 +40,19 @@ export struct PlayerComponent { | @@ -42,19 +40,19 @@ export struct PlayerComponent { | ||
| 42 | 40 | ||
| 43 | updateData() { | 41 | updateData() { |
| 44 | //直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停 | 42 | //直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停 |
| 45 | - if (this.liveDetailsBean.fullColumnImgUrls && this.liveDetailsBean.fullColumnImgUrls.length > 0) { | ||
| 46 | - this.imgUrl = this.liveDetailsBean.fullColumnImgUrls[0].url | 43 | + if (this.contentDetailData.fullColumnImgUrls && this.contentDetailData.fullColumnImgUrls.length > 0) { |
| 44 | + this.imgUrl = this.contentDetailData.fullColumnImgUrls[0].url | ||
| 47 | } | 45 | } |
| 48 | - this.isWait = this.liveDetailsBean?.liveInfo?.liveState == 'wait' | ||
| 49 | - if (this.liveDetailsBean.liveInfo && this.liveDetailsBean.liveInfo.vlive.length > 0) { | 46 | + this.isWait = this.contentDetailData?.liveInfo?.liveState == 'wait' |
| 47 | + if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.vlive.length > 0) { | ||
| 50 | let playUrl = '' | 48 | let playUrl = '' |
| 51 | let liveStreamType: number | null = null | 49 | let liveStreamType: number | null = null |
| 52 | - if (this.liveDetailsBean.liveInfo.liveState == 'running') { | ||
| 53 | - playUrl = this.liveDetailsBean.liveInfo.vlive[0].liveUrl | ||
| 54 | - liveStreamType = this.liveDetailsBean.liveInfo.vlive[0].liveStreamType | ||
| 55 | - } else if (this.liveDetailsBean.liveInfo.liveState == 'end') { | ||
| 56 | - playUrl = this.liveDetailsBean.liveInfo.vlive[0].replayUri | ||
| 57 | - liveStreamType = this.liveDetailsBean.liveInfo.vlive[0].liveStreamType | 50 | + if (this.contentDetailData.liveInfo.liveState == 'running') { |
| 51 | + playUrl = this.contentDetailData.liveInfo.vlive[0].liveUrl | ||
| 52 | + liveStreamType = this.contentDetailData.liveInfo.vlive[0].liveStreamType | ||
| 53 | + } else if (this.contentDetailData.liveInfo.liveState == 'end') { | ||
| 54 | + playUrl = this.contentDetailData.liveInfo.vlive[0].replayUri | ||
| 55 | + liveStreamType = this.contentDetailData.liveInfo.vlive[0].liveStreamType | ||
| 58 | } | 56 | } |
| 59 | 57 | ||
| 60 | this.liveStreamType = liveStreamType | 58 | this.liveStreamType = liveStreamType |
| @@ -79,7 +77,7 @@ export struct PlayerComponent { | @@ -79,7 +77,7 @@ export struct PlayerComponent { | ||
| 79 | playerController: this.playerController, | 77 | playerController: this.playerController, |
| 80 | onLoad: () => { | 78 | onLoad: () => { |
| 81 | this.isCanplay = true | 79 | this.isCanplay = true |
| 82 | - console.error('WDAliPlayerController','------1------------') | 80 | + console.error('WDAliPlayerController', '------1------------') |
| 83 | this.playerController?.firstPlay(this.playUrl); | 81 | this.playerController?.firstPlay(this.playUrl); |
| 84 | } | 82 | } |
| 85 | }).margin({ top: 195 }).height(211) | 83 | }).margin({ top: 195 }).height(211) |
| @@ -102,6 +100,4 @@ export struct PlayerComponent { | @@ -102,6 +100,4 @@ export struct PlayerComponent { | ||
| 102 | .height('100%') | 100 | .height('100%') |
| 103 | .width('100%') | 101 | .width('100%') |
| 104 | } | 102 | } |
| 105 | - | ||
| 106 | - | ||
| 107 | } | 103 | } |
| 1 | -import { LiveDetailsBean, LiveRoomDataBean, postBatchAttentionStatusParams, } from 'wdBean/Index' | 1 | +import { ContentDetailDTO, LiveDetailsBean, LiveRoomDataBean, postBatchAttentionStatusParams, } from 'wdBean/Index' |
| 2 | import { MultiPictureDetailViewModel } from 'wdComponent/src/main/ets/viewmodel/MultiPictureDetailViewModel' | 2 | import { MultiPictureDetailViewModel } from 'wdComponent/src/main/ets/viewmodel/MultiPictureDetailViewModel' |
| 3 | import { SpConstants } from 'wdConstant/Index' | 3 | import { SpConstants } from 'wdConstant/Index' |
| 4 | import { ContentDetailRequest, postInteractAccentionOperateParams } from 'wdDetailPlayApi/Index' | 4 | import { ContentDetailRequest, postInteractAccentionOperateParams } from 'wdDetailPlayApi/Index' |
| @@ -10,14 +10,15 @@ const TAG = 'PlayerEndView' | @@ -10,14 +10,15 @@ const TAG = 'PlayerEndView' | ||
| 10 | @Preview | 10 | @Preview |
| 11 | @Component | 11 | @Component |
| 12 | export struct PlayerEndView { | 12 | export struct PlayerEndView { |
| 13 | - @Consume liveDetailsBean: LiveDetailsBean | 13 | + // @Consume liveDetailsBean: LiveDetailsBean |
| 14 | + @Consume contentDetailData: ContentDetailDTO | ||
| 14 | @Consume liveRoomDataBean: LiveRoomDataBean | 15 | @Consume liveRoomDataBean: LiveRoomDataBean |
| 15 | @State duration: string = '' | 16 | @State duration: string = '' |
| 16 | @State followStatus: String = '0'; | 17 | @State followStatus: String = '0'; |
| 17 | 18 | ||
| 18 | aboutToAppear(): void { | 19 | aboutToAppear(): void { |
| 19 | - const sn = DateTimeUtils.parseDate(this.liveDetailsBean.liveInfo.startTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) | ||
| 20 | - const en = DateTimeUtils.parseDate(this.liveDetailsBean.liveInfo.endTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) | 20 | + const sn = DateTimeUtils.parseDate(this.contentDetailData.liveInfo.startTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) |
| 21 | + const en = DateTimeUtils.parseDate(this.contentDetailData.liveInfo.endTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) | ||
| 21 | const sd = DateTimeUtils.getDuration(sn, en) | 22 | const sd = DateTimeUtils.getDuration(sn, en) |
| 22 | this.duration = DateTimeUtils.secondToTime(sd / 1000) | 23 | this.duration = DateTimeUtils.secondToTime(sd / 1000) |
| 23 | this.getBatchAttentionStatus() | 24 | this.getBatchAttentionStatus() |
| @@ -29,7 +30,7 @@ export struct PlayerEndView { | @@ -29,7 +30,7 @@ export struct PlayerEndView { | ||
| 29 | async getBatchAttentionStatus() { | 30 | async getBatchAttentionStatus() { |
| 30 | try { | 31 | try { |
| 31 | const params: postBatchAttentionStatusParams = { | 32 | const params: postBatchAttentionStatusParams = { |
| 32 | - creatorIds: [{ creatorId: this.liveDetailsBean?.rmhInfo?.rmhId ?? '' }] | 33 | + creatorIds: [{ creatorId: this.contentDetailData?.rmhInfo?.rmhId ?? '' }] |
| 33 | } | 34 | } |
| 34 | let data = await MultiPictureDetailViewModel.getBatchAttentionStatus(params) | 35 | let data = await MultiPictureDetailViewModel.getBatchAttentionStatus(params) |
| 35 | this.followStatus = data[0]?.status; | 36 | this.followStatus = data[0]?.status; |
| @@ -51,9 +52,9 @@ export struct PlayerEndView { | @@ -51,9 +52,9 @@ export struct PlayerEndView { | ||
| 51 | } | 52 | } |
| 52 | // TODO:直播间没有携带人民号信息 | 53 | // TODO:直播间没有携带人民号信息 |
| 53 | const params2: postInteractAccentionOperateParams = { | 54 | const params2: postInteractAccentionOperateParams = { |
| 54 | - attentionUserType: this.liveDetailsBean?.rmhInfo?.userType || '', //被关注用户类型(1 普通用户 2 视频号 3 矩阵号) | ||
| 55 | - attentionUserId: this.liveDetailsBean?.rmhInfo?.userId || '', // 被关注用户号主id | ||
| 56 | - attentionCreatorId: this.liveDetailsBean?.rmhInfo?.rmhId || '', // 被关注用户号主id | 55 | + attentionUserType: this.contentDetailData?.rmhInfo?.userType || '', //被关注用户类型(1 普通用户 2 视频号 3 矩阵号) |
| 56 | + attentionUserId: this.contentDetailData?.rmhInfo?.userId || '', // 被关注用户号主id | ||
| 57 | + attentionCreatorId: this.contentDetailData?.rmhInfo?.rmhId || '', // 被关注用户号主id | ||
| 57 | status: this.followStatus == '0' ? 1 : 0, | 58 | status: this.followStatus == '0' ? 1 : 0, |
| 58 | } | 59 | } |
| 59 | 60 | ||
| @@ -79,12 +80,12 @@ export struct PlayerEndView { | @@ -79,12 +80,12 @@ export struct PlayerEndView { | ||
| 79 | 80 | ||
| 80 | Stack() { | 81 | Stack() { |
| 81 | Column() { | 82 | Column() { |
| 82 | - Text(this.liveDetailsBean?.rmhInfo?.rmhName) | 83 | + Text(this.contentDetailData?.rmhInfo?.rmhName) |
| 83 | .fontWeight(400) | 84 | .fontWeight(400) |
| 84 | .fontSize(18) | 85 | .fontSize(18) |
| 85 | .fontColor(Color.White) | 86 | .fontColor(Color.White) |
| 86 | .padding({ top: 52 }) | 87 | .padding({ top: 52 }) |
| 87 | - Text(this.liveDetailsBean?.rmhInfo?.rmhDesc || '') | 88 | + Text(this.contentDetailData?.rmhInfo?.rmhDesc || '') |
| 88 | .fontWeight(400) | 89 | .fontWeight(400) |
| 89 | .fontSize(13) | 90 | .fontSize(13) |
| 90 | .fontColor('#B2FFFFFF') | 91 | .fontColor('#B2FFFFFF') |
| @@ -127,7 +128,7 @@ export struct PlayerEndView { | @@ -127,7 +128,7 @@ export struct PlayerEndView { | ||
| 127 | .backgroundColor('#999999') | 128 | .backgroundColor('#999999') |
| 128 | .borderRadius(4) | 129 | .borderRadius(4) |
| 129 | 130 | ||
| 130 | - Image(this.liveDetailsBean?.fullColumnImgUrls[0]?.url) | 131 | + Image(this.contentDetailData?.fullColumnImgUrls[0]?.url) |
| 131 | .width(80) | 132 | .width(80) |
| 132 | .height(80) | 133 | .height(80) |
| 133 | .borderRadius(40) | 134 | .borderRadius(40) |
| 1 | import lottie from '@ohos/lottie' | 1 | import lottie from '@ohos/lottie' |
| 2 | -import { LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index' | 2 | +import { ContentDetailDTO, LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index' |
| 3 | import { LiveFollowComponent, LottieView } from 'wdComponent/Index' | 3 | import { LiveFollowComponent, LottieView } from 'wdComponent/Index' |
| 4 | import { NumberFormatterUtils } from 'wdKit/Index' | 4 | import { NumberFormatterUtils } from 'wdKit/Index' |
| 5 | 5 | ||
| 6 | @Preview | 6 | @Preview |
| 7 | @Component | 7 | @Component |
| 8 | export struct PlayerTitleComponent { | 8 | export struct PlayerTitleComponent { |
| 9 | - @Consume liveDetailsBean: LiveDetailsBean | 9 | +// @Consume liveDetailsBean: LiveDetailsBean |
| 10 | @Consume liveRoomDataBean: LiveRoomDataBean | 10 | @Consume liveRoomDataBean: LiveRoomDataBean |
| 11 | @Consume liveState: string | 11 | @Consume liveState: string |
| 12 | - | 12 | + @Consume contentDetailData: ContentDetailDTO |
| 13 | aboutToDisappear(): void { | 13 | aboutToDisappear(): void { |
| 14 | - if (this.liveDetailsBean.liveInfo?.liveState == 'running') { | 14 | + if (this.contentDetailData.liveInfo?.liveState == 'running') { |
| 15 | lottie.destroy('live_status_wait') | 15 | lottie.destroy('live_status_wait') |
| 16 | } | 16 | } |
| 17 | } | 17 | } |
| @@ -19,7 +19,7 @@ export struct PlayerTitleComponent { | @@ -19,7 +19,7 @@ export struct PlayerTitleComponent { | ||
| 19 | build() { | 19 | build() { |
| 20 | Column() { | 20 | Column() { |
| 21 | Row() { | 21 | Row() { |
| 22 | - Text(this.liveDetailsBean.newsTitle || '') | 22 | + Text(this.contentDetailData.newsTitle || '') |
| 23 | .maxLines(2) | 23 | .maxLines(2) |
| 24 | .fontSize(16) | 24 | .fontSize(16) |
| 25 | .fontWeight(500) | 25 | .fontWeight(500) |
| @@ -42,9 +42,9 @@ export struct PlayerTitleComponent { | @@ -42,9 +42,9 @@ export struct PlayerTitleComponent { | ||
| 42 | 42 | ||
| 43 | @Builder | 43 | @Builder |
| 44 | getLiveStatusView() { | 44 | getLiveStatusView() { |
| 45 | - if (this.liveDetailsBean.rmhInfo?.rmhName) { | 45 | + if (this.contentDetailData.rmhInfo?.rmhName) { |
| 46 | LiveFollowComponent({ | 46 | LiveFollowComponent({ |
| 47 | - rmhInfo: this.liveDetailsBean.rmhInfo | 47 | + rmhInfo: this.contentDetailData.rmhInfo |
| 48 | }).margin({ | 48 | }).margin({ |
| 49 | right: 10 | 49 | right: 10 |
| 50 | }) | 50 | }) |
| 1 | -import { window } from '@kit.ArkUI' | ||
| 2 | -import { NumberFormatterUtils, WindowModel } from 'wdKit/Index' | ||
| 3 | - | ||
| 4 | -import { devicePLSensorManager } from 'wdDetailPlayApi/Index' | ||
| 5 | -import { DateFormatUtil, WDAliPlayerController, WDPlayerController } from 'wdPlayer/Index' | ||
| 6 | -import { LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index' | 1 | +import { DateFormatUtil, WDAliPlayerController } from 'wdPlayer/Index' |
| 2 | +import { LiveRoomDataBean } from 'wdBean/Index' | ||
| 7 | 3 | ||
| 8 | 4 | ||
| 9 | @Component | 5 | @Component |
| 10 | export struct PlayerVideoControlComponent { | 6 | export struct PlayerVideoControlComponent { |
| 11 | private playerController?: WDAliPlayerController | 7 | private playerController?: WDAliPlayerController |
| 12 | - @Consume liveDetailsBean: LiveDetailsBean | ||
| 13 | @Consume liveRoomDataBean: LiveRoomDataBean | 8 | @Consume liveRoomDataBean: LiveRoomDataBean |
| 14 | @State currentTime: string = '' | 9 | @State currentTime: string = '' |
| 15 | @State totalTime: string = '' | 10 | @State totalTime: string = '' |
-
Please register or login to post a comment