陈剑华

fix: 直播预约卡跳转更多预约

1 -import { CompDTO, ContentDTO, Params } from 'wdBean'; 1 +import { CompDTO, ContentDTO, Params, Action } from 'wdBean';
2 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; 2 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
3 import { postInteractAccentionOperateParams } from 'wdBean'; 3 import { postInteractAccentionOperateParams } from 'wdBean';
4 import { PageRepository } from '../../repository/PageRepository'; 4 import { PageRepository } from '../../repository/PageRepository';
@@ -23,7 +23,8 @@ export struct ZhSingleRow03 { @@ -23,7 +23,8 @@ export struct ZhSingleRow03 {
23 const parseDate = new Date(timeNum).setHours(0,0,0,0); 23 const parseDate = new Date(timeNum).setHours(0,0,0,0);
24 if (todayDate === parseDate) { 24 if (todayDate === parseDate) {
25 return '今天' 25 return '今天'
26 - } else { const str = DateTimeUtils.formatDate(timeNum, 'MM月dd日') 26 + } else {
  27 + const str = DateTimeUtils.formatDate(timeNum, 'MM月dd日')
27 const month: string = str.split('月')[0]; 28 const month: string = str.split('月')[0];
28 if (month[0] === "0") { 29 if (month[0] === "0") {
29 return str.slice(1) 30 return str.slice(1)
@@ -60,7 +61,6 @@ export struct ZhSingleRow03 { @@ -60,7 +61,6 @@ export struct ZhSingleRow03 {
60 Flex({justifyContent: FlexAlign.SpaceBetween}){ 61 Flex({justifyContent: FlexAlign.SpaceBetween}){
61 Row() { 62 Row() {
62 Text(this.format(new Date(item.liveInfo.liveStartTime).getTime())) 63 Text(this.format(new Date(item.liveInfo.liveStartTime).getTime()))
63 - // Text(item.liveInfo.liveStartTime.split(' ')[0].slice(5).split('-').join('月')+'日')  
64 .margin({right: 6}) 64 .margin({right: 6})
65 .fontColor(0x000000) 65 .fontColor(0x000000)
66 .fontSize(13) 66 .fontSize(13)
@@ -138,23 +138,21 @@ export struct ZhSingleRow03 { @@ -138,23 +138,21 @@ export struct ZhSingleRow03 {
138 Image($r("app.media.more")) 138 Image($r("app.media.more"))
139 .width(14) 139 .width(14)
140 .height(14) 140 .height(14)
141 - .onClick(() => {  
142 - // TODO 跳转的页面,定义的入参可能不合理。推荐id: 41  
143 - let params = {'index': "1"} as Record<string, string>  
144 - WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params)  
145 - })  
146 } 141 }
147 .padding({ 142 .padding({
148 right: $r('app.float.card_comp_pagePadding_lf'), 143 right: $r('app.float.card_comp_pagePadding_lf'),
149 }) 144 })
150 - .visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible)  
151 .onClick(() => { 145 .onClick(() => {
152 - if (this.compDTO?.objectType === '11') {  
153 - ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string)  
154 - } else if (this.compDTO?.objectType === '5') {  
155 - ProcessUtils._gotoSpecialTopic(this.compDTO.linkUrl)  
156 - } else if (this.compDTO?.objectType === '6') {  
157 - ProcessUtils._gotoDefaultWeb(this.compDTO.linkUrl) 146 + if (this.compDTO.linkUrl) {
  147 + let taskAction: Action = {
  148 + type: 'JUMP_H5_BY_WEB_VIEW',
  149 + params: {
  150 + url: this.compDTO.linkUrl
  151 + } as Params,
  152 + };
  153 + WDRouterRule.jumpWithAction(taskAction)
  154 + } else {
  155 + this.jumpToLiveMorePage()
158 } 156 }
159 }) 157 })
160 } 158 }
@@ -162,6 +160,17 @@ export struct ZhSingleRow03 { @@ -162,6 +160,17 @@ export struct ZhSingleRow03 {
162 .margin({ top: 8, bottom: 8 }) 160 .margin({ top: 8, bottom: 8 })
163 .width('100%') 161 .width('100%')
164 } 162 }
  163 +
  164 + private jumpToLiveMorePage() {
  165 + // let taskAction: Action = {
  166 + // type: 'JUMP_INNER_NEW_PAGE',
  167 + // params: {
  168 + // pageID: 'LIVE_MORE_PAGE'
  169 + // } as Params,
  170 + // };
  171 + // WDRouterRule.jumpWithAction(taskAction)
  172 + WDRouterRule.jumpWithPage(WDRouterPage.reserveMorePage)
  173 + }
165 } 174 }
166 175
167 @Extend(Text) 176 @Extend(Text)
1 import { CommonConstants } from 'wdConstant' 1 import { CommonConstants } from 'wdConstant'
2 -import { ContentDTO, CompDTO } from 'wdBean'  
3 -import { ProcessUtils } from 'wdRouter'; 2 +import { ContentDTO, CompDTO, Action, Params } from 'wdBean'
  3 +import { ProcessUtils, WDRouterRule, WDRouterPage } from 'wdRouter';
4 4
5 @Component 5 @Component
6 export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { 6 export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
@@ -31,12 +31,16 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -31,12 +31,16 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
31 } 31 }
32 .visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible) 32 .visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible)
33 .onClick(() => { 33 .onClick(() => {
34 - if (this.compDTO?.objectType === '11') {  
35 - ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string)  
36 - } else if (this.compDTO?.objectType === '5') {  
37 - ProcessUtils._gotoSpecialTopic(this.compDTO.linkUrl)  
38 - } else if (this.compDTO?.objectType === '6') {  
39 - ProcessUtils._gotoDefaultWeb(this.compDTO.linkUrl) 34 + if (this.compDTO.linkUrl) {
  35 + let taskAction: Action = {
  36 + type: 'JUMP_H5_BY_WEB_VIEW',
  37 + params: {
  38 + url: this.compDTO.linkUrl
  39 + } as Params,
  40 + };
  41 + WDRouterRule.jumpWithAction(taskAction)
  42 + } else {
  43 + this.jumpToLiveMorePage()
40 } 44 }
41 }) 45 })
42 46
@@ -95,5 +99,16 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -95,5 +99,16 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
95 // .backgroundColor($r("app.color.color_FE4B05")) 99 // .backgroundColor($r("app.color.color_FE4B05"))
96 .margin({ bottom: 8 }) 100 .margin({ bottom: 8 })
97 } 101 }
  102 +
  103 + private jumpToLiveMorePage() {
  104 + // let taskAction: Action = {
  105 + // type: 'JUMP_INNER_NEW_PAGE',
  106 + // params: {
  107 + // pageID: 'LIVE_MORE_PAGE'
  108 + // } as Params,
  109 + // };
  110 + // WDRouterRule.jumpWithAction(taskAction)
  111 + WDRouterRule.jumpWithPage(WDRouterPage.liveMorePage)
  112 + }
98 } 113 }
99 114