张善主

fix(17938):电子报-2024.05.21第5版,右下角欢迎赐稿,点击无法跳转到内容详情,见附件视频。

import { Action, NewspaperListItemBean, NewspaperPositionItemBean, Params } from 'wdBean';
import { Action, ContentDTO, NewspaperListItemBean, NewspaperPositionItemBean, Params } from 'wdBean';
import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO';
import { StringUtils } from 'wdKit';
import { WDRouterRule } from 'wdRouter';
import { ProcessUtils, WDRouterRule } from 'wdRouter';
import { newsSkeleton } from './skeleton/newsSkeleton';
@Component
... ... @@ -62,21 +62,15 @@ export struct ENewspaperItemComponent {
}
if (event.type === TouchType.Up) {
this.context.clearRect(0, 0, this.context.width, this.context.height)
if (this.itemBeanClicked && this.itemBeanClicked.newsId) {
let taskAction: Action = {
type: 'JUMP_INNER_NEW_PAGE',
params: {
contentID: '' + this.itemBeanClicked.newsId,
pageID: 'IMAGE_TEXT_DETAIL',
extra: {
relType: this.itemBeanClicked.relType ?? '',
relId: '' + this.itemBeanClicked.relId,
sourcePage: '5'
} as ExtraDTO
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
if (this.itemBeanClicked != null && this.itemBeanClicked.newsId != 0) {
//公共跳转
let content: ContentDTO = {
objectId:this.itemBeanClicked.newsId+'',
objectType:this.itemBeanClicked.newsType+'',
relId:this.itemBeanClicked.relId+'',
relType:this.itemBeanClicked.relType ?? '0'
} as ContentDTO
ProcessUtils.processPage(content)
this.itemBeanClicked = {} as NewspaperPositionItemBean
}
}
... ... @@ -84,7 +78,7 @@ export struct ENewspaperItemComponent {
let mx = event.touches[0].x;
let my = event.touches[0].y;
if (this.startX - mx > 5 || mx - this.startX > 5 || this.startY - my > 5 || my - this.startY > 5) {
this.itemBeanClicked = {} as NewspaperPositionItemBean
// this.itemBeanClicked = {} as NewspaperPositionItemBean
this.context.clearRect(0, 0, this.context.width, this.context.height)
}
... ...