Showing
2 changed files
with
9 additions
and
2 deletions
| @@ -8,6 +8,7 @@ import { ContentType } from '../common/ContentType' | @@ -8,6 +8,7 @@ import { ContentType } from '../common/ContentType' | ||
| 8 | import { WDRouterRule } from '../router/WDRouterRule' | 8 | import { WDRouterRule } from '../router/WDRouterRule' |
| 9 | import HomeChannelUtils from './HomeChannelUtils' | 9 | import HomeChannelUtils from './HomeChannelUtils' |
| 10 | import { ProcessUtils } from './ProcessUtils' | 10 | import { ProcessUtils } from './ProcessUtils' |
| 11 | +import { router } from '@kit.ArkUI' | ||
| 11 | 12 | ||
| 12 | const TAG = "AppInnerLink" | 13 | const TAG = "AppInnerLink" |
| 13 | 14 | ||
| @@ -129,7 +130,10 @@ export class AppInnerLink { | @@ -129,7 +130,10 @@ export class AppInnerLink { | ||
| 129 | if (params.type == "topic" && params.subType == "moring_evening_news") { | 130 | if (params.type == "topic" && params.subType == "moring_evening_news") { |
| 130 | ///解决早晚报切换不更新问题,内部更新id | 131 | ///解决早晚报切换不更新问题,内部更新id |
| 131 | SPHelper.default.saveSync('dailyPaperTopicPageId', params.pageId + ""); | 132 | SPHelper.default.saveSync('dailyPaperTopicPageId', params.pageId + ""); |
| 132 | - ProcessUtils.gotoMorningEveningPaper() | 133 | + ///如果当前界面已经是早晚报,暂不跳转 |
| 134 | + if (router.getState().name !== 'MorningEveningPaperPage') { | ||
| 135 | + ProcessUtils.gotoMorningEveningPaper() | ||
| 136 | + } | ||
| 133 | } | 137 | } |
| 134 | 138 | ||
| 135 | if (params.type == "channel") { | 139 | if (params.type == "channel") { |
| @@ -199,7 +199,10 @@ function handleJsCallAppInnerLinkMethod(data: Message) { | @@ -199,7 +199,10 @@ function handleJsCallAppInnerLinkMethod(data: Message) { | ||
| 199 | if (urlParams.get('subType') === 'moring_evening_news') { | 199 | if (urlParams.get('subType') === 'moring_evening_news') { |
| 200 | ///解决早晚报切换不更新问题,内部更新id | 200 | ///解决早晚报切换不更新问题,内部更新id |
| 201 | SPHelper.default.saveSync('dailyPaperTopicPageId', content.pageId + ""); | 201 | SPHelper.default.saveSync('dailyPaperTopicPageId', content.pageId + ""); |
| 202 | - ProcessUtils.gotoMorningEveningPaper() | 202 | + ///如果当前界面已经是早晚报,暂不跳转 |
| 203 | + if (router.getState().name !== 'MorningEveningPaperPage') { | ||
| 204 | + ProcessUtils.gotoMorningEveningPaper() | ||
| 205 | + } | ||
| 203 | } | 206 | } |
| 204 | if (urlParams.get('subType') === 'electronic_newspapers') { | 207 | if (urlParams.get('subType') === 'electronic_newspapers') { |
| 205 | ProcessUtils.gotoENewsPaper() | 208 | ProcessUtils.gotoENewsPaper() |
-
Please register or login to post a comment