陈剑华

fix: 更多跳转,分割线

... ... @@ -84,7 +84,64 @@ export struct CompParser {
}
@Builder
beforeDevider() {
if (
this.compDTO.compStyle === CompStyle.Card_09 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Column_09 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Row_04 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Row_06
) {
if (this.compDTO.compStyle === this.nextCompDTO.compStyle) {
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
} else {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
}
}
}
@Builder
behindDevider() {
if (
this.compDTO.compStyle === CompStyle.Card_09 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Column_09 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Row_04 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Row_06
) {
if (this.compDTO.compStyle === this.nextCompDTO.compStyle) {
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
} else {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
}
} else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
Divider().strokeWidth(1).color('#f5f5f5').width('120%').margin({left: -6})
} else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
// 大专题
if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
} else {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
}
} else if (this.compDTO.compType === 'appStyle' || this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 || this.compDTO.compStyle === CompStyle.Zh_Single_Row_03 || this.compDTO.compStyle === CompStyle.Card_Comp_Adv || this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
if (
this.nextCompDTO.compStyle === CompStyle.Card_09 ||
this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10 ||
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_09 ||
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_04 ||
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_06 ||
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_12
) {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
} else {
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
}
} else {
// Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
}
}
@Builder
componentBuilder() {
this.beforeDevider();
if (this.compDTO.operDataList[0]?.objectType !== '3' &&
this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口
... ... @@ -208,42 +265,7 @@ export struct CompParser {
// })
}
if (
this.compDTO.compStyle === CompStyle.Card_09 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Column_09 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Row_04 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Row_06
) {
if (this.compDTO.compStyle === this.nextCompDTO.compStyle) {
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
} else {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
}
} else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
Divider().strokeWidth(1).color('#f5f5f5').width('120%').margin({left: -6})
} else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
// 大专题
if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
} else {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
}
} else if (this.compDTO.compType === 'appStyle' || this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 || this.compDTO.compStyle === CompStyle.Zh_Single_Row_03 || this.compDTO.compStyle === CompStyle.Card_Comp_Adv || this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
if (
this.nextCompDTO.compStyle === CompStyle.Card_09 ||
this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10 ||
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_09 ||
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_04 ||
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_06 ||
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_12
) {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
} else {
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
}
} else {
// Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
}
this.behindDevider()
}
... ...
... ... @@ -60,17 +60,19 @@ export struct ZhSingleRow02 {
toMore() {
if (this.moreWidth > this.initMoreWidth * 2) {
if (this.compDTO?.objectType === '11') {
ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
} 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)
}
ProcessUtils.compJumpPage(this.compDTO)
// if (this.compDTO?.objectType === '11') {
// ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
// } 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)
// }
}
}
... ...
... ... @@ -475,17 +475,19 @@ export struct ZhSingleRow03 {
}
private jumpToMore() {
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()
}
ProcessUtils.compJumpPage(this.compDTO)
return;
// 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()
// }
}
}
... ...
... ... @@ -65,11 +65,9 @@ export struct LiveHorizontalCardComponent {
}
liveToMore() {
ProcessUtils.compJumpPage(this.compDTO)
return;
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_INNER_NEW_PAGE',
... ... @@ -84,14 +82,8 @@ export struct LiveHorizontalCardComponent {
}
} as Params,
};
// this.compDTO.operDataList = []
// console.log('LiveHorizontalCardComponent', JSON.stringify(this.compDTO))
// console.log('LiveHorizontalCardComponent', this.compDTO.relId)
// console.log('LiveHorizontalCardComponent', this.compDTO.relType)
// console.log('LiveHorizontalCardComponent', JSON.stringify(taskAction))
WDRouterRule.jumpWithAction(taskAction)
} else {
// console.log('LiveHorizontalCardComponent', 'jumpToLiveMorePage')
this.jumpToLiveMorePage()
}
} else {
... ... @@ -103,7 +95,6 @@ export struct LiveHorizontalCardComponent {
linkUrl: this.compDTO.linkUrl,
pageId: this.compDTO.pageId
} as ContentDTO
// console.log('LiveHorizontalCardComponent', 'ProcessUtils.processPage')
ProcessUtils.processPage(contentDTO)
}
}
... ...