yanlu

Merge commit '2351ac0b'

@@ -61,6 +61,7 @@ export class ContentDTO implements BaseDTO { @@ -61,6 +61,7 @@ export class ContentDTO implements BaseDTO {
61 videoInfo: VideoInfoDTO = {} as VideoInfoDTO; // 视频新闻信息【BFF聚合】,视频非原片+清晰度最高的 61 videoInfo: VideoInfoDTO = {} as VideoInfoDTO; // 视频新闻信息【BFF聚合】,视频非原片+清晰度最高的
62 62
63 newsSummary: string = ''; //appstyle:2 ,新闻详情 63 newsSummary: string = ''; //appstyle:2 ,新闻详情
  64 + contentText?: string ='';
64 65
65 // 二次请求接口,返回的数据,这里组装到content里; 66 // 二次请求接口,返回的数据,这里组装到content里;
66 interactData?: InteractDataDTO; 67 interactData?: InteractDataDTO;
@@ -87,3 +87,5 @@ export { WDLiveViewDefaultType } from "./src/main/ets/components/view/LiveEmptyC @@ -87,3 +87,5 @@ export { WDLiveViewDefaultType } from "./src/main/ets/components/view/LiveEmptyC
87 87
88 export { LiveFollowComponent } from "./src/main/ets/components/cardCommon/LiveFollowComponent" 88 export { LiveFollowComponent } from "./src/main/ets/components/cardCommon/LiveFollowComponent"
89 89
  90 +export { publishCommentModel } from './src/main/ets/components/comment/model/PublishCommentModel';
  91 +
@@ -16,6 +16,8 @@ import { Card17Component } from './cardview/Card17Component'; @@ -16,6 +16,8 @@ import { Card17Component } from './cardview/Card17Component';
16 import { Card19Component } from './cardview/Card19Component'; 16 import { Card19Component } from './cardview/Card19Component';
17 import { Card20Component } from './cardview/Card20Component'; 17 import { Card20Component } from './cardview/Card20Component';
18 import { Card21Component } from './cardview/Card21Component'; 18 import { Card21Component } from './cardview/Card21Component';
  19 +import { SearchContentComponent } from './cardview/SearchContentComponent';
  20 +import { Logger } from 'wdKit/Index';
19 21
20 /** 22 /**
21 * card适配器,卡片样式汇总,依据ContentDTO#appStyle 23 * card适配器,卡片样式汇总,依据ContentDTO#appStyle
@@ -26,12 +28,19 @@ export struct CardParser { @@ -26,12 +28,19 @@ export struct CardParser {
26 @State contentDTO: ContentDTO = new ContentDTO(); 28 @State contentDTO: ContentDTO = new ContentDTO();
27 @State compDTO: CompDTO = {} as CompDTO 29 @State compDTO: CompDTO = {} as CompDTO
28 30
  31 + aboutToAppear(): void {
  32 + Logger.info('contentDTO.contentText', JSON.stringify(this.contentDTO))
  33 + }
  34 +
29 build() { 35 build() {
30 this.contentBuilder(this.contentDTO, this.compDTO); 36 this.contentBuilder(this.contentDTO, this.compDTO);
31 } 37 }
32 38
33 @Builder 39 @Builder
34 contentBuilder(contentDTO: ContentDTO, compDTO: CompDTO) { 40 contentBuilder(contentDTO: ContentDTO, compDTO: CompDTO) {
  41 + if (!!contentDTO.contentText) {
  42 + SearchContentComponent({ contentDTO })
  43 + } else {
35 if (contentDTO.appStyle === CompStyle.Card_02) { 44 if (contentDTO.appStyle === CompStyle.Card_02) {
36 Card2Component({ contentDTO }) 45 Card2Component({ contentDTO })
37 } else if (contentDTO.appStyle === CompStyle.Card_03) { 46 } else if (contentDTO.appStyle === CompStyle.Card_03) {
@@ -73,4 +82,6 @@ export struct CardParser { @@ -73,4 +82,6 @@ export struct CardParser {
73 // .backgroundColor(Color.Brown) // 展示本页未实现的compStyle 82 // .backgroundColor(Color.Brown) // 展示本页未实现的compStyle
74 } 83 }
75 } 84 }
  85 +
  86 + }
76 } 87 }
1 //缩略标题 1 //缩略标题
2 -import { CommonConstants } from 'wdConstant'  
3 -import { ContentDTO } from 'wdBean'  
4 -import { DateTimeUtils } from 'wdKit' 2 +import { CommonConstants } from 'wdConstant';
  3 +import { ContentDTO } from 'wdBean';
5 import { ProcessUtils } from 'wdRouter'; 4 import { ProcessUtils } from 'wdRouter';
6 -import { CardSourceInfo } from '../cardCommon/CardSourceInfo' 5 +import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
  6 +import { Notes } from './notes';
  7 +
7 const TAG = 'Card11Component'; 8 const TAG = 'Card11Component';
8 9
9 /** 10 /**
@@ -16,12 +17,21 @@ export struct Card11Component { @@ -16,12 +17,21 @@ export struct Card11Component {
16 17
17 build() { 18 build() {
18 Column() { 19 Column() {
  20 + Stack() {
  21 + if (this.contentDTO.objectType == '5') {
  22 + Notes({ objectType: this.contentDTO.objectType })
  23 + }
19 Text(this.contentDTO.newsTitle) 24 Text(this.contentDTO.newsTitle)
20 .fontSize($r("app.float.font_size_16")) 25 .fontSize($r("app.float.font_size_16"))
21 .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222")) 26 .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
22 .maxLines(3) 27 .maxLines(3)
23 .textOverflow({ overflow: TextOverflow.Ellipsis }) 28 .textOverflow({ overflow: TextOverflow.Ellipsis })
24 .width(CommonConstants.FULL_WIDTH) 29 .width(CommonConstants.FULL_WIDTH)
  30 + .textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
  31 +
  32 + }.alignContent(Alignment.TopStart)
  33 +
  34 +
25 // 评论等信息 35 // 评论等信息
26 CardSourceInfo({ contentDTO: this.contentDTO }) 36 CardSourceInfo({ contentDTO: this.contentDTO })
27 }.width(CommonConstants.FULL_WIDTH) 37 }.width(CommonConstants.FULL_WIDTH)
@@ -22,12 +22,26 @@ export struct Card2Component { @@ -22,12 +22,26 @@ export struct Card2Component {
22 @State contentDTO: ContentDTO = new ContentDTO(); 22 @State contentDTO: ContentDTO = new ContentDTO();
23 @State loadImg: boolean = false; 23 @State loadImg: boolean = false;
24 @State clicked: boolean = false; 24 @State clicked: boolean = false;
  25 + @State titleMarked: boolean = false;
  26 + @State str01: string = '';
  27 + @State str02: string = '';
  28 + @State str03: string = '';
25 29
26 async aboutToAppear(): Promise<void> { 30 async aboutToAppear(): Promise<void> {
  31 + this.titleInit();
27 this.loadImg = await onlyWifiLoadImg(); 32 this.loadImg = await onlyWifiLoadImg();
28 // this.clicked = hasClicked(this.contentDTO.objectId) 33 // this.clicked = hasClicked(this.contentDTO.objectId)
29 } 34 }
30 35
  36 + titleInit() {
  37 + if (this.contentDTO.title.includes('<em>') && this.contentDTO.title.includes('</em>')) {
  38 + this.titleMarked = true;
  39 + this.str01 = this.contentDTO.newsTitle?.split('<em>')[0] || '';
  40 + this.str02 = this.contentDTO.newsTitle?.split('<em>')[1].split('</em>')[0] || '';
  41 + this.str03 = this.contentDTO.newsTitle?.split('<em>')[1].split('</em>')[1] || '';
  42 + }
  43 + }
  44 +
31 build() { 45 build() {
32 Column() { 46 Column() {
33 Column() { 47 Column() {
@@ -36,7 +50,17 @@ export struct Card2Component { @@ -36,7 +50,17 @@ export struct Card2Component {
36 if (this.contentDTO.objectType == '5') { 50 if (this.contentDTO.objectType == '5') {
37 Notes({ objectType: this.contentDTO.objectType }) 51 Notes({ objectType: this.contentDTO.objectType })
38 } 52 }
39 - Text(this.contentDTO.newsTitle) 53 +
  54 + Text() {
  55 + if (this.titleMarked) {
  56 + Span(this.str01)
  57 + Span(this.str02)
  58 + .fontColor(0xED2800)
  59 + Span(this.str03)
  60 + } else {
  61 + Span(this.contentDTO.newsTitle)
  62 + }
  63 + }
40 .fontSize($r('app.float.font_size_17')) 64 .fontSize($r('app.float.font_size_17'))
41 .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222')) 65 .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
42 .maxLines(2) 66 .maxLines(2)
1 import { ContentDTO } from 'wdBean'; 1 import { ContentDTO } from 'wdBean';
2 -import { CommonConstants } from 'wdConstant' 2 +import { CommonConstants } from 'wdConstant';
3 import { ProcessUtils } from 'wdRouter'; 3 import { ProcessUtils } from 'wdRouter';
4 -import { CardSourceInfo } from '../cardCommon/CardSourceInfo' 4 +import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
  5 +import { Notes } from './notes';
5 6
6 /** 7 /**
7 * 卡片样式:"appStyle":"3" 8 * 卡片样式:"appStyle":"3"
@@ -14,10 +15,17 @@ export struct Card3Component { @@ -14,10 +15,17 @@ export struct Card3Component {
14 15
15 build() { 16 build() {
16 Column() { 17 Column() {
  18 + Stack() {
  19 + if (this.contentDTO.objectType == '5') {
  20 + Notes({ objectType: this.contentDTO.objectType })
  21 + }
17 Text(this.contentDTO.newsTitle) 22 Text(this.contentDTO.newsTitle)
18 .fontSize($r("app.float.font_size_16")) 23 .fontSize($r("app.float.font_size_16"))
19 .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222")) 24 .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
20 .width(CommonConstants.FULL_WIDTH) 25 .width(CommonConstants.FULL_WIDTH)
  26 + .textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
  27 + }.alignContent(Alignment.TopStart)
  28 +
21 // 评论等信息 29 // 评论等信息
22 CardSourceInfo({ contentDTO: this.contentDTO }) 30 CardSourceInfo({ contentDTO: this.contentDTO })
23 } 31 }
@@ -18,18 +18,41 @@ export struct Card4Component { @@ -18,18 +18,41 @@ export struct Card4Component {
18 @State contentDTO: ContentDTO = new ContentDTO(); 18 @State contentDTO: ContentDTO = new ContentDTO();
19 @State loadImg: boolean = false; 19 @State loadImg: boolean = false;
20 @State clicked: boolean = false; 20 @State clicked: boolean = false;
  21 + @State titleMarked: boolean = false;
  22 + @State str01: string = '';
  23 + @State str02: string = '';
  24 + @State str03: string = '';
21 25
22 26
23 async aboutToAppear(): Promise<void> { 27 async aboutToAppear(): Promise<void> {
  28 + this.titleInit();
24 this.loadImg = await onlyWifiLoadImg(); 29 this.loadImg = await onlyWifiLoadImg();
25 } 30 }
26 31
  32 + titleInit() {
  33 + if (this.contentDTO.title.includes('<em>') && this.contentDTO.title.includes('</em>')) {
  34 + this.titleMarked = true;
  35 + this.str01 = this.contentDTO.newsTitle?.split('<em>')[0] || '';
  36 + this.str02 = this.contentDTO.newsTitle?.split('<em>')[1].split('</em>')[0] || '';
  37 + this.str03 = this.contentDTO.newsTitle?.split('<em>')[1].split('</em>')[1] || '';
  38 + }
  39 + }
  40 +
27 build() { 41 build() {
28 Column() { 42 Column() {
29 //body 43 //body
30 Column() { 44 Column() {
31 //新闻标题 45 //新闻标题
32 - Text(this.contentDTO.newsTitle) 46 + Text() {
  47 + if (this.titleMarked) {
  48 + Span(this.str01)
  49 + Span(this.str02)
  50 + .fontColor(0xED2800)
  51 + Span(this.str03)
  52 + } else {
  53 + Span(this.contentDTO.newsTitle)
  54 + }
  55 + }
33 .fontSize($r('app.float.font_size_17')) 56 .fontSize($r('app.float.font_size_17'))
34 .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222')) 57 .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
35 .maxLines(3) 58 .maxLines(3)
@@ -22,13 +22,12 @@ export struct Card5Component { @@ -22,13 +22,12 @@ export struct Card5Component {
22 22
23 build() { 23 build() {
24 Stack() { 24 Stack() {
25 -  
26 Image(this.loadImg ? this.contentDTO.coverUrl : '') 25 Image(this.loadImg ? this.contentDTO.coverUrl : '')
27 .backgroundColor(0xf5f5f5) 26 .backgroundColor(0xf5f5f5)
28 .width(CommonConstants.FULL_WIDTH) 27 .width(CommonConstants.FULL_WIDTH)
29 .autoResize(true) 28 .autoResize(true)
30 .borderRadius($r('app.float.image_border_radius')) 29 .borderRadius($r('app.float.image_border_radius'))
31 - if (this.titleShowPolicy === 1) { 30 + if (this.titleShowPolicy === 1 || this.titleShowPolicy === null) {
32 Row() 31 Row()
33 .width(CommonConstants.FULL_WIDTH) 32 .width(CommonConstants.FULL_WIDTH)
34 .height(59) 33 .height(59)
@@ -6,6 +6,7 @@ import { CardMediaInfo } from '../cardCommon/CardMediaInfo'; @@ -6,6 +6,7 @@ import { CardMediaInfo } from '../cardCommon/CardMediaInfo';
6 import { Notes } from './notes'; 6 import { Notes } from './notes';
7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
8 // import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; 8 // import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
  9 +import { Logger } from 'wdKit/Index';
9 10
10 const TAG: string = 'Card6Component-Card13Component'; 11 const TAG: string = 'Card6Component-Card13Component';
11 12
@@ -17,12 +18,27 @@ export struct Card6Component { @@ -17,12 +18,27 @@ export struct Card6Component {
17 @State contentDTO: ContentDTO = new ContentDTO(); 18 @State contentDTO: ContentDTO = new ContentDTO();
18 @State loadImg: boolean = false; 19 @State loadImg: boolean = false;
19 @State clicked: boolean = false; 20 @State clicked: boolean = false;
  21 + @State titleMarked: boolean = false;
  22 + @State str01: string = '';
  23 + @State str02: string = '';
  24 + @State str03: string = '';
20 25
21 async aboutToAppear(): Promise<void> { 26 async aboutToAppear(): Promise<void> {
  27 + Logger.info('titleInit', JSON.stringify(this.contentDTO))
  28 + this.titleInit();
22 this.loadImg = await onlyWifiLoadImg(); 29 this.loadImg = await onlyWifiLoadImg();
23 // this.clicked = hasClicked(this.contentDTO.objectId) 30 // this.clicked = hasClicked(this.contentDTO.objectId)
24 } 31 }
25 32
  33 + titleInit() {
  34 + if (this.contentDTO.title?.includes('<em>') && this.contentDTO.title?.includes('</em>')) {
  35 + this.titleMarked = true;
  36 + this.str01 = this.contentDTO.title?.split('<em>')[0] || '';
  37 + this.str02 = this.contentDTO.title?.split('<em>')[1].split('</em>')[0] || '';
  38 + this.str03 = this.contentDTO.title?.split('<em>')[1].split('</em>')[1] || '';
  39 + }
  40 + }
  41 +
26 build() { 42 build() {
27 Row() { 43 Row() {
28 Column() { 44 Column() {
@@ -44,7 +60,16 @@ export struct Card6Component { @@ -44,7 +60,16 @@ export struct Card6Component {
44 Notes({ objectType: this.contentDTO.objectType }) 60 Notes({ objectType: this.contentDTO.objectType })
45 } 61 }
46 62
47 - Text(`${this.contentDTO.newsTitle}`) 63 + Text() {
  64 + if (this.titleMarked) {
  65 + Span(this.str01)
  66 + Span(this.str02)
  67 + .fontColor(0xED2800)
  68 + Span(this.str03)
  69 + } else {
  70 + Span(this.contentDTO.newsTitle)
  71 + }
  72 + }
48 .fontColor(this.clicked ? 0x848484 : 0x222222) 73 .fontColor(this.clicked ? 0x848484 : 0x222222)
49 .fontSize(16) 74 .fontSize(16)
50 .lineHeight(24) 75 .lineHeight(24)
  1 +import { ContentDTO, FullColumnImgUrlDTO } from 'wdBean';
  2 +import { CommonConstants } from 'wdConstant/Index';
  3 +import { ProcessUtils } from 'wdRouter';
  4 +import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
  5 +import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
  6 +import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
  7 +const TAG: string = 'Card4Component';
  8 +
  9 +/**
  10 + * 上图下文,用于搜索页命中搜索内容展示
  11 + */
  12 +@Component
  13 +export struct SearchContentComponent {
  14 + @State contentDTO: ContentDTO = new ContentDTO();
  15 + @State loadImg: boolean = false;
  16 + @State clicked: boolean = false;
  17 + @State str01: string = '';
  18 + @State str02: string = '';
  19 + @State str03: string = '';
  20 +
  21 +
  22 + async aboutToAppear(): Promise<void> {
  23 + this.loadImg = await onlyWifiLoadImg();
  24 + this.titleInit();
  25 + }
  26 +
  27 + titleInit() {
  28 + this.str01 = this.contentDTO.contentText?.split('<em>')[0] || '';
  29 + this.str02 = this.contentDTO.contentText?.split('<em>')[1].split('</em>')[0] || '';
  30 + this.str03 = this.contentDTO.contentText?.split('<em>')[1].split('</em>')[1] || '';
  31 + }
  32 +
  33 + build() {
  34 + Column() {
  35 + //body
  36 + Column() {
  37 + //新闻标题
  38 + Text(this.contentDTO.newsTitle)
  39 + .fontSize($r('app.float.font_size_17'))
  40 + .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
  41 + .maxLines(3)
  42 + .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
  43 +
  44 + // 命中内容
  45 + Text(this.contentDTO.contentText) {
  46 + Span(this.str01)
  47 + Span(this.str02)
  48 + .fontColor(0xED2800)
  49 + Span(this.str03)
  50 + }
  51 + .fontSize(13)
  52 + .width(CommonConstants.FULL_PARENT)
  53 + .margin({ top: 8 })
  54 + .fontColor(0x222222)
  55 + }
  56 + .width('100%')
  57 + .justifyContent(FlexAlign.Start)
  58 + .alignItems(HorizontalAlign.Start)
  59 + .onClick((event: ClickEvent) => {
  60 + this.clicked = true;
  61 + ProcessUtils.processPage(this.contentDTO)
  62 + })
  63 + //bottom 评论等信息
  64 + CardSourceInfo({ contentDTO: this.contentDTO })
  65 + }
  66 + .width(CommonConstants.FULL_WIDTH)
  67 + .padding({
  68 + left: $r('app.float.card_comp_pagePadding_lf'),
  69 + right: $r('app.float.card_comp_pagePadding_lf'),
  70 + top: $r('app.float.card_comp_pagePadding_tb'),
  71 + bottom: $r('app.float.card_comp_pagePadding_tb')
  72 + })
  73 + }
  74 +}
  75 +
  76 +
  77 +@Extend(Text)
  78 +function bottomTextStyle() {
  79 + .fontSize(12)
  80 + .fontColor('#B0B0B0')
  81 +}
@@ -453,6 +453,7 @@ export struct SearchResultContentComponent { @@ -453,6 +453,7 @@ export struct SearchResultContentComponent {
453 contentDTO.openType = ''; 453 contentDTO.openType = '';
454 contentDTO.extra = ''; 454 contentDTO.extra = '';
455 contentDTO.titleShow = value.data.type == "5" ? 1 : 0; 455 contentDTO.titleShow = value.data.type == "5" ? 1 : 0;
  456 + contentDTO.contentText = value.data.contentText;
456 457
457 return contentDTO; 458 return contentDTO;
458 } 459 }
@@ -64,7 +64,7 @@ export struct OperRowListView { @@ -64,7 +64,7 @@ export struct OperRowListView {
64 * 7:图集详情页 64 * 7:图集详情页
65 */ 65 */
66 @Prop componentType: number = 1 //1: 底部栏目样式 2: 新闻页中间位置样式 3:动态Tab内容下的互动入口 66 @Prop componentType: number = 1 //1: 底部栏目样式 2: 新闻页中间位置样式 3:动态Tab内容下的互动入口
67 - @Prop pageComponentType?: number = -1 //1:视频详情页 2:竖屏直播页 3:图集 67 + @Prop pageComponentType?: number = -1 //1:视频详情页 2:竖屏直播页 3:图集 4: 横屏直播页
68 @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 68 @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
69 @Prop operationButtonList?: string[] = ['comment', 'collect', 'share'] // 组件展示条件 69 @Prop operationButtonList?: string[] = ['comment', 'collect', 'share'] // 组件展示条件
70 @State needLike: boolean = true 70 @State needLike: boolean = true
@@ -16,7 +16,7 @@ export struct PictureLoading { @@ -16,7 +16,7 @@ export struct PictureLoading {
16 build() { 16 build() {
17 Row() { 17 Row() {
18 Image(this.imagePath) 18 Image(this.imagePath)
19 - .alt($r('app.media.picture_loading')) 19 + .alt($r('app.media.datail_imageLoading_w'))
20 .width(this.imageWidth) 20 .width(this.imageWidth)
21 .aspectRatio(this.ratio) 21 .aspectRatio(this.ratio)
22 .objectFit(ImageFit.Fill) 22 .objectFit(ImageFit.Fill)
@@ -38,8 +38,8 @@ export struct PlayerComponent { @@ -38,8 +38,8 @@ export struct PlayerComponent {
38 } 38 }
39 39
40 async aboutToDisappear(): Promise<void> { 40 async aboutToDisappear(): Promise<void> {
41 - this.playerController?.pause()  
42 - this.playerController?.stop() 41 + await this.playerController?.pause()
  42 + await this.playerController?.stop()
43 await this.playerController?.release() 43 await this.playerController?.release()
44 } 44 }
45 45
@@ -151,8 +151,8 @@ export struct DetailPlayShortVideoPage { @@ -151,8 +151,8 @@ export struct DetailPlayShortVideoPage {
151 151
152 aboutToAppear() { 152 aboutToAppear() {
153 this.videoLandScape = this.contentDetailData.videoInfo[0]?.videoLandScape 153 this.videoLandScape = this.contentDetailData.videoInfo[0]?.videoLandScape
154 - this.ratio = this.contentDetailData.videoInfo[0].resolutionWidth /  
155 - this.contentDetailData.videoInfo[0].resolutionHeight 154 + this.ratio = (this.contentDetailData.videoInfo[0]?.resolutionWidth || 16) /
  155 + (this.contentDetailData.videoInfo[0]?.resolutionHeight || 9)
156 this.playerController.onCanplay = async () => { 156 this.playerController.onCanplay = async () => {
157 this.ratio = this.playerController.videoWidth / this.playerController.videoHeight 157 this.ratio = this.playerController.videoWidth / this.playerController.videoHeight
158 if ((this.index == 0 || this.currentIndex === this.index) && this.switchVideoStatus) { 158 if ((this.index == 0 || this.currentIndex === this.index) && this.switchVideoStatus) {
@@ -269,13 +269,6 @@ export struct DetailPlayShortVideoPage { @@ -269,13 +269,6 @@ export struct DetailPlayShortVideoPage {
269 269
270 this.playerCoverBuilder() 270 this.playerCoverBuilder()
271 271
272 - // .height(this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ? '100%' :  
273 - // this.videoLandScape === 1 ? 210 : 'auto')// .height(this.videoLandScape === 1 ? 210 : '100%')  
274 - // .width(this.videoLandScape === 1 ?  
275 - // this.playerController.videoWidth / this.playerController.videoHeight * this.windowHeight + 'px' : '100%')  
276 - // .height(this.videoLandScape === 1 ? 210 :  
277 - // this.playerController.videoHeight / this.playerController.videoWidth * this.windowWidth + 'px')  
278 -  
279 // 横屏-全屏观看 272 // 横屏-全屏观看
280 if (this.videoLandScape === 1) { 273 if (this.videoLandScape === 1) {
281 this.playerFullscreenBuilder() 274 this.playerFullscreenBuilder()
@@ -283,10 +276,7 @@ export struct DetailPlayShortVideoPage { @@ -283,10 +276,7 @@ export struct DetailPlayShortVideoPage {
283 } 276 }
284 .width('100%') 277 .width('100%')
285 .height('100%') 278 .height('100%')
286 - // .width(this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ?  
287 - // this.playerController.videoWidth / this.playerController.videoHeight * this.windowHeight + 'px' : '100%')  
288 - // .height(this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ? '100%' : 'auto')  
289 - .align(this.videoLandScape === 1 ? Alignment.Center : Alignment.Top) 279 + .align(Alignment.Center)
290 280
291 } 281 }
292 282
@@ -312,18 +302,7 @@ export struct DetailPlayShortVideoPage { @@ -312,18 +302,7 @@ export struct DetailPlayShortVideoPage {
312 .align(Alignment.Bottom) 302 .align(Alignment.Bottom)
313 .margin({ top: 280 }) 303 .margin({ top: 280 })
314 .onClick(() => { 304 .onClick(() => {
315 - // this.displayDirection =  
316 - // this.displayDirection === DisplayDirection.VERTICAL ? DisplayDirection.VIDEO_HORIZONTAL :  
317 - // DisplayDirection.VERTICAL  
318 - // WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?  
319 - // window.Orientation.PORTRAIT :  
320 - // window.Orientation.LANDSCAPE_INVERTED)  
321 -  
322 - // this.playerController.xComponentController?.setXComponentSurfaceRect({  
323 - // surfaceWidth: px2vp(this.windowHeight),  
324 - // surfaceHeight: px2vp(this.playerController.videoWidth / this.playerController.videoHeight * this.windowHeight),  
325 - // })  
326 - 305 + // 全屏方案待定
327 }) 306 })
328 307
329 } 308 }