chenjun3_wd

compDTO.compStyle === CompStyle.Zh_Single_Row_01 && compDTO.imageScale === 2 月度排行 点击更多跳转h5

1 // 视频直播横划卡16:9 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, ContentDTO } from 'wdBean' 4 +import { Action, CompDTO, ContentDTO, Params } from 'wdBean'
5 import { CommonConstants } from 'wdConstant' 5 import { CommonConstants } from 'wdConstant'
  6 +import { WDRouterRule } from 'wdRouter/Index'
6 7
7 @Component 8 @Component
8 export struct LiveHorizontalCardComponent { 9 export struct LiveHorizontalCardComponent {
@@ -22,7 +23,7 @@ export struct LiveHorizontalCardComponent { @@ -22,7 +23,7 @@ export struct LiveHorizontalCardComponent {
22 .fontWeight(600) 23 .fontWeight(600)
23 } 24 }
24 25
25 - if (this.compDTO.operDataList.length > 10) { 26 + if (this.compDTO.operDataList.length > 8) {
26 Row() { 27 Row() {
27 Text("更多") 28 Text("更多")
28 .fontSize($r("app.float.font_size_14")) 29 .fontSize($r("app.float.font_size_14"))
@@ -32,6 +33,15 @@ export struct LiveHorizontalCardComponent { @@ -32,6 +33,15 @@ export struct LiveHorizontalCardComponent {
32 .width(14) 33 .width(14)
33 .height(14) 34 .height(14)
34 } 35 }
  36 + .onClick(() => {
  37 + let taskAction: Action = {
  38 + type: 'JUMP_H5_BY_WEB_VIEW',
  39 + params: {
  40 + url: this.compDTO.linkUrl
  41 + } as Params,
  42 + };
  43 + WDRouterRule.jumpWithAction(taskAction)
  44 + })
35 } 45 }
36 }.justifyContent(FlexAlign.SpaceBetween) 46 }.justifyContent(FlexAlign.SpaceBetween)
37 .padding({ left: 16, right: 16 }) 47 .padding({ left: 16, right: 16 })