yanlu1_wd

视频直播横划卡

1 -// @ts-nocheck 1 +// 视频直播横划卡16:9
2 import { LiveVideoTypeComponent } from './LiveVideoTypeComponent' 2 import { LiveVideoTypeComponent } from './LiveVideoTypeComponent'
3 import { LiveHorizontalCardForOneComponent } from './LiveHorizontalCardForOneComponent' 3 import { LiveHorizontalCardForOneComponent } from './LiveHorizontalCardForOneComponent'
4 import { CompDTO } from '../../repository/bean/CompDTO' 4 import { CompDTO } from '../../repository/bean/CompDTO'
  1 +// 视频直播横划卡16:9/1个
1 import { CommonConstants } from 'wdConstant' 2 import { CommonConstants } from 'wdConstant'
2 import { ContentDTO } from '../../repository/bean/ContentDTO' 3 import { ContentDTO } from '../../repository/bean/ContentDTO'
3 import { LiveVideoTypeComponent } from './LiveVideoTypeComponent' 4 import { LiveVideoTypeComponent } from './LiveVideoTypeComponent'
  1 +// 视频直播横划卡标签
1 @Component 2 @Component
2 export struct LiveVideoTypeComponent { 3 export struct LiveVideoTypeComponent {
3 @State nType: number = 0 4 @State nType: number = 0
@@ -14,7 +15,7 @@ export struct LiveVideoTypeComponent { @@ -14,7 +15,7 @@ export struct LiveVideoTypeComponent {
14 top: 1, 15 top: 1,
15 bottom: 1, 16 bottom: 1,
16 }) 17 })
17 - Text(LiveStateName(this.name)) 18 + Text(this.name)
18 .fontColor($r('app.color.white')) 19 .fontColor($r('app.color.white'))
19 .fontSize(this.nType == 0 ? $r('app.float.font_size_11') : $r('app.float.font_size_13')) 20 .fontSize(this.nType == 0 ? $r('app.float.font_size_11') : $r('app.float.font_size_13'))
20 .align(Alignment.Center) 21 .align(Alignment.Center)
@@ -31,17 +32,3 @@ export struct LiveVideoTypeComponent { @@ -31,17 +32,3 @@ export struct LiveVideoTypeComponent {
31 } 32 }
32 33
33 34
34 -function LiveStateName(name: string): string {  
35 - if (name === 'wait') {  
36 - return '待开播'  
37 - }else if (name === 'running') {  
38 - return '直播中'  
39 - }else if (name === 'end') {  
40 - return '已结束'  
41 - }else if (name === 'cancel') {  
42 - return '已取消'  
43 - }else if (name === 'paused') {  
44 - return '暂停'  
45 - }  
46 - return name  
47 -}