Showing
1 changed file
with
12 additions
and
18 deletions
| 1 | -import { Action, NewspaperListItemBean, NewspaperPositionItemBean, Params } from 'wdBean'; | 1 | +import { Action, ContentDTO, NewspaperListItemBean, NewspaperPositionItemBean, Params } from 'wdBean'; |
| 2 | import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'; | 2 | import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'; |
| 3 | import { StringUtils } from 'wdKit'; | 3 | import { StringUtils } from 'wdKit'; |
| 4 | -import { WDRouterRule } from 'wdRouter'; | 4 | +import { ProcessUtils, WDRouterRule } from 'wdRouter'; |
| 5 | import { newsSkeleton } from './skeleton/newsSkeleton'; | 5 | import { newsSkeleton } from './skeleton/newsSkeleton'; |
| 6 | 6 | ||
| 7 | @Component | 7 | @Component |
| @@ -62,21 +62,15 @@ export struct ENewspaperItemComponent { | @@ -62,21 +62,15 @@ export struct ENewspaperItemComponent { | ||
| 62 | } | 62 | } |
| 63 | if (event.type === TouchType.Up) { | 63 | if (event.type === TouchType.Up) { |
| 64 | this.context.clearRect(0, 0, this.context.width, this.context.height) | 64 | this.context.clearRect(0, 0, this.context.width, this.context.height) |
| 65 | - if (this.itemBeanClicked && this.itemBeanClicked.newsId) { | ||
| 66 | - let taskAction: Action = { | ||
| 67 | - type: 'JUMP_INNER_NEW_PAGE', | ||
| 68 | - params: { | ||
| 69 | - contentID: '' + this.itemBeanClicked.newsId, | ||
| 70 | - pageID: 'IMAGE_TEXT_DETAIL', | ||
| 71 | - extra: { | ||
| 72 | - relType: this.itemBeanClicked.relType ?? '', | ||
| 73 | - relId: '' + this.itemBeanClicked.relId, | ||
| 74 | - sourcePage: '5' | ||
| 75 | - } as ExtraDTO | ||
| 76 | - } as Params, | ||
| 77 | - }; | ||
| 78 | - WDRouterRule.jumpWithAction(taskAction) | ||
| 79 | - | 65 | + if (this.itemBeanClicked != null && this.itemBeanClicked.newsId != 0) { |
| 66 | + //公共跳转 | ||
| 67 | + let content: ContentDTO = { | ||
| 68 | + objectId:this.itemBeanClicked.newsId+'', | ||
| 69 | + objectType:this.itemBeanClicked.newsType+'', | ||
| 70 | + relId:this.itemBeanClicked.relId+'', | ||
| 71 | + relType:this.itemBeanClicked.relType ?? '0' | ||
| 72 | + } as ContentDTO | ||
| 73 | + ProcessUtils.processPage(content) | ||
| 80 | this.itemBeanClicked = {} as NewspaperPositionItemBean | 74 | this.itemBeanClicked = {} as NewspaperPositionItemBean |
| 81 | } | 75 | } |
| 82 | } | 76 | } |
| @@ -84,7 +78,7 @@ export struct ENewspaperItemComponent { | @@ -84,7 +78,7 @@ export struct ENewspaperItemComponent { | ||
| 84 | let mx = event.touches[0].x; | 78 | let mx = event.touches[0].x; |
| 85 | let my = event.touches[0].y; | 79 | let my = event.touches[0].y; |
| 86 | if (this.startX - mx > 5 || mx - this.startX > 5 || this.startY - my > 5 || my - this.startY > 5) { | 80 | if (this.startX - mx > 5 || mx - this.startX > 5 || this.startY - my > 5 || my - this.startY > 5) { |
| 87 | - this.itemBeanClicked = {} as NewspaperPositionItemBean | 81 | + // this.itemBeanClicked = {} as NewspaperPositionItemBean |
| 88 | this.context.clearRect(0, 0, this.context.width, this.context.height) | 82 | this.context.clearRect(0, 0, this.context.width, this.context.height) |
| 89 | } | 83 | } |
| 90 | 84 |
-
Please register or login to post a comment