王士厅
Showing 25 changed files with 359 additions and 275 deletions
@@ -32,8 +32,8 @@ export class HttpBizUtil { @@ -32,8 +32,8 @@ export class HttpBizUtil {
32 if (!headers) { 32 if (!headers) {
33 headers = new HashMap() 33 headers = new HashMap()
34 } 34 }
35 - headers?.replace('RMRB-X-TOKEN', token)  
36 - headers?.replace('cookie', 'RMRB-X-TOKEN=' + token) 35 + headers?.set('RMRB-X-TOKEN', token)
  36 + headers?.set('cookie', 'RMRB-X-TOKEN=' + token)
37 Logger.debug(TAG, 'get again send: ' + token) 37 Logger.debug(TAG, 'get again send: ' + token)
38 // refreshToken为空场景不处理,直接请求接口。 38 // refreshToken为空场景不处理,直接请求接口。
39 WDHttp.get<T>(url, headers).then((againResDTO: T) => { 39 WDHttp.get<T>(url, headers).then((againResDTO: T) => {
@@ -71,8 +71,8 @@ export class HttpBizUtil { @@ -71,8 +71,8 @@ export class HttpBizUtil {
71 if (!headers) { 71 if (!headers) {
72 headers = new HashMap() 72 headers = new HashMap()
73 } 73 }
74 - headers?.replace('RMRB-X-TOKEN', token)  
75 - headers?.replace('cookie', 'RMRB-X-TOKEN=' + token) 74 + headers?.set('RMRB-X-TOKEN', token)
  75 + headers?.set('cookie', 'RMRB-X-TOKEN=' + token)
76 Logger.debug(TAG, 'post again send: ' + token) 76 Logger.debug(TAG, 'post again send: ' + token)
77 // refreshToken为空场景不处理,直接请求接口。 77 // refreshToken为空场景不处理,直接请求接口。
78 WDHttp.post<T>(url, data, headers).then((againResDTO: T) => { 78 WDHttp.post<T>(url, data, headers).then((againResDTO: T) => {
@@ -21,7 +21,7 @@ export enum HostEnum { @@ -21,7 +21,7 @@ export enum HostEnum {
21 * 环境host管理工具类 21 * 环境host管理工具类
22 */ 22 */
23 export class HostManager { 23 export class HostManager {
24 - private static _hostUrl: HostEnum = HostEnum.HOST_PRODUCT; 24 + private static _hostUrl: HostEnum = HostEnum.HOST_UAT;
25 25
26 static changeHost(host: HostEnum) { 26 static changeHost(host: HostEnum) {
27 HostManager._hostUrl = host; 27 HostManager._hostUrl = host;
@@ -166,6 +166,25 @@ export class ProcessUtils { @@ -166,6 +166,25 @@ export class ProcessUtils {
166 * @param content 166 * @param content
167 * */ 167 * */
168 public static gotoMultiPictureListPage(photoList: PhotoListBean[], swiperIndex?: number) { 168 public static gotoMultiPictureListPage(photoList: PhotoListBean[], swiperIndex?: number) {
  169 + let tempP = [] as PhotoListBean[]
  170 + let relIndex = 0;
  171 + for (let index = 0; index < photoList.length; index++) {
  172 + const element = photoList[index];
  173 + if(!StringUtils.isEmpty(element.picPath)){
  174 + relIndex = relIndex+1
  175 + }
  176 + }
  177 + tempP.length = relIndex
  178 + relIndex = 0
  179 + for (let index = 0; index < photoList.length; index++) {
  180 + const element = photoList[index];
  181 + if(!StringUtils.isEmpty(element.picPath)){
  182 + tempP[relIndex] = element
  183 + relIndex = relIndex+1
  184 + }
  185 + }
  186 + photoList.length = tempP.length
  187 + photoList = tempP
169 let taskAction: Action = { 188 let taskAction: Action = {
170 type: 'JUMP_DETAIL_PAGE', 189 type: 'JUMP_DETAIL_PAGE',
171 params: { 190 params: {
@@ -152,11 +152,9 @@ export struct SingleColumn999Component { @@ -152,11 +152,9 @@ export struct SingleColumn999Component {
152 scrollBackward: NestedScrollMode.SELF_FIRST 152 scrollBackward: NestedScrollMode.SELF_FIRST
153 }) 153 })
154 } else { 154 } else {
155 - if (this.compListItem && this.compListItem?.operDataList) {  
156 EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoListContent}) 155 EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoListContent})
157 } 156 }
158 } 157 }
159 - }  
160 158
161 // public buildLanes(): number { 159 // public buildLanes(): number {
162 // return new BreakPointType({ xs: 1, sm: 1, md: 2, lg: 3 }).getValue(this.currentBreakpoint) 160 // return new BreakPointType({ xs: 1, sm: 1, md: 2, lg: 3 }).getValue(this.currentBreakpoint)
@@ -176,6 +174,5 @@ export struct SingleColumn999Component { @@ -176,6 +174,5 @@ export struct SingleColumn999Component {
176 index: index, 174 index: index,
177 }) 175 })
178 } 176 }
179 -  
180 } 177 }
181 } 178 }
@@ -107,7 +107,7 @@ export struct Card6Component { @@ -107,7 +107,7 @@ export struct Card6Component {
107 } 107 }
108 108
109 .alignItems(HorizontalAlign.Start) 109 .alignItems(HorizontalAlign.Start)
110 - .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78: 156) 110 + .height(78)
111 111
112 112
113 .justifyContent(FlexAlign.SpaceBetween) 113 .justifyContent(FlexAlign.SpaceBetween)
@@ -119,7 +119,7 @@ export struct Card6Component { @@ -119,7 +119,7 @@ export struct Card6Component {
119 .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5) 119 .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5)
120 .borderRadius(5) 120 .borderRadius(5)
121 .aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4) 121 .aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4)
122 - .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78 : 156) 122 + .height(78)
123 CardMediaInfo({ contentDTO: this.contentDTO }) 123 CardMediaInfo({ contentDTO: this.contentDTO })
124 } 124 }
125 125
@@ -138,7 +138,7 @@ export struct Card6Component { @@ -138,7 +138,7 @@ export struct Card6Component {
138 }) 138 })
139 139
140 .width(CommonConstants.FULL_WIDTH) 140 .width(CommonConstants.FULL_WIDTH)
141 - // .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 107 : 217) 141 + .height(106)
142 .justifyContent(FlexAlign.SpaceBetween) 142 .justifyContent(FlexAlign.SpaceBetween)
143 .alignItems(VerticalAlign.Top) 143 .alignItems(VerticalAlign.Top)
144 } 144 }
@@ -289,9 +289,9 @@ struct indicatorAnimations { @@ -289,9 +289,9 @@ struct indicatorAnimations {
289 build() { 289 build() {
290 Flex({ alignItems: ItemAlign.End }) { 290 Flex({ alignItems: ItemAlign.End }) {
291 Stack() { 291 Stack() {
292 - Image($r('app.media.swiper_indicator_gray'))  
293 - .width('100%')  
294 - .height(2) 292 + // Image($r('app.media.swiper_indicator_gray'))
  293 + // .width('100%')
  294 + // .height(2)
295 Image($r('app.media.swiper_indicator_white')) 295 Image($r('app.media.swiper_indicator_white'))
296 .width(this.leftW) 296 .width(this.leftW)
297 .height(2) 297 .height(2)
@@ -312,6 +312,7 @@ struct indicatorAnimations { @@ -312,6 +312,7 @@ struct indicatorAnimations {
312 .margin({ 312 .margin({
313 bottom: -2 313 bottom: -2
314 }) 314 })
  315 + .fontFamily('BebasNeue')
315 .flexShrink(0) 316 .flexShrink(0)
316 .animation({ 317 .animation({
317 duration: 300, 318 duration: 300,
@@ -319,9 +320,9 @@ struct indicatorAnimations { @@ -319,9 +320,9 @@ struct indicatorAnimations {
319 playMode: PlayMode.Normal 320 playMode: PlayMode.Normal
320 }) 321 })
321 Stack() { 322 Stack() {
322 - Image($r('app.media.swiper_indicator_gray'))  
323 - .width('100%')  
324 - .height(2) 323 + // Image($r('app.media.swiper_indicator_gray'))
  324 + // .width('100%')
  325 + // .height(2)
325 Image($r('app.media.swiper_indicator_white')) 326 Image($r('app.media.swiper_indicator_white'))
326 .width(this.rightW) 327 .width(this.rightW)
327 .height(2) 328 .height(2)
@@ -34,7 +34,7 @@ export struct ZhSingleRow02 { @@ -34,7 +34,7 @@ export struct ZhSingleRow02 {
34 edgeAnimation() { 34 edgeAnimation() {
35 if (this.moreWidth < this.initMoreWidth * 3) { 35 if (this.moreWidth < this.initMoreWidth * 3) {
36 if (!this.moreTips) { 36 if (!this.moreTips) {
37 - this.moreTips = '查看更多'; 37 + this.moreTips = '查看 ';
38 } 38 }
39 this.moreWidth = this.moreWidth + 2 39 this.moreWidth = this.moreWidth + 2
40 } 40 }
@@ -91,7 +91,7 @@ export struct ZhSingleRow02 { @@ -91,7 +91,7 @@ export struct ZhSingleRow02 {
91 .margin({ right: 8 }) 91 .margin({ right: 8 })
92 }) 92 })
93 } 93 }
94 - if (this.compDTO.operDataList.length > 2) { 94 + if (this.compDTO.operDataList.length >= 2) {
95 Column() { 95 Column() {
96 if (this.moreWidth > this.initMoreWidth + 2) { 96 if (this.moreWidth > this.initMoreWidth + 2) {
97 Text(this.moreTips) 97 Text(this.moreTips)
@@ -112,7 +112,7 @@ export struct ZhSingleRow02 { @@ -112,7 +112,7 @@ export struct ZhSingleRow02 {
112 .width(CommonConstants.FULL_WIDTH) 112 .width(CommonConstants.FULL_WIDTH)
113 .height(208) 113 .height(208)
114 .align(Alignment.Start) 114 .align(Alignment.Start)
115 - .scrollable(this.compDTO.operDataList.length > 2 ? ScrollDirection.Horizontal : ScrollDirection.None) 115 + .scrollable(this.compDTO.operDataList.length >= 2 ? ScrollDirection.Horizontal : ScrollDirection.None)
116 .scrollBar(BarState.Off) 116 .scrollBar(BarState.Off)
117 .edgeEffect(EdgeEffect.None) 117 .edgeEffect(EdgeEffect.None)
118 .onReachEnd(() => { 118 .onReachEnd(() => {
@@ -233,6 +233,8 @@ struct CreatorItem { @@ -233,6 +233,8 @@ struct CreatorItem {
233 .textOverflow({overflow: TextOverflow.Ellipsis}) 233 .textOverflow({overflow: TextOverflow.Ellipsis})
234 .width(140) 234 .width(140)
235 .margin({bottom: 8}) 235 .margin({bottom: 8})
  236 + .height(42)
  237 + .lineHeight(21)
236 } 238 }
237 } 239 }
238 .width(156) 240 .width(156)
@@ -10,6 +10,7 @@ import { Logger, ToastUtils } from 'wdKit'; @@ -10,6 +10,7 @@ import { Logger, ToastUtils } from 'wdKit';
10 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 10 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
11 import { SpConstants } from 'wdConstant/Index' 11 import { SpConstants } from 'wdConstant/Index'
12 import { InfomationCardClick } from '../../utils/infomationCardClick'; 12 import { InfomationCardClick } from '../../utils/infomationCardClick';
  13 +import { ParamType, Tracking } from 'wdTracking/Index';
13 14
14 /** 15 /**
15 * 直播预约卡 16 * 直播预约卡
@@ -17,7 +18,17 @@ import { InfomationCardClick } from '../../utils/infomationCardClick'; @@ -17,7 +18,17 @@ import { InfomationCardClick } from '../../utils/infomationCardClick';
17 */ 18 */
18 const TAG = 'Zh_Single_Row-03' 19 const TAG = 'Zh_Single_Row-03'
19 20
20 - 21 +function getLiveState(contentDTO: ContentDTO) {
  22 + if (contentDTO?.liveInfo?.liveState === 'wait') {
  23 + return 'liveSubscribe'
  24 + } else if (contentDTO?.liveInfo?.liveState === 'running') {
  25 + return 'livePlaying'
  26 + } else if (contentDTO?.liveInfo?.liveState === 'end') {
  27 + return 'liveEnd'
  28 + } else {
  29 + return ''
  30 + }
  31 +}
21 interface reserveReqItem { 32 interface reserveReqItem {
22 liveId: string, 33 liveId: string,
23 relationId: string, 34 relationId: string,
@@ -155,7 +166,7 @@ export struct ZhSingleRow03 { @@ -155,7 +166,7 @@ export struct ZhSingleRow03 {
155 this.ItemCard(item) 166 this.ItemCard(item)
156 }) 167 })
157 } 168 }
158 - if (this.compDTO.operDataList.length > 2) { 169 + if (this.compDTO.operDataList.length >= 2) {
159 Column() { 170 Column() {
160 if (this.moreWidth > this.initMoreWidth + 2) { 171 if (this.moreWidth > this.initMoreWidth + 2) {
161 Text(this.moreTips) 172 Text(this.moreTips)
@@ -174,7 +185,7 @@ export struct ZhSingleRow03 { @@ -174,7 +185,7 @@ export struct ZhSingleRow03 {
174 } 185 }
175 } 186 }
176 .align(Alignment.Start) 187 .align(Alignment.Start)
177 - .scrollable(this.compDTO.operDataList.length > 2 ? ScrollDirection.Horizontal : ScrollDirection.None) 188 + .scrollable(this.compDTO.operDataList.length >= 2 ? ScrollDirection.Horizontal : ScrollDirection.None)
178 .scrollBar(BarState.Off) 189 .scrollBar(BarState.Off)
179 .edgeEffect(EdgeEffect.None) 190 .edgeEffect(EdgeEffect.None)
180 .onReachEnd(() => { 191 .onReachEnd(() => {
@@ -208,6 +219,7 @@ export struct ZhSingleRow03 { @@ -208,6 +219,7 @@ export struct ZhSingleRow03 {
208 219
209 @Builder 220 @Builder
210 ItemCard(item: ContentDTO) { 221 ItemCard(item: ContentDTO) {
  222 + if (this.compDTO.operDataList.length >= 2) {
211 Column() { 223 Column() {
212 Row() { 224 Row() {
213 Image(this.loadImg ? item.coverUrl : '') 225 Image(this.loadImg ? item.coverUrl : '')
@@ -215,6 +227,7 @@ export struct ZhSingleRow03 { @@ -215,6 +227,7 @@ export struct ZhSingleRow03 {
215 .height(60) 227 .height(60)
216 .margin({right: 12}) 228 .margin({right: 12})
217 .backgroundColor(0xf5f5f5) 229 .backgroundColor(0xf5f5f5)
  230 + .margin({right: 12})
218 231
219 Text(item.newsTitle) 232 Text(item.newsTitle)
220 .width(154) 233 .width(154)
@@ -273,6 +286,74 @@ export struct ZhSingleRow03 { @@ -273,6 +286,74 @@ export struct ZhSingleRow03 {
273 InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) 286 InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
274 ProcessUtils.processPage(item) 287 ProcessUtils.processPage(item)
275 }) 288 })
  289 + } else {
  290 + Column() {
  291 + Row() {
  292 + Image(this.loadImg ? item.coverUrl : '')
  293 + .width(106)
  294 + .height(60)
  295 + .backgroundColor(0xf5f5f5)
  296 + .margin({right: 12})
  297 +
  298 + Text(item.newsTitle)
  299 + .width(201)
  300 + .height(60)
  301 + .maxLines(3)
  302 + .textOverflow({overflow: TextOverflow.Ellipsis})
  303 + }
  304 + .margin({bottom: 16})
  305 + .justifyContent(FlexAlign.Start)
  306 +
  307 + Row() {
  308 + Flex({justifyContent: FlexAlign.SpaceBetween}){
  309 + Row() {
  310 + Text(this.format(new Date(item.liveInfo.liveStartTime).getTime()))
  311 + .margin({right: 6})
  312 + .fontColor(0x000000)
  313 + .fontSize(13)
  314 + .textAlign(TextAlign.Start)
  315 + Image($r('app.media.timeline_rect'))
  316 + .width(4)
  317 + .height(3)
  318 + .margin({right: 6})
  319 + Text(item.liveInfo.liveStartTime.split(' ')[1].slice(0, 5))
  320 + .margin({right: 6})
  321 + .fontColor(0x000000)
  322 + .fontSize(13)
  323 + Text('开始直播')
  324 + .fontColor(0xC8C8C8)
  325 + .fontSize(13)
  326 + }
  327 +
  328 + Row() {
  329 + Text(this.isReserved(Number(item.objectId)) ? '已预约' : '预约')
  330 + .width(48)
  331 + .height(24)
  332 + .backgroundColor(this.isReserved(Number(item.objectId)) ? 0xffffff : 0xED2800)
  333 + .fontColor(this.isReserved(Number(item.objectId)) ? 0xC8C8C8 : 0xffffff)
  334 + .fontSize(12)
  335 + .textAlign(TextAlign.Center)
  336 + .borderRadius(3)
  337 + .onClick(() => {
  338 + this.bookAndCancel(item.relId, item.objectId, !this.isReserved(Number(item.objectId)))
  339 + })
  340 +
  341 + }
  342 + .margin({top: -5})
  343 + }
  344 +
  345 + }
  346 + }
  347 + .width('100%')
  348 + .height(116)
  349 + .padding({top: 12, bottom: 12, left: 12, right: 12})
  350 + .backgroundColor(0xf9f9f9)
  351 + .margin({right: 8})
  352 + .onClick(() => {
  353 + InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
  354 + ProcessUtils.processPage(item)
  355 + })
  356 + }
276 } 357 }
277 358
278 359
@@ -299,9 +380,6 @@ export struct ZhSingleRow03 { @@ -299,9 +380,6 @@ export struct ZhSingleRow03 {
299 .width(14) 380 .width(14)
300 .height(14) 381 .height(14)
301 } 382 }
302 - .padding({  
303 - right: $r('app.float.card_comp_pagePadding_lf'),  
304 - })  
305 .onClick(() => { 383 .onClick(() => {
306 this.jumpToMore(); 384 this.jumpToMore();
307 }) 385 })
@@ -331,85 +409,4 @@ export struct ZhSingleRow03 { @@ -331,85 +409,4 @@ export struct ZhSingleRow03 {
331 409
332 } 410 }
333 411
334 -@Extend(Text)  
335 -function textOverflowStyle(maxLine: number) {  
336 - .maxLines(maxLine)  
337 - .textOverflow({ overflow: TextOverflow.Ellipsis })  
338 -}  
339 -  
340 -@Component  
341 -struct CreatorItem {  
342 - @Prop item: ContentDTO  
343 - @State rmhIsAttention: number = 0  
344 - @State loadImg: boolean = false;  
345 412
346 - async aboutToAppear(): Promise<void> {  
347 - this.loadImg = await onlyWifiLoadImg();  
348 - }  
349 - build() {  
350 - ListItem() {  
351 - Column() {  
352 - Stack({ alignContent: Alignment.Bottom }) {  
353 - Image(this.loadImg ? this.item.coverUrl : '')  
354 - .backgroundColor(0xf5f5f5)  
355 - .width(156)  
356 - .height(208)  
357 - .border({width: 1})  
358 - .borderRadius(3)  
359 - Row()  
360 - .width(156)  
361 - .height(80)  
362 - .linearGradient({  
363 - direction: GradientDirection.Bottom,  
364 - colors: [['rgba(0, 0, 0, 0.0)', 0.0], ['rgba(0, 0, 0, 0.3)', 1.0]]  
365 - })  
366 - Text(this.item.newsTitle)  
367 - .fontColor(0xffffff)  
368 - .fontSize(14)  
369 - .maxLines(2)  
370 - .textOverflow({overflow: TextOverflow.Ellipsis})  
371 - .width(140)  
372 - .margin({bottom: 8})  
373 - }  
374 - }  
375 - .width(156)  
376 - .height(208)  
377 - .margin({ right: 11 })  
378 - .borderColor($r('app.color.color_EDEDED'))  
379 - .borderRadius($r('app.float.image_border_radius'))  
380 - }  
381 - .onClick((event: ClickEvent) => {  
382 - ProcessUtils.processPage(this.item)  
383 - })  
384 - }  
385 -  
386 - /**  
387 - * 关注号主 TODO 这里后面需要抽离  
388 - */  
389 - handleAccention(item: ContentDTO, status: number) {  
390 - this.rmhIsAttention = this.rmhIsAttention ? 0 : 1  
391 - return  
392 - // 未登录,跳转登录  
393 - if (!HttpUtils.getUserId()) {  
394 - WDRouterRule.jumpWithPage(WDRouterPage.loginPage)  
395 - return  
396 - }  
397 -  
398 - const params: postInteractAccentionOperateParams = {  
399 - attentionUserType: item.rmhInfo?.userType || '', //被关注用户类型(1 普通用户 2 视频号 3 矩阵号)  
400 - attentionUserId: item.rmhInfo?.userId || '', // 被关注用户号主id  
401 - attentionCreatorId: item.rmhInfo?.rmhId || '', // 被关注用户号主id  
402 - // userType: 1,  
403 - // userId: '1', // TODO 用户id需要从本地获取  
404 - status: status,  
405 - }  
406 - PageRepository.postInteractAccentionOperate(params).then(res => {  
407 - console.log(TAG, '关注号主==', JSON.stringify(res.data))  
408 - if (status === 1) {  
409 - this.rmhIsAttention = 0  
410 - } else {  
411 - this.rmhIsAttention = 1  
412 - }  
413 - })  
414 - }  
415 -}  
@@ -88,7 +88,7 @@ export struct PageComponent { @@ -88,7 +88,7 @@ export struct PageComponent {
88 LazyForEach(this.pageModel.compList, (compDTO: CompDTO, compIndex: number) => { 88 LazyForEach(this.pageModel.compList, (compDTO: CompDTO, compIndex: number) => {
89 ListItem() { 89 ListItem() {
90 Column() { 90 Column() {
91 - CompParser({ pageModel: this.pageModel, compDTO: compDTO, compIndex: compIndex }); 91 + CompParser({ pageModel: this.pageModel, compDTO: compDTO, compIndex: compIndex, pageId: this.pageId });
92 } 92 }
93 } 93 }
94 }, 94 },
@@ -45,7 +45,7 @@ export struct TopNavigationComponentNew { @@ -45,7 +45,7 @@ export struct TopNavigationComponentNew {
45 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 45 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
46 @Link _currentNavIndex?: number; 46 @Link _currentNavIndex?: number;
47 // 顶导当前选中/焦点下标 47 // 顶导当前选中/焦点下标
48 - @State currentTopNavSelectedIndex: number = 0; 48 + @State @Watch('updateCurrentTopNavSelectedIndex') currentTopNavSelectedIndex: number = 0;
49 // 顶导数据 49 // 顶导数据
50 @State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = [] 50 @State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = []
51 @State indexSettingChannelId: number = AppStorage.get<number>('indexSettingChannelId') || 2002 51 @State indexSettingChannelId: number = AppStorage.get<number>('indexSettingChannelId') || 2002
@@ -114,20 +114,6 @@ export struct TopNavigationComponentNew { @@ -114,20 +114,6 @@ export struct TopNavigationComponentNew {
114 .onChange((index) => { 114 .onChange((index) => {
115 Logger.info(TAG, `onChange index : ${index}`); 115 Logger.info(TAG, `onChange index : ${index}`);
116 116
117 - // 顶部tab埋点  
118 - if(this.currentBottomNavName === '新闻') {  
119 - const tab = this.myChannelList[index]  
120 - Logger.info(TAG, `顶部tab : ${JSON.stringify(tab)}`);  
121 -  
122 - const params: ParamType = {  
123 - "pageName": tab.name,  
124 - "tabName": tab.name,  
125 - "pageId": tab.pageId,  
126 - }  
127 - Tracking.event("home_page_tab_click ", params)  
128 - }  
129 -  
130 -  
131 if (this.isBroadcastByIndex(index)) { 117 if (this.isBroadcastByIndex(index)) {
132 // 跳转到播报页面 118 // 跳转到播报页面
133 ProcessUtils.gotoBroadcastPage(this.myChannelList[index].pageId) 119 ProcessUtils.gotoBroadcastPage(this.myChannelList[index].pageId)
@@ -217,6 +203,7 @@ export struct TopNavigationComponentNew { @@ -217,6 +203,7 @@ export struct TopNavigationComponentNew {
217 moreChannelList: $moreChannelList, 203 moreChannelList: $moreChannelList,
218 localChannelList: $localChannelList, 204 localChannelList: $localChannelList,
219 changeTab: (index) => { 205 changeTab: (index) => {
  206 +
220 this.changePage(index) 207 this.changePage(index)
221 } 208 }
222 }) 209 })
@@ -496,6 +483,32 @@ export struct TopNavigationComponentNew { @@ -496,6 +483,32 @@ export struct TopNavigationComponentNew {
496 `onTopNavigationDataUpdated currentTopNavIndex: ${this.currentTopNavSelectedIndex},topNavList.length:${this.topNavList.length}`); 483 `onTopNavigationDataUpdated currentTopNavIndex: ${this.currentTopNavSelectedIndex},topNavList.length:${this.topNavList.length}`);
497 } 484 }
498 485
  486 + updateCurrentTopNavSelectedIndex() {
  487 + Logger.info(TAG, `currentTopNavSelectedIndex : ${this.currentTopNavSelectedIndex}、${this.currentBottomNavName}`);
  488 +
  489 + // 顶部tab埋点
  490 + if(this.currentBottomNavName === '新闻') {
  491 + const tab = this.myChannelList[this.currentTopNavSelectedIndex]
  492 + Logger.info(TAG, `新闻tab埋点: ${JSON.stringify(tab)}`);
  493 +
  494 + const params: ParamType = {
  495 + "pageName": tab.name,
  496 + "tabName": tab.name,
  497 + "pageId": tab.pageId,
  498 + }
  499 + Tracking.event("home_page_tab_click ", params)
  500 + } else if(this.currentBottomNavName === '人民号') {
  501 + const tab = this.topNavList[this.currentTopNavSelectedIndex]
  502 + Logger.info(TAG, `人民号tab埋点: ${JSON.stringify(tab)}`);
  503 +
  504 + const params: ParamType = {
  505 + "pageName": tab.name,
  506 + "tabName": tab.name,
  507 + "pageId": tab.pageId,
  508 + }
  509 + Tracking.event("People_account_page_tab_click", params)
  510 + }
  511 + }
499 onAutoRefresh() { 512 onAutoRefresh() {
500 if (this.bottomNavIndex != this._currentNavIndex) { 513 if (this.bottomNavIndex != this._currentNavIndex) {
501 return 514 return
@@ -104,7 +104,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -104,7 +104,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
104 }) 104 })
105 105
106 }.justifyContent(FlexAlign.SpaceBetween) 106 }.justifyContent(FlexAlign.SpaceBetween)
107 - .padding({ left: 16, right: 16 }) 107 + // .padding({ left: 16, right: 16 })
108 .margin({ top: 8, bottom: 8 }) 108 .margin({ top: 8, bottom: 8 })
109 .width('100%') 109 .width('100%')
110 110
@@ -130,8 +130,10 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -130,8 +130,10 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
130 .margin({ top: 8 }) 130 .margin({ top: 8 })
131 .width(150) 131 .width(150)
132 .lineHeight(19) 132 .lineHeight(19)
  133 + .height(42)
  134 + .lineHeight(21)
133 } 135 }
134 - .padding({ left: (index == 0) ? 16 : 0, right: 16 }) 136 + .padding({ right: 16 })
135 // .offset({x:16}) 137 // .offset({x:16})
136 .onClick(() => { 138 .onClick(() => {
137 InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) 139 InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
@@ -187,12 +189,12 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -187,12 +189,12 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
187 // .margin({left:16,right:16}) 189 // .margin({left:16,right:16})
188 190
189 } 191 }
190 - .width("100%") 192 + // .width("100%")
191 .padding({ 193 .padding({
192 - top: 14,  
193 - left: 0,  
194 - right: 0,  
195 - bottom: 14 194 + left: $r('app.float.card_comp_pagePadding_lf'),
  195 + right: $r('app.float.card_comp_pagePadding_lf'),
  196 + top: $r('app.float.card_comp_pagePadding_tb'),
  197 + bottom: $r('app.float.card_comp_pagePadding_tb')
196 }) 198 })
197 .backgroundColor($r("app.color.white")) 199 .backgroundColor($r("app.color.white"))
198 // .backgroundColor($r("app.color.color_FE4B05")) 200 // .backgroundColor($r("app.color.color_FE4B05"))
@@ -119,7 +119,7 @@ export struct LiveHorizontalCardComponent { @@ -119,7 +119,7 @@ export struct LiveHorizontalCardComponent {
119 }) 119 })
120 } 120 }
121 }.justifyContent(FlexAlign.SpaceBetween) 121 }.justifyContent(FlexAlign.SpaceBetween)
122 - .padding({ left: 16, right: 16 }) 122 + // .padding({ left: 16, right: 16 })
123 .margin({ top: 8, bottom: 8 }) 123 .margin({ top: 8, bottom: 8 })
124 .width(CommonConstants.FULL_WIDTH) 124 .width(CommonConstants.FULL_WIDTH)
125 125
@@ -152,8 +152,10 @@ export struct LiveHorizontalCardComponent { @@ -152,8 +152,10 @@ export struct LiveHorizontalCardComponent {
152 .textAlign(TextAlign.Start) 152 .textAlign(TextAlign.Start)
153 .margin({ top: 8 }) 153 .margin({ top: 8 })
154 .width(this.compDTO.operDataList.length == 2 ? 210 : 150) 154 .width(this.compDTO.operDataList.length == 2 ? 210 : 150)
  155 + .height(42)
  156 + .lineHeight(21)
155 } 157 }
156 - .padding({ left: (index == 0) ? 16 : 0, right: 16 }) 158 + .padding({ right: 16 })
157 .onClick(() => { 159 .onClick(() => {
158 InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) 160 InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
159 if (item.objectType != '0') { 161 if (item.objectType != '0') {
@@ -163,7 +165,7 @@ export struct LiveHorizontalCardComponent { @@ -163,7 +165,7 @@ export struct LiveHorizontalCardComponent {
163 }) 165 })
164 }) 166 })
165 } 167 }
166 - if (this.compDTO.operDataList.length > 2) { 168 + if (this.compDTO.operDataList.length >= 2) {
167 Column() { 169 Column() {
168 if (this.moreWidth > this.initMoreWidth + 2) { 170 if (this.moreWidth > this.initMoreWidth + 2) {
169 Text(this.moreTips) 171 Text(this.moreTips)
@@ -182,7 +184,7 @@ export struct LiveHorizontalCardComponent { @@ -182,7 +184,7 @@ export struct LiveHorizontalCardComponent {
182 } 184 }
183 } 185 }
184 .align(Alignment.Start) 186 .align(Alignment.Start)
185 - .scrollable(this.compDTO.operDataList.length > 2 ? ScrollDirection.Horizontal : ScrollDirection.None) 187 + .scrollable(this.compDTO.operDataList.length >= 2 ? ScrollDirection.Horizontal : ScrollDirection.None)
186 .scrollBar(BarState.Off) 188 .scrollBar(BarState.Off)
187 .edgeEffect(EdgeEffect.None) 189 .edgeEffect(EdgeEffect.None)
188 .onReachEnd(() => { 190 .onReachEnd(() => {
@@ -211,9 +213,12 @@ export struct LiveHorizontalCardComponent { @@ -211,9 +213,12 @@ export struct LiveHorizontalCardComponent {
211 LiveHorizontalCardForOneComponent({ contentDTO: this.compDTO.operDataList[0] }) 213 LiveHorizontalCardForOneComponent({ contentDTO: this.compDTO.operDataList[0] })
212 } 214 }
213 } 215 }
214 - .width(CommonConstants.FULL_WIDTH) 216 + // .width(CommonConstants.FULL_WIDTH)
215 .padding({ 217 .padding({
216 - top: 14, 218 + left: $r('app.float.card_comp_pagePadding_lf'),
  219 + right: $r('app.float.card_comp_pagePadding_lf'),
  220 + top: $r('app.float.card_comp_pagePadding_tb'),
  221 + bottom: $r('app.float.card_comp_pagePadding_tb')
217 }) 222 })
218 .backgroundColor($r("app.color.white")) 223 .backgroundColor($r("app.color.white"))
219 } 224 }
@@ -4,9 +4,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; @@ -4,9 +4,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
4 import { SpConstants } from 'wdConstant/Index'; 4 import { SpConstants } from 'wdConstant/Index';
5 import measure from '@ohos.measure' 5 import measure from '@ohos.measure'
6 import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index'; 6 import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index';
7 -import {  
8 - ContentDetailDTO,  
9 -} from 'wdBean'; 7 +import { ContentDetailDTO, } from 'wdBean';
10 import { LiveModel } from '../../viewmodel/LiveModel'; 8 import { LiveModel } from '../../viewmodel/LiveModel';
11 import { HttpUtils } from 'wdNetwork/Index'; 9 import { HttpUtils } from 'wdNetwork/Index';
12 import vibrator from '@ohos.vibrator'; 10 import vibrator from '@ohos.vibrator';
@@ -47,6 +45,7 @@ export struct LiveLikeComponent { @@ -47,6 +45,7 @@ export struct LiveLikeComponent {
47 this.onDetailUpdated() 45 this.onDetailUpdated()
48 this.contentTrackingDict() 46 this.contentTrackingDict()
49 } 47 }
  48 +
50 async onDetailUpdated() { 49 async onDetailUpdated() {
51 // 2:竖屏直播页 4:横屏直播页 50 // 2:竖屏直播页 4:横屏直播页
52 // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福 51 // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福
@@ -61,13 +60,13 @@ export struct LiveLikeComponent { @@ -61,13 +60,13 @@ export struct LiveLikeComponent {
61 this.getLikeCount() 60 this.getLikeCount()
62 } 61 }
63 62
64 - contentTrackingDict(){ 63 + contentTrackingDict() {
65 this.pageParam = { 64 this.pageParam = {
66 'contentType': `${this.contentDetailData.newsType}`, 65 'contentType': `${this.contentDetailData.newsType}`,
67 'contentId': `${this.contentDetailData.newsId}`, 66 'contentId': `${this.contentDetailData.newsId}`,
68 'contentName': `${this.contentDetailData.newsTitle || ''}`, 67 'contentName': `${this.contentDetailData.newsTitle || ''}`,
69 } 68 }
70 - if(this.contentDetailData.newsType == 2) { 69 + if (this.contentDetailData.newsType == 2) {
71 this.PageName = TrackConstants.PageName.Live_Detail // 直播 70 this.PageName = TrackConstants.PageName.Live_Detail // 直播
72 } 71 }
73 } 72 }
@@ -118,7 +117,9 @@ export struct LiveLikeComponent { @@ -118,7 +117,9 @@ export struct LiveLikeComponent {
118 .width(36) 117 .width(36)
119 .height(36) 118 .height(36)
120 .borderRadius(18) 119 .borderRadius(18)
121 - .backgroundColor((this.pageComponentType === 4 || this.pageComponentType === 2) ? '#4D000000' : this.pageComponentType === 8 ? Color.Transparent : '#FFF5F5F5') 120 + .backgroundColor((this.pageComponentType === 4 || this.pageComponentType === 2) ? '#4D000000' :
  121 + this.pageComponentType === 8 ? Color.Transparent : '#FFF5F5F5')
  122 +
122 if (this.likeCount != 0) { 123 if (this.likeCount != 0) {
123 RelativeContainer() { 124 RelativeContainer() {
124 Image(this.styleType == 1 ? $r('app.media.comment_icon_number_bg') : $r('app.media.ic_like_back_Select')) 125 Image(this.styleType == 1 ? $r('app.media.comment_icon_number_bg') : $r('app.media.ic_like_back_Select'))
@@ -211,6 +212,16 @@ export struct LiveLikeComponent { @@ -211,6 +212,16 @@ export struct LiveLikeComponent {
211 console.error(`An unexpected error occurred. Code: ${e.code}, message: ${e.message}`); 212 console.error(`An unexpected error occurred. Code: ${e.code}, message: ${e.message}`);
212 } 213 }
213 this.likeCount++ 214 this.likeCount++
  215 + this.likeStatus = true
  216 +
  217 + //内容点赞、取消点赞Tracking 1点赞 0取消点赞
  218 + TrackingContent.like(true, TrackConstants.PageName.DynamicDetail, TrackConstants.PageName.DynamicDetail,
  219 + {
  220 + 'contentType': `${this.contentDetailData.newsType}`,
  221 + 'contentId': `${this.contentDetailData.newsId}`,
  222 + 'contentName': `${this.contentDetailData.newsTitle || ''}`,
  223 + })
  224 +
214 225
215 }).catch(() => { 226 }).catch(() => {
216 }) 227 })
@@ -245,6 +256,7 @@ export struct LiveLikeComponent { @@ -245,6 +256,7 @@ export struct LiveLikeComponent {
245 this.likeCount = 0 256 this.likeCount = 0
246 }) 257 })
247 } 258 }
  259 +
248 private getMeasureText(text: string) { 260 private getMeasureText(text: string) {
249 let width = measure.measureText({ 261 let width = measure.measureText({
250 textContent: text, 262 textContent: text,
@@ -23,7 +23,7 @@ const TAG = 'DetailPlayLiveCommon' @@ -23,7 +23,7 @@ const TAG = 'DetailPlayLiveCommon'
23 @Component 23 @Component
24 export struct DetailPlayLiveCommon { 24 export struct DetailPlayLiveCommon {
25 private liveViewModel: LiveViewModel = new LiveViewModel() 25 private liveViewModel: LiveViewModel = new LiveViewModel()
26 - pageShowTime:number = 0; 26 + pageShowTime: number = 0;
27 @Provide relId: string = '' 27 @Provide relId: string = ''
28 @Provide contentId: string = '' 28 @Provide contentId: string = ''
29 @Provide relType: string = '' 29 @Provide relType: string = ''
@@ -38,7 +38,6 @@ export struct DetailPlayLiveCommon { @@ -38,7 +38,6 @@ export struct DetailPlayLiveCommon {
38 @Provide publishCommentModel: publishCommentModel = new publishCommentModel() 38 @Provide publishCommentModel: publishCommentModel = new publishCommentModel()
39 // 横屏或竖屏 general-竖屏,news-横屏 39 // 横屏或竖屏 general-竖屏,news-横屏
40 @State liveLandscape: string = '' 40 @State liveLandscape: string = ''
41 -  
42 @State isLoading: boolean = false 41 @State isLoading: boolean = false
43 42
44 async aboutToAppear(): Promise<void> { 43 async aboutToAppear(): Promise<void> {
@@ -51,12 +50,6 @@ export struct DetailPlayLiveCommon { @@ -51,12 +50,6 @@ export struct DetailPlayLiveCommon {
51 50
52 } 51 }
53 52
54 - aboutToDisappear(): void {  
55 - console.error("XXXXZZZZ", '---aboutToDisappear------------')  
56 -  
57 - }  
58 -  
59 -  
60 build() { 53 build() {
61 Column() { 54 Column() {
62 // 直播预约或横屏直播统一进横屏直播 55 // 直播预约或横屏直播统一进横屏直播
@@ -66,7 +59,7 @@ export struct DetailPlayLiveCommon { @@ -66,7 +59,7 @@ export struct DetailPlayLiveCommon {
66 } else if (this.liveLandscape === 'general') { 59 } else if (this.liveLandscape === 'general') {
67 // 沉浸式直播 60 // 沉浸式直播
68 DetailPlayVLivePage() 61 DetailPlayVLivePage()
69 - }else { 62 + } else {
70 PictureLoading().visibility(this.isLoading ? Visibility.None : Visibility.Visible) 63 PictureLoading().visibility(this.isLoading ? Visibility.None : Visibility.Visible)
71 } 64 }
72 } 65 }
@@ -86,20 +79,16 @@ export struct DetailPlayLiveCommon { @@ -86,20 +79,16 @@ export struct DetailPlayLiveCommon {
86 if (data) { 79 if (data) {
87 let detailData = data[0] 80 let detailData = data[0]
88 //人民号类型单独获取直播地址 81 //人民号类型单独获取直播地址
89 - if (detailData.rmhPlatform === 1) {  
90 - 82 + if (detailData.rmhPlatform === 1 && detailData.liveInfo?.liveState === 'running') { //
91 let vliveId = detailData.liveInfo.vlive[0].vliveId as string 83 let vliveId = detailData.liveInfo.vlive[0].vliveId as string
92 - console.error(TAG, 'vliveId==' + vliveId)  
93 let pullStreamAddressData = await this.liveViewModel.getLiveRoomPullAddress(vliveId) as GetPullAddressBean 84 let pullStreamAddressData = await this.liveViewModel.getLiveRoomPullAddress(vliveId) as GetPullAddressBean
94 -  
95 if (pullStreamAddressData) { 85 if (pullStreamAddressData) {
96 - console.log(TAG, ' GetPullAddressBean:', JSON.stringify(pullStreamAddressData)) 86 + // console.log(TAG, ' GetPullAddressBean:', JSON.stringify(pullStreamAddressData))
97 let m3u8uUrl = pullStreamAddressData.transCode[0].m3u8Url 87 let m3u8uUrl = pullStreamAddressData.transCode[0].m3u8Url
98 detailData.liveInfo.vlive[0].liveUrl = m3u8uUrl 88 detailData.liveInfo.vlive[0].liveUrl = m3u8uUrl
99 this.playUrl = m3u8uUrl 89 this.playUrl = m3u8uUrl
100 - console.log(TAG, ' GetPullAddressBean:', m3u8uUrl) 90 + // console.log(TAG, ' GetPullAddressBean:', m3u8uUrl)
101 } 91 }
102 -  
103 } 92 }
104 93
105 this.liveLandscape = 94 this.liveLandscape =
@@ -133,7 +122,7 @@ export struct DetailPlayLiveCommon { @@ -133,7 +122,7 @@ export struct DetailPlayLiveCommon {
133 ToastUtils.shortToast('内容不存在') 122 ToastUtils.shortToast('内容不存在')
134 router.back() 123 router.back()
135 } 124 }
136 - },()=>{ 125 + }, () => {
137 this.isLoading 126 this.isLoading
138 ToastUtils.shortToast('内容不存在') 127 ToastUtils.shortToast('内容不存在')
139 router.back() 128 router.back()
@@ -141,8 +130,6 @@ export struct DetailPlayLiveCommon { @@ -141,8 +130,6 @@ export struct DetailPlayLiveCommon {
141 }) 130 })
142 } 131 }
143 132
144 -  
145 -  
146 onPageShow() { 133 onPageShow() {
147 this.pageShow = Math.random() 134 this.pageShow = Math.random()
148 Logger.info(TAG, 'onPageShow') 135 Logger.info(TAG, 'onPageShow')
@@ -152,10 +139,10 @@ export struct DetailPlayLiveCommon { @@ -152,10 +139,10 @@ export struct DetailPlayLiveCommon {
152 onPageHide() { 139 onPageHide() {
153 this.pageHide = Math.random() 140 this.pageHide = Math.random()
154 Logger.info(TAG, 'onPageHide') 141 Logger.info(TAG, 'onPageHide')
155 - console.error("XXXXZZZZ", '---onPageHide------------')  
156 //页面浏览 142 //页面浏览
157 - TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Live_Detail,TrackConstants.PageName.Live_Detail  
158 - ,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000)) 143 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Live_Detail,
  144 + TrackConstants.PageName.Live_Detail
  145 + , Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime) / 1000))
159 146
160 } 147 }
161 148
@@ -9,6 +9,7 @@ import { router, window } from '@kit.ArkUI'; @@ -9,6 +9,7 @@ import { router, window } from '@kit.ArkUI';
9 import { WDAliPlayerController } from 'wdPlayer/Index'; 9 import { WDAliPlayerController } from 'wdPlayer/Index';
10 import { LiveOperRowListView } from 'wdComponent'; 10 import { LiveOperRowListView } from 'wdComponent';
11 import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel'; 11 import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel';
  12 +import { TrackConstants, TrackingContent } from 'wdTracking/Index';
12 13
13 let TAG: string = 'DetailPlayLivePage'; 14 let TAG: string = 'DetailPlayLivePage';
14 15
@@ -34,7 +35,6 @@ export struct DetailPlayLivePage { @@ -34,7 +35,6 @@ export struct DetailPlayLivePage {
34 @Consume @Watch('onBackPressCus') pageBackPress: number 35 @Consume @Watch('onBackPressCus') pageBackPress: number
35 @Consume contentDetailData: ContentDetailDTO 36 @Consume contentDetailData: ContentDetailDTO
36 @Consume publishCommentModel: publishCommentModel 37 @Consume publishCommentModel: publishCommentModel
37 -  
38 // 尽量不要动属性。用来作为输入了评论之后,值传递 38 // 尽量不要动属性。用来作为输入了评论之后,值传递
39 @State lastInputedLiveComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的直播间消息 39 @State lastInputedLiveComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的直播间消息
40 @State lastInputedChatComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的大家聊消息 40 @State lastInputedChatComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的大家聊消息
@@ -69,10 +69,12 @@ export struct DetailPlayLivePage { @@ -69,10 +69,12 @@ export struct DetailPlayLivePage {
69 TopPlayComponent({ playerController: this.playerController }) 69 TopPlayComponent({ playerController: this.playerController })
70 .height(this.displayDirection == DisplayDirection.VERTICAL ? 211 : '100%') 70 .height(this.displayDirection == DisplayDirection.VERTICAL ? 211 : '100%')
71 71
72 - TabComponent({ tabs: this.tabs, 72 + TabComponent({
  73 + tabs: this.tabs,
73 changeToTab: this.changeToTab, 74 changeToTab: this.changeToTab,
74 lastInputedLiveComment: this.lastInputedLiveComment, 75 lastInputedLiveComment: this.lastInputedLiveComment,
75 - lastInputedChatComment: this.lastInputedChatComment}) 76 + lastInputedChatComment: this.lastInputedChatComment
  77 + })
76 .layoutWeight(1) 78 .layoutWeight(1)
77 .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) 79 .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
78 80
@@ -95,6 +97,13 @@ export struct DetailPlayLivePage { @@ -95,6 +97,13 @@ export struct DetailPlayLivePage {
95 } else { 97 } else {
96 this.lastInputedChatComment = result 98 this.lastInputedChatComment = result
97 } 99 }
  100 + // 发布评论埋点
  101 + TrackingContent.commentClick(TrackConstants.PageName.DynamicDetail, TrackConstants.PageName.DynamicDetail,
  102 + {
  103 + 'contentType': `${this.contentDetailData.newsType}`,
  104 + 'contentId': `${this.contentDetailData.newsId}`,
  105 + 'contentName': `${this.contentDetailData.newsTitle || ''}`,
  106 + });
98 }) 107 })
99 } 108 }
100 } 109 }
@@ -7,6 +7,7 @@ import { WDAliPlayerController } from 'wdPlayer/Index'; @@ -7,6 +7,7 @@ import { WDAliPlayerController } from 'wdPlayer/Index';
7 import { DisplayDirection } from 'wdConstant/Index'; 7 import { DisplayDirection } from 'wdConstant/Index';
8 import { LiveEmptyComponent, WDLiveViewDefaultType } from 'wdComponent/Index'; 8 import { LiveEmptyComponent, WDLiveViewDefaultType } from 'wdComponent/Index';
9 import { PlayerEndView } from '../widgets/vertical/PlayerEndView'; 9 import { PlayerEndView } from '../widgets/vertical/PlayerEndView';
  10 +import { TrackConstants, TrackingButton } from 'wdTracking/Index';
10 11
11 const storage = LocalStorage.getShared(); 12 const storage = LocalStorage.getShared();
12 const TAG = 'DetailPlayVLivePage' 13 const TAG = 'DetailPlayVLivePage'
@@ -96,6 +97,9 @@ export struct DetailPlayVLivePage { @@ -96,6 +97,9 @@ export struct DetailPlayVLivePage {
96 .markAnchor({ x: 56, y: this.bottomSafeHeight }) 97 .markAnchor({ x: 56, y: this.bottomSafeHeight })
97 .onClick(() => { 98 .onClick(() => {
98 this.swiperController.showNext() 99 this.swiperController.showNext()
  100 + // 埋点
  101 + TrackingButton.click('clearScreen', TrackConstants.PageName.Live_Detail,
  102 + TrackConstants.PageName.Live_Detail)
99 }) 103 })
100 104
101 } 105 }
@@ -116,7 +120,5 @@ export struct DetailPlayVLivePage { @@ -116,7 +120,5 @@ export struct DetailPlayVLivePage {
116 console.error(TAG, 'getLiveDetails catch', message) 120 console.error(TAG, 'getLiveDetails catch', message)
117 }) 121 })
118 } 122 }
119 -  
120 -  
121 } 123 }
122 124
1 -import { ContentDetailDTO, 1 +import {
  2 + ContentDetailDTO,
2 GetPullAddressBean, 3 GetPullAddressBean,
3 - LiveDetailsBean, LiveRoomBean, LiveRoomDataBean, 4 + LiveDetailsBean,
  5 + LiveRoomBean,
  6 + LiveRoomDataBean,
4 LiveRoomItemBean, 7 LiveRoomItemBean,
5 - ValueType } from 'wdBean/Index' 8 + ValueType
  9 +} from 'wdBean/Index'
6 import { ContentDetailRequest } from 'wdDetailPlayApi/Index' 10 import { ContentDetailRequest } from 'wdDetailPlayApi/Index'
7 import { Logger } from 'wdKit/Index' 11 import { Logger } from 'wdKit/Index'
8 import { ToastUtils } from 'wdKit/src/main/ets/utils/ToastUtils' 12 import { ToastUtils } from 'wdKit/src/main/ets/utils/ToastUtils'
@@ -32,16 +36,25 @@ export class LiveViewModel { @@ -32,16 +36,25 @@ export class LiveViewModel {
32 36
33 } 37 }
34 38
35 - async getLiveRoomPullAddress(vliveId:string) : Promise<GetPullAddressBean>{ 39 + /**
  40 + * 获取直播间的拉流地址
  41 + * @param vliveId
  42 + * @returns
  43 + */
  44 + async getLiveRoomPullAddress(vliveId: string): Promise<GetPullAddressBean | null> {
36 45
37 - return new Promise<GetPullAddressBean>((success, fail) => {  
38 - ContentDetailRequest.getLiveRoomPullStream(vliveId).then(async (resDTO: ResponseDTO<GetPullAddressBean>) => { 46 + return new Promise<GetPullAddressBean | null>((success, fail) => {
  47 + ContentDetailRequest.getLiveRoomPullStream(vliveId)
  48 + .then(async (resDTO: ResponseDTO<GetPullAddressBean>) => {
39 console.log(TAG, 'getContentDetail:', JSON.stringify(resDTO.data)) 49 console.log(TAG, 'getContentDetail:', JSON.stringify(resDTO.data))
40 if (resDTO.data) { 50 if (resDTO.data) {
41 success(resDTO.data) 51 success(resDTO.data)
  52 + } else {
  53 + success(null)
42 } 54 }
43 - }).catch(() => {  
44 - fail("数据为空") 55 + })
  56 + .catch(() => {
  57 + success(null)
45 }) 58 })
46 59
47 }) 60 })
@@ -102,6 +115,7 @@ export class LiveViewModel { @@ -102,6 +115,7 @@ export class LiveViewModel {
102 }) 115 })
103 }) 116 })
104 } 117 }
  118 +
105 // 直播详情-C端点赞接口 119 // 直播详情-C端点赞接口
106 getLiveRoomNumberLike(liveId: string, number: number, deviceId: string | number) { 120 getLiveRoomNumberLike(liveId: string, number: number, deviceId: string | number) {
107 return new Promise<number>((success, fail) => { 121 return new Promise<number>((success, fail) => {
@@ -112,6 +126,7 @@ export class LiveViewModel { @@ -112,6 +126,7 @@ export class LiveViewModel {
112 }) 126 })
113 }) 127 })
114 } 128 }
  129 +
115 // 直播详情-查询是否点赞接口 130 // 直播详情-查询是否点赞接口
116 getLiveLike(liveId: string, userId: ValueType, deviceId: string | number) { 131 getLiveLike(liveId: string, userId: ValueType, deviceId: string | number) {
117 return new Promise<boolean>((success, fail) => { 132 return new Promise<boolean>((success, fail) => {
@@ -56,7 +56,7 @@ export struct PlayUIComponent { @@ -56,7 +56,7 @@ export struct PlayUIComponent {
56 /* 56 /*
57 初始话播放器设置 57 初始话播放器设置
58 */ 58 */
59 - initPlayerSet(){ 59 + initPlayerSet() {
60 60
61 //播放进度监听 61 //播放进度监听
62 if (this.playerController) { 62 if (this.playerController) {
@@ -280,7 +280,12 @@ export struct PlayUIComponent { @@ -280,7 +280,12 @@ export struct PlayUIComponent {
280 } 280 }
281 281
282 // 进度条 282 // 进度条
  283 + if (this.contentDetailData.liveInfo?.liveState == 'running') {
  284 + Blank()
  285 + } else {
283 this.playProgressView() 286 this.playProgressView()
  287 + }
  288 +
284 // 总的播放时间 289 // 总的播放时间
285 if (this.contentDetailData?.liveInfo?.liveState != 'running' || this.contentDetailData.showTime) { 290 if (this.contentDetailData?.liveInfo?.liveState != 'running' || this.contentDetailData.showTime) {
286 Text(this.totalTime) 291 Text(this.totalTime)
@@ -32,7 +32,6 @@ export struct TopPlayComponent { @@ -32,7 +32,6 @@ export struct TopPlayComponent {
32 @Provide playSourceState: number = 0 32 @Provide playSourceState: number = 0
33 private playUrl: string = "" 33 private playUrl: string = ""
34 private xComponentIsLoaded: boolean = false 34 private xComponentIsLoaded: boolean = false
35 - pageParam: ParamType = {}  
36 35
37 aboutToAppear(): void { 36 aboutToAppear(): void {
38 if (this.playerController) { 37 if (this.playerController) {
@@ -148,16 +147,12 @@ export struct TopPlayComponent { @@ -148,16 +147,12 @@ export struct TopPlayComponent {
148 Logger.debug(TAG, "播放地址为空") 147 Logger.debug(TAG, "播放地址为空")
149 return 148 return
150 } 149 }
151 - this.contentTrackingDict()  
152 - this.playerController?.firstPlay(this.playUrl, TrackConstants.PageName.Live_Detail, this.pageParam);  
153 - }  
154 150
155 - contentTrackingDict() {  
156 - this.pageParam = { 151 + this.playerController?.firstPlay(this.playUrl, TrackConstants.PageName.Live_Detail, {
157 'contentType': `${this.contentDetailData.newsType}`, 152 'contentType': `${this.contentDetailData.newsType}`,
158 'contentId': `${this.contentDetailData.newsId}`, 153 'contentId': `${this.contentDetailData.newsId}`,
159 'contentName': `${this.contentDetailData.newsTitle || ''}`, 154 'contentName': `${this.contentDetailData.newsTitle || ''}`,
160 - } 155 + });
161 } 156 }
162 157
163 build() { 158 build() {
@@ -11,6 +11,7 @@ import { ChartItemCompereComponent } from './ChartItemCompereComponent' @@ -11,6 +11,7 @@ import { ChartItemCompereComponent } from './ChartItemCompereComponent'
11 import { ChatItemComponent } from './ChartItemComponent' 11 import { ChatItemComponent } from './ChartItemComponent'
12 import { router } from '@kit.ArkUI' 12 import { router } from '@kit.ArkUI'
13 import { EmitterEventId, EmitterUtils, Logger, SPHelper, WindowModel } from 'wdKit/Index' 13 import { EmitterEventId, EmitterUtils, Logger, SPHelper, WindowModel } from 'wdKit/Index'
  14 +import { TrackConstants, TrackingContent } from 'wdTracking/Index'
14 15
15 const TAG = "PlayerCommentComponent" 16 const TAG = "PlayerCommentComponent"
16 /** 17 /**
@@ -105,6 +106,7 @@ export struct PlayerCommentComponent { @@ -105,6 +106,7 @@ export struct PlayerCommentComponent {
105 contentDetailData: this.contentDetailData, 106 contentDetailData: this.contentDetailData,
106 onCommentInputFocus: () => { 107 onCommentInputFocus: () => {
107 108
  109 +
108 }, 110 },
109 onCommentInputed: (content) => { 111 onCommentInputed: (content) => {
110 if (content.comment) { 112 if (content.comment) {
@@ -116,6 +118,14 @@ export struct PlayerCommentComponent { @@ -116,6 +118,14 @@ export struct PlayerCommentComponent {
116 this.liveChatList.push(result) 118 this.liveChatList.push(result)
117 this.scroller.scrollEdge(Edge.Bottom) 119 this.scroller.scrollEdge(Edge.Bottom)
118 }) 120 })
  121 +
  122 + // 发布评论埋点
  123 + TrackingContent.commentClick(TrackConstants.PageName.DynamicDetail, TrackConstants.PageName.DynamicDetail,
  124 + {
  125 + 'contentType': `${this.contentDetailData.newsType}`,
  126 + 'contentId': `${this.contentDetailData.newsId}`,
  127 + 'contentName': `${this.contentDetailData.newsTitle || ''}`,
  128 + });
119 } 129 }
120 }, 130 },
121 onBack: () => { 131 onBack: () => {
@@ -40,7 +40,7 @@ export struct DetailPlayShortVideoPage { @@ -40,7 +40,7 @@ export struct DetailPlayShortVideoPage {
40 @Provide isOpenDetail: boolean = false // 查看详情按钮点击 40 @Provide isOpenDetail: boolean = false // 查看详情按钮点击
41 @Provide isDragging: boolean = false // 拖动时间进度条 41 @Provide isDragging: boolean = false // 拖动时间进度条
42 @Provide status: number = PlayerConstants.STATUS_START; 42 @Provide status: number = PlayerConstants.STATUS_START;
43 - @Consume showCommentList: boolean 43 + @Consume @Watch("showCommentListChanged") showCommentList: boolean
44 @Consume displayDirection: DisplayDirection 44 @Consume displayDirection: DisplayDirection
45 @Consume @Watch('videoStatusChange') switchVideoStatus: boolean 45 @Consume @Watch('videoStatusChange') switchVideoStatus: boolean
46 @Consume @Watch('pageShowChange') pageShow: number 46 @Consume @Watch('pageShowChange') pageShow: number
@@ -229,6 +229,15 @@ export struct DetailPlayShortVideoPage { @@ -229,6 +229,15 @@ export struct DetailPlayShortVideoPage {
229 229
230 } 230 }
231 231
  232 + showCommentListChanged() {
  233 + if (this.showCommentList) {
  234 + this.playerWidth = px2vp(this.windowWidth)
  235 + this.playerHeight = px2vp(this.windowWidth) / (16 / 9.0)
  236 + } else {
  237 + this.calculatePlayerRect()
  238 + }
  239 + }
  240 +
232 build() { 241 build() {
233 Stack({ alignContent: Alignment.Top }) { 242 Stack({ alignContent: Alignment.Top }) {
234 Column() { 243 Column() {
@@ -305,7 +314,7 @@ export struct DetailPlayShortVideoPage { @@ -305,7 +314,7 @@ export struct DetailPlayShortVideoPage {
305 314
306 @Builder 315 @Builder
307 playerViewBuilder() { 316 playerViewBuilder() {
308 - Stack() { 317 + Stack({alignContent: this.showCommentList && this.index === this.currentIndex ? Alignment.Top : Alignment.Center}) {
309 WDPlayerRenderView({ 318 WDPlayerRenderView({
310 playerController: this.playerController, 319 playerController: this.playerController,
311 onLoad: async () => { 320 onLoad: async () => {
@@ -335,7 +344,6 @@ export struct DetailPlayShortVideoPage { @@ -335,7 +344,6 @@ export struct DetailPlayShortVideoPage {
335 } 344 }
336 .width('100%') 345 .width('100%')
337 .height('100%') 346 .height('100%')
338 - .align(Alignment.Center)  
339 347
340 } 348 }
341 349
@@ -103,6 +103,7 @@ export class WDPlayerController { @@ -103,6 +103,7 @@ export class WDPlayerController {
103 case AVPlayerStatus.PLAYING: 103 case AVPlayerStatus.PLAYING:
104 this.setBright(); 104 this.setBright();
105 this.status = PlayerConstants.STATUS_START; 105 this.status = PlayerConstants.STATUS_START;
  106 + this.avPlayer!.videoScaleType = media.VideoScaleType.VIDEO_SCALE_TYPE_FIT
106 this.watchStatus(); 107 this.watchStatus();
107 break; 108 break;
108 case AVPlayerStatus.PAUSED: 109 case AVPlayerStatus.PAUSED:
1 import componentUtils from '@ohos.arkui.componentUtils'; 1 import componentUtils from '@ohos.arkui.componentUtils';
2 import { WDPlayerController } from '../controller/WDPlayerController' 2 import { WDPlayerController } from '../controller/WDPlayerController'
3 -import { WindowModel } from 'wdKit';  
4 -import { Logger } from '../utils/Logger'; 3 +import { Logger, WindowModel } from 'wdKit';
5 import { enableAliPlayer } from '../utils/GlobalSetting'; 4 import { enableAliPlayer } from '../utils/GlobalSetting';
  5 +import json from '@ohos.util.json';
  6 +import { JSON } from '@kit.ArkTS';
6 7
7 class Size { 8 class Size {
8 width: Length = "100%"; 9 width: Length = "100%";
@@ -82,12 +83,17 @@ export struct WDPlayerRenderView { @@ -82,12 +83,17 @@ export struct WDPlayerRenderView {
82 libraryname: enableAliPlayer && this.enableAliPlayer ? "premierlibrary" : undefined, 83 libraryname: enableAliPlayer && this.enableAliPlayer ? "premierlibrary" : undefined,
83 controller: this.xComponentController 84 controller: this.xComponentController
84 }) 85 })
  86 + .id(this.insId)
85 .onLoad(async (event) => { 87 .onLoad(async (event) => {
86 Logger.info(TAG, 'onLoad') 88 Logger.info(TAG, 'onLoad')
87 - this.xComponentController.setXComponentSurfaceSize({  
88 - surfaceWidth: 1920,  
89 - surfaceHeight: 1080 89 +
  90 + if (this.videoHeight > 0 && this.videoWidth > 0) {
  91 + this.xComponentController.setXComponentSurfaceRect({
  92 + surfaceWidth: this.videoWidth,
  93 + surfaceHeight: this.videoHeight
90 }); 94 });
  95 + }
  96 +
91 if (enableAliPlayer && this.enableAliPlayer) { 97 if (enableAliPlayer && this.enableAliPlayer) {
92 this.playerController?.setSurfaceId(this.insId) 98 this.playerController?.setSurfaceId(this.insId)
93 } else { 99 } else {
@@ -98,8 +104,8 @@ export struct WDPlayerRenderView { @@ -98,8 +104,8 @@ export struct WDPlayerRenderView {
98 } 104 }
99 }) 105 })
100 .zIndex(1000) 106 .zIndex(1000)
101 - .width(this.selfSize.width)  
102 - .height(this.selfSize.height) 107 + // .width(this.selfSize.width)
  108 + // .height(this.selfSize.height)
103 } 109 }
104 .onAreaChange(() => { 110 .onAreaChange(() => {
105 this.updateLayout() 111 this.updateLayout()
@@ -108,19 +114,55 @@ export struct WDPlayerRenderView { @@ -108,19 +114,55 @@ export struct WDPlayerRenderView {
108 .justifyContent(FlexAlign.Center) 114 .justifyContent(FlexAlign.Center)
109 .height('100%') 115 .height('100%')
110 .width('100%') 116 .width('100%')
111 - .align(this.videoWidth > this.videoHeight ? Alignment.Top : Alignment.Center) 117 + // .align(this.videoWidth > this.videoHeight ? Alignment.Top : Alignment.Center)
  118 + .align(Alignment.Center)
112 } 119 }
113 120
114 updateLayout() { 121 updateLayout() {
  122 +
115 let info = componentUtils.getRectangleById(this.insId); 123 let info = componentUtils.getRectangleById(this.insId);
116 - if (info.size.width > 0 && info.size.height > 0 && this.videoHeight > 0 && this.videoWidth > 0) {  
117 - if (info.size.width / info.size.height > this.videoWidth / this.videoHeight) {  
118 - let scale = info.size.height / this.videoHeight;  
119 - this.selfSize = new Size((this.videoWidth * scale / info.size.width) * 100 + "%", '100%');  
120 - } else {  
121 - let scale = info.size.width / this.videoWidth;  
122 - this.selfSize = new Size('100%', (this.videoHeight * scale / info.size.height) * 100 + "%"); 124 + Logger.debug(TAG, "播放器区域变化: " + JSON.stringify(info))
  125 +
  126 + Logger.debug(TAG, "xComponent rect: " + JSON.stringify(this.xComponentController.getXComponentSurfaceRect()))
  127 +
  128 + if (info.size.width > 0 && info.size.height > 0) {
  129 +
  130 + // 竖屏
  131 + if (this.videoHeight > 0 && this.videoWidth > 0 && this.videoWidth < this.videoHeight) {
  132 + let ratio = this.videoWidth / this.videoHeight
  133 + const height = info.size.width / ratio
  134 +
  135 + // 竖屏,缩放高度大于 视频区域高度
  136 + if (height > info.size.height) {
  137 +
  138 + Logger.debug(TAG, "ratio = " + ratio + " ==> new height = " + height)
  139 +
  140 + Logger.debug(TAG, "高度固定,求宽度: " + info.size.height * ratio)
  141 +
  142 + this.xComponentController.setXComponentSurfaceRect({
  143 + surfaceWidth: info.size.height * ratio,
  144 + surfaceHeight: info.size.height
  145 + });
  146 + return
  147 + }
123 } 148 }
  149 +
  150 + this.xComponentController.setXComponentSurfaceRect({
  151 + surfaceWidth: info.size.width,
  152 + surfaceHeight: info.size.height
  153 + });
124 } 154 }
  155 +
  156 +
  157 +
  158 + // if (info.size.width > 0 && info.size.height > 0 && this.videoHeight > 0 && this.videoWidth > 0) {
  159 + // if (info.size.width / info.size.height > this.videoWidth / this.videoHeight) {
  160 + // let scale = info.size.height / this.videoHeight;
  161 + // this.selfSize = new Size((this.videoWidth * scale / info.size.width) * 100 + "%", '100%');
  162 + // } else {
  163 + // let scale = info.size.width / this.videoWidth;
  164 + // this.selfSize = new Size('100%', (this.videoHeight * scale / info.size.height) * 100 + "%");
  165 + // }
  166 + // }
125 } 167 }
126 } 168 }
@@ -46,52 +46,6 @@ export default struct CustomDialogComponent { @@ -46,52 +46,6 @@ export default struct CustomDialogComponent {
46 } 46 }
47 .width('90%').lineHeight(22) 47 .width('90%').lineHeight(22)
48 Row(){ 48 Row(){
49 -  
50 - // Button(){  
51 - // Text($r('app.string.privacy_text_title_policy'))  
52 - // .fontSize('27lpx')  
53 - // .fontColor(Color.Red)  
54 - // .margin({left:'10lpx',right:'10lpx'})  
55 - // }  
56 - // .width('90%')  
57 - // .height('56lpx')  
58 - // .margin({top:'54lpx',right:'19lpx'})  
59 - // .backgroundColor('#80000000')  
60 - // .onClick(() => {  
61 - //  
62 - // })  
63 - // Button(){  
64 - // Text($r('app.string.privacy_text_title_protocol'))  
65 - // .fontSize('27lpx')  
66 - // .fontColor(Color.Red)  
67 - // .margin({left:'10lpx',right:'10lpx'})  
68 - // }  
69 - // .width('90%')  
70 - // .height('56lpx')  
71 - // .margin({top:'54lpx',right:'19lpx'})  
72 - // .backgroundColor('#80000000')  
73 - // .onClick(() => {  
74 - //  
75 - // })  
76 -  
77 - // Navigator({ target: 'pages/PrivacyPage', type: NavigationType.Push }) {  
78 - // Button($r('app.string.privacy_text_title_policy'))  
79 - // .onClick(()=>{  
80 - // GlobalContext.getContext().setObject('isJumpPrivacy', true);  
81 - // })  
82 - // {  
83 - // // Text($r('app.string.privacy_text_title_policy'))  
84 - // // .fontSize($r('app.float.dialog_common_text_size'))  
85 - // // .width('50%')  
86 - // // .fontColor(Color.Red)  
87 - // // .onClick(() => {  
88 - // // GlobalContext.getContext().setObject('isJumpPrivacy', true);  
89 - // // })  
90 - // }  
91 - // .fancy(Const.MainConstant_BUTTON_MARGIN_TOP)  
92 - // }  
93 - // .params({ path: 'https://www.baidu.com', tips: '在线' } as NavigatorModel)  
94 -  
95 Text($r('app.string.privacy_text_title_policy')) 49 Text($r('app.string.privacy_text_title_policy'))
96 .fontSize($r('app.float.dialog_common_text_size')) 50 .fontSize($r('app.float.dialog_common_text_size'))
97 .width('40%') 51 .width('40%')
@@ -100,14 +54,6 @@ export default struct CustomDialogComponent { @@ -100,14 +54,6 @@ export default struct CustomDialogComponent {
100 54
101 let bean={contentID:"2",pageID:""} as Params 55 let bean={contentID:"2",pageID:""} as Params
102 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean) 56 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
103 -  
104 - //GlobalContext.getContext().setObject('isJumpPrivacy', true);  
105 - //WDRouterRule.jumpWithPage(WDRouterPage.privacyPage)  
106 - // router.pushUrl({  
107 - // url: 'pages/PrivacyPage'  
108 - // }).catch((error: Error) => {  
109 - // //Logger.error(CommonConstants.CUSTOM_DIALOG_TAG, 'CustomDialog pushUrl error ' + JSON.stringify(error));  
110 - // });  
111 }) 57 })
112 Text($r('app.string.privacy_text_title_protocol')) 58 Text($r('app.string.privacy_text_title_protocol'))
113 .fontSize($r('app.float.dialog_common_text_size')) 59 .fontSize($r('app.float.dialog_common_text_size'))
@@ -117,30 +63,25 @@ export default struct CustomDialogComponent { @@ -117,30 +63,25 @@ export default struct CustomDialogComponent {
117 63
118 let bean={contentID:"1",pageID:""} as Params 64 let bean={contentID:"1",pageID:""} as Params
119 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean) 65 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)
120 -  
121 - //GlobalContext.getContext().setObject('isJumpPrivacy', true);  
122 - //WDRouterRule.jumpWithPage(WDRouterPage.privacyPage)  
123 - // router.pushUrl({  
124 - // url: 'pages/PrivacyPage'  
125 - // }).catch((error: Error) => {  
126 - // //Logger.error(CommonConstants.CUSTOM_DIALOG_TAG, 'CustomDialog pushUrl error ' + JSON.stringify(error));  
127 - // });  
128 }) 66 })
129 } 67 }
130 .margin({ 68 .margin({
131 top:'36lpx', 69 top:'36lpx',
132 bottom:'21lpx' 70 bottom:'21lpx'
133 }).visibility(Visibility.None) 71 }).visibility(Visibility.None)
  72 + Row() {
134 Text($r('app.string.dialog_text_privacy_statement')) 73 Text($r('app.string.dialog_text_privacy_statement'))
135 - .width('90%')  
136 .fontColor($r('app.color.dialog_text_color')) 74 .fontColor($r('app.color.dialog_text_color'))
137 .fontSize(14).margin({top:20}) 75 .fontSize(14).margin({top:20})
  76 + }.width('90%')
  77 + .justifyContent(FlexAlign.Center)
138 78
139 Divider() 79 Divider()
140 .color('#f5f5f5') 80 .color('#f5f5f5')
141 .width('100%') 81 .width('100%')
142 .strokeWidth(1) 82 .strokeWidth(1)
143 - .padding({left:16,right:16,top:22}) 83 + .padding({top:22})
  84 + Row() {
144 Row() { 85 Row() {
145 Text($r('app.string.dialog_button_disagree')) 86 Text($r('app.string.dialog_button_disagree'))
146 .fancy() 87 .fancy()
@@ -148,24 +89,30 @@ export default struct CustomDialogComponent { @@ -148,24 +89,30 @@ export default struct CustomDialogComponent {
148 this.controller.close(); 89 this.controller.close();
149 this.cancel(); 90 this.cancel();
150 }) 91 })
151 - Blank()  
152 - .backgroundColor($r('app.color.dialog_blank_background_color'))  
153 - .width($r('app.float.dialog_blank_width'))  
154 - .height($r('app.float.dialog_blank_height')) 92 + }.width("50%")
  93 + // Blank()
  94 + // .backgroundColor($r('app.color.dialog_blank_background_color'))
  95 + // .width($r('app.float.dialog_blank_width'))
  96 + // .height($r('app.float.dialog_blank_height'))
  97 + Row() {
155 Text($r('app.string.dialog_button_agree')) 98 Text($r('app.string.dialog_button_agree'))
156 .fancyAgree() 99 .fancyAgree()
157 .onClick(() => { 100 .onClick(() => {
158 this.controller.close(); 101 this.controller.close();
159 this.confirm(); 102 this.confirm();
160 }) 103 })
161 - 104 + }.width("50%")
  105 + .height("100%")
  106 + .backgroundColor($r("app.color.dialog_fancy_text_right_color"))
162 } 107 }
163 - .margin({ bottom: '21lpx',top:'22lpx' })  
164 - 108 + .width("100%")
  109 + .height(44)
  110 + .margin({top: 1})
165 } 111 }
166 .width('528lpx') 112 .width('528lpx')
167 .borderRadius('15') 113 .borderRadius('15')
168 .backgroundColor(Color.White) 114 .backgroundColor(Color.White)
  115 + .clip(true)
169 116
170 } 117 }
171 118
@@ -182,7 +129,8 @@ export default struct CustomDialogComponent { @@ -182,7 +129,8 @@ export default struct CustomDialogComponent {
182 } 129 }
183 // Common text styles. 130 // Common text styles.
184 @Extend(Text) function fancyAgree () { 131 @Extend(Text) function fancyAgree () {
185 - .fontColor($r("app.color.dialog_fancy_text_right_color")) 132 + .backgroundColor($r("app.color.dialog_fancy_text_right_color"))
  133 + .fontColor($r("app.color.white"))
186 .fontSize(16) 134 .fontSize(16)
187 .textAlign(TextAlign.Center) 135 .textAlign(TextAlign.Center)
188 .fontWeight(FontWeight.Medium) 136 .fontWeight(FontWeight.Medium)
@@ -8,6 +8,8 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter'; @@ -8,6 +8,8 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter';
8 import { DisplayDirection } from 'wdConstant/Index'; 8 import { DisplayDirection } from 'wdConstant/Index';
9 import { PageComponent } from 'wdComponent/Index'; 9 import { PageComponent } from 'wdComponent/Index';
10 import { TrackingButton, TrackConstants } from 'wdTracking/Index'; 10 import { TrackingButton, TrackConstants } from 'wdTracking/Index';
  11 +import { Logger } from 'wdKit';
  12 +import { ParamType, Tracking } from 'wdTracking/Index';
11 13
12 const TAG = 'VideoChannelPage' 14 const TAG = 'VideoChannelPage'
13 15
@@ -100,6 +102,18 @@ export struct VideoChannelPage { @@ -100,6 +102,18 @@ export struct VideoChannelPage {
100 right: $r('app.float.top_tab_item_padding_horizontal'), 102 right: $r('app.float.top_tab_item_padding_horizontal'),
101 }) 103 })
102 .onClick(() => { 104 .onClick(() => {
  105 +
  106 + // 视频tab埋点
  107 + const tab = this.topNavList[index]
  108 + Logger.info(TAG, `视频tab埋点: ${JSON.stringify(tab)}`);
  109 +
  110 + const params: ParamType = {
  111 + "pageName": tab.name,
  112 + "tabName": tab.name,
  113 + "pageId": tab.pageId,
  114 + }
  115 + Tracking.event("video_page_tab_click", params)
  116 +
103 if (this.currentTopNavSelectedIndex === index) { 117 if (this.currentTopNavSelectedIndex === index) {
104 this.autoRefresh++ 118 this.autoRefresh++
105 } 119 }