Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
陈剑华
2024-05-08 11:13:10 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
21d532073f8ca6bd1723564e242852396a7007dc
21d53207
1 parent
e36ff264
fix: 直播预约卡跳转更多预约
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
23 deletions
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow03.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow03.ets
View file @
21d5320
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)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
View file @
21d5320
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)
}
}
...
...
Please
register
or
login
to post a comment