Showing
1 changed file
with
24 additions
and
15 deletions
| @@ -53,14 +53,23 @@ export struct LiveHorizontalCardComponent { | @@ -53,14 +53,23 @@ export struct LiveHorizontalCardComponent { | ||
| 53 | 53 | ||
| 54 | resetEdgeAnimation() { | 54 | resetEdgeAnimation() { |
| 55 | if (this.moreWidth > this.initMoreWidth) { | 55 | if (this.moreWidth > this.initMoreWidth) { |
| 56 | - this.moreWidth = this.moreWidth - 1 | ||
| 57 | - this.resetEdgeAnimation(); | 56 | + this.moreWidth = 16 |
| 58 | } | 57 | } |
| 59 | this.resetMoreTips() | 58 | this.resetMoreTips() |
| 60 | } | 59 | } |
| 61 | 60 | ||
| 62 | toMore() { | 61 | toMore() { |
| 63 | if (this.moreWidth > this.initMoreWidth * 2) { | 62 | if (this.moreWidth > this.initMoreWidth * 2) { |
| 63 | + this.liveToMore(); | ||
| 64 | + } | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + liveToMore() { | ||
| 68 | + if (!!this.compDTO.dataSourceType) { | ||
| 69 | + if (this.compDTO.dataSourceType === 'OBJECT_POS') { | ||
| 70 | + ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle) | ||
| 71 | + return; | ||
| 72 | + } | ||
| 64 | if (this.compDTO.linkUrl) { | 73 | if (this.compDTO.linkUrl) { |
| 65 | let taskAction: Action = { | 74 | let taskAction: Action = { |
| 66 | type: 'JUMP_H5_BY_WEB_VIEW', | 75 | type: 'JUMP_H5_BY_WEB_VIEW', |
| @@ -72,8 +81,19 @@ export struct LiveHorizontalCardComponent { | @@ -72,8 +81,19 @@ export struct LiveHorizontalCardComponent { | ||
| 72 | } else { | 81 | } else { |
| 73 | this.jumpToLiveMorePage() | 82 | this.jumpToLiveMorePage() |
| 74 | } | 83 | } |
| 84 | + } else { | ||
| 85 | + if (this.compDTO?.objectType === '11') { | ||
| 86 | + } else { | ||
| 87 | + const contentDTO: ContentDTO = { | ||
| 88 | + objectId: this.compDTO.objectId, | ||
| 89 | + objectType: this.compDTO.objectType, | ||
| 90 | + linkUrl: this.compDTO.linkUrl, | ||
| 91 | + pageId: this.compDTO.pageId | ||
| 92 | + } as ContentDTO | ||
| 93 | + ProcessUtils.processPage(contentDTO) | ||
| 94 | + } | ||
| 75 | } | 95 | } |
| 76 | - } | 96 | +} |
| 77 | 97 | ||
| 78 | async aboutToAppear(): Promise<void> { | 98 | async aboutToAppear(): Promise<void> { |
| 79 | this.loadImg = await onlyWifiLoadImg(); | 99 | this.loadImg = await onlyWifiLoadImg(); |
| @@ -105,17 +125,7 @@ export struct LiveHorizontalCardComponent { | @@ -105,17 +125,7 @@ export struct LiveHorizontalCardComponent { | ||
| 105 | .height(14) | 125 | .height(14) |
| 106 | } | 126 | } |
| 107 | .onClick(() => { | 127 | .onClick(() => { |
| 108 | - if (this.compDTO.linkUrl) { | ||
| 109 | - let taskAction: Action = { | ||
| 110 | - type: 'JUMP_H5_BY_WEB_VIEW', | ||
| 111 | - params: { | ||
| 112 | - url: this.compDTO.linkUrl | ||
| 113 | - } as Params, | ||
| 114 | - }; | ||
| 115 | - WDRouterRule.jumpWithAction(taskAction) | ||
| 116 | - } else { | ||
| 117 | - this.jumpToLiveMorePage() | ||
| 118 | - } | 128 | + this.liveToMore(); |
| 119 | }) | 129 | }) |
| 120 | } | 130 | } |
| 121 | }.justifyContent(FlexAlign.SpaceBetween) | 131 | }.justifyContent(FlexAlign.SpaceBetween) |
| @@ -201,7 +211,6 @@ export struct LiveHorizontalCardComponent { | @@ -201,7 +211,6 @@ export struct LiveHorizontalCardComponent { | ||
| 201 | .onTouch((event?: TouchEvent) => { | 211 | .onTouch((event?: TouchEvent) => { |
| 202 | if(event) { | 212 | if(event) { |
| 203 | if (event.type === TouchType.Up) { | 213 | if (event.type === TouchType.Up) { |
| 204 | - this.toMore(); | ||
| 205 | this.resetEdgeAnimation(); | 214 | this.resetEdgeAnimation(); |
| 206 | } | 215 | } |
| 207 | } | 216 | } |
-
Please register or login to post a comment