陈剑华

feat: 直播横划卡右滑展示更多逻辑

... ... @@ -50,6 +50,16 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
toMore() {
if (this.moreWidth > this.initMoreWidth * 2) {
this.liveToMore();
}
}
liveToMore() {
if (!!this.compDTO.dataSourceType) {
if (this.compDTO.dataSourceType === 'OBJECT_POS') {
ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
return;
}
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
... ... @@ -61,9 +71,24 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
} else {
this.jumpToLiveMorePage()
}
} else {
if (this.compDTO?.objectType === '11') {
} else {
const contentDTO: ContentDTO = {
objectId: this.compDTO.objectId,
objectType: this.compDTO.objectType,
linkUrl: this.compDTO.linkUrl,
pageId: this.compDTO.pageId
} as ContentDTO
ProcessUtils.processPage(contentDTO)
}
}
}
showMore() {
return !!this.compDTO.dataSourceType || !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')
}
build() {
Column() {
Row() {
... ... @@ -87,19 +112,9 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
.width(14)
.height(14)
}
.visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible)
.visibility(this.showMore() ? Visibility.Visible : Visibility.None)
.onClick(() => {
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()
}
this.liveToMore();
})
}.justifyContent(FlexAlign.SpaceBetween)
... ... @@ -141,7 +156,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
})
}
if (this.compDTO.operDataList.length >= 2 && !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) {
if (this.compDTO.operDataList.length >= 2 && this.showMore()) {
Row() {
Ellipse()
.width(2* (this.moreWidth - this.initMoreWidth - 1))
... ...