diff --git a/packages/uni-app-plus/dist/index.v3.js b/packages/uni-app-plus/dist/index.v3.js index e50ba52e9e50eee48e3eaf5504c20b8d02dc8b15..0b5d440494dd4b1a339c6ddef89649d67f7b5e7e 100644 --- a/packages/uni-app-plus/dist/index.v3.js +++ b/packages/uni-app-plus/dist/index.v3.js @@ -9807,6 +9807,22 @@ var serviceContext = (function () { const enterOptions = createLaunchOptions(); const launchOptions = createLaunchOptions(); + function getEnterOptions () { + return enterOptions + } + + function initEnterOptions ({ + path, + query, + referrerInfo + }) { + extend(enterOptions, { + path, + query: query ? parseQuery(query) : {}, + referrerInfo: referrerInfo || {} + }); + } + function initLaunchOptions ({ path, query, @@ -21707,18 +21723,12 @@ var serviceContext = (function () { callCurrentPageHook('onHide'); } - function onAppEnterForeground () { - const pages = getCurrentPages(); - if (pages.length === 0) { - return - } - const page = pages[pages.length - 1]; - const args = { - path: page.route, - query: page.options - }; - - callAppHook(getApp(), 'onShow', args); + function onAppEnterForeground (enterOptions) { + callAppHook(getApp(), 'onShow', enterOptions); + const pages = getCurrentPages(); + if (pages.length === 0) { + return + } callCurrentPageHook('onShow'); } @@ -22038,7 +22048,11 @@ var serviceContext = (function () { }); plus.globalEvent.addEventListener('resume', () => { - emit('onAppEnterForeground'); + const info = parseRedirectInfo(); + if (info && info.userAction) { + initEnterOptions(info); + } + emit('onAppEnterForeground', getEnterOptions()); }); plus.globalEvent.addEventListener('netchange', () => {