陈剑华

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

import { CompDTO, ContentDTO, Params } from 'wdBean';
import { CompDTO, ContentDTO, Params, Action } from 'wdBean';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { postInteractAccentionOperateParams } from 'wdBean';
import { PageRepository } from '../../repository/PageRepository';
... ... @@ -23,7 +23,8 @@ export struct ZhSingleRow03 {
const parseDate = new Date(timeNum).setHours(0,0,0,0);
if (todayDate === parseDate) {
return '今天'
} else { const str = DateTimeUtils.formatDate(timeNum, 'MM月dd日')
} else {
const str = DateTimeUtils.formatDate(timeNum, 'MM月dd日')
const month: string = str.split('月')[0];
if (month[0] === "0") {
return str.slice(1)
... ... @@ -60,7 +61,6 @@ export struct ZhSingleRow03 {
Flex({justifyContent: FlexAlign.SpaceBetween}){
Row() {
Text(this.format(new Date(item.liveInfo.liveStartTime).getTime()))
// Text(item.liveInfo.liveStartTime.split(' ')[0].slice(5).split('-').join('月')+'日')
.margin({right: 6})
.fontColor(0x000000)
.fontSize(13)
... ... @@ -138,23 +138,21 @@ export struct ZhSingleRow03 {
Image($r("app.media.more"))
.width(14)
.height(14)
.onClick(() => {
// TODO 跳转的页面,定义的入参可能不合理。推荐id: 41
let params = {'index': "1"} as Record<string, string>
WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params)
})
}
.padding({
right: $r('app.float.card_comp_pagePadding_lf'),
})
.visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible)
.onClick(() => {
if (this.compDTO?.objectType === '11') {
ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string)
} else if (this.compDTO?.objectType === '5') {
ProcessUtils._gotoSpecialTopic(this.compDTO.linkUrl)
} else if (this.compDTO?.objectType === '6') {
ProcessUtils._gotoDefaultWeb(this.compDTO.linkUrl)
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
params: {
url: this.compDTO.linkUrl
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
} else {
this.jumpToLiveMorePage()
}
})
}
... ... @@ -162,6 +160,17 @@ export struct ZhSingleRow03 {
.margin({ top: 8, bottom: 8 })
.width('100%')
}
private jumpToLiveMorePage() {
// let taskAction: Action = {
// type: 'JUMP_INNER_NEW_PAGE',
// params: {
// pageID: 'LIVE_MORE_PAGE'
// } as Params,
// };
// WDRouterRule.jumpWithAction(taskAction)
WDRouterRule.jumpWithPage(WDRouterPage.reserveMorePage)
}
}
@Extend(Text)
... ...
import { CommonConstants } from 'wdConstant'
import { ContentDTO, CompDTO } from 'wdBean'
import { ProcessUtils } from 'wdRouter';
import { ContentDTO, CompDTO, Action, Params } from 'wdBean'
import { ProcessUtils, WDRouterRule, WDRouterPage } from 'wdRouter';
@Component
export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
... ... @@ -31,12 +31,16 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
}
.visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible)
.onClick(() => {
if (this.compDTO?.objectType === '11') {
ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string)
} else if (this.compDTO?.objectType === '5') {
ProcessUtils._gotoSpecialTopic(this.compDTO.linkUrl)
} else if (this.compDTO?.objectType === '6') {
ProcessUtils._gotoDefaultWeb(this.compDTO.linkUrl)
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
params: {
url: this.compDTO.linkUrl
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
} else {
this.jumpToLiveMorePage()
}
})
... ... @@ -95,5 +99,16 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
// .backgroundColor($r("app.color.color_FE4B05"))
.margin({ bottom: 8 })
}
private jumpToLiveMorePage() {
// let taskAction: Action = {
// type: 'JUMP_INNER_NEW_PAGE',
// params: {
// pageID: 'LIVE_MORE_PAGE'
// } as Params,
// };
// WDRouterRule.jumpWithAction(taskAction)
WDRouterRule.jumpWithPage(WDRouterPage.liveMorePage)
}
}
... ...