Skip to content

Commit

Permalink
fix: temporary annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
WX-DongXing committed Jan 3, 2025
1 parent dad8690 commit 1941c56
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions packages/api-proxy/src/platform/api/route/index.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function navigateTo (options = {}) {
// if (toPending) {
// return
// }
toPending = true
// toPending = true
const navigation = Object.values(global.__mpxPagesMap || {})[0]?.[1]
const navigationHelper = global.__navigationHelper
if (navigation && navigationHelper) {
Expand All @@ -62,9 +62,9 @@ function navigateTo (options = {}) {
}
// let redirectPending = false
function redirectTo (options = {}) {
if (redirectPending) {
return
}
// if (redirectPending) {
// return
// }
// redirectPending = true
const navigation = Object.values(global.__mpxPagesMap || {})[0]?.[1]
const navigationHelper = global.__navigationHelper
Expand All @@ -86,20 +86,20 @@ function redirectTo (options = {}) {
}
}
}
let backPending = false
// let backPending = false
function navigateBack (options = {}) {
if (backPending) {
return
}
backPending = true
// if (backPending) {
// return
// }
// backPending = true
const navigation = Object.values(global.__mpxPagesMap || {})[0]?.[1]
const navigationHelper = global.__navigationHelper
if (navigation && navigationHelper) {
const delta = options.delta || 1
const routeLength = navigation.getState().routes.length
if (delta >= routeLength && global.__mpx?.config.rnConfig.onAppBack?.(delta - routeLength + 1)) {
nextTick(() => {
backPending = false
// backPending = false
const res = { errMsg: 'navigateBack:ok' }
successHandle(res, options.success, options.complete)
})
Expand All @@ -115,16 +115,16 @@ function navigateBack (options = {}) {
}
}
navigationHelper.transitionEndCallback = () => {
backPending = false
// backPending = false
}
}
}
let reLaunchPending = false
// let reLaunchPending = false
function reLaunch (options = {}) {
if (reLaunchPending) {
return
}
reLaunchPending = true
// if (reLaunchPending) {
// return
// }
// reLaunchPending = true
const navigation = Object.values(global.__mpxPagesMap || {})[0]?.[1]
const navigationHelper = global.__navigationHelper
if (navigation && navigationHelper) {
Expand All @@ -149,7 +149,7 @@ function reLaunch (options = {}) {
failHandle(res, options.fail, options.complete)
}
navigationHelper.transitionEndCallback = () => {
reLaunchPending = false
// reLaunchPending = false
}
}
}
Expand Down

0 comments on commit 1941c56

Please sign in to comment.