diff --git a/src/platforms/app-plus/service/api/route/navigate-back.js b/src/platforms/app-plus/service/api/route/navigate-back.js index f20e65466620ee3b20ef9178293911adc9551fe0..905e9e07604a49fe12e5665fe697d19837607a4b 100644 --- a/src/platforms/app-plus/service/api/route/navigate-back.js +++ b/src/platforms/app-plus/service/api/route/navigate-back.js @@ -50,7 +50,7 @@ function back (delta, animationType, animationDuration) { }) } - const backPage = function () { + const backPage = function (webview) { if (animationType) { webview.close(animationType, animationDuration || ANI_DURATION) } else { @@ -69,11 +69,13 @@ function back (delta, animationType, animationDuration) { }) } + const webview = currentPage.$getAppWebview() if (!currentPage.__uniapp_webview) { - return backPage() + return backPage(webview) } - const webview = currentPage.$getAppWebview() - backWebview(webview, backPage) + backWebview(webview, () => { + backPage(webview) + }) } export function navigateBack ({