From caadeed579bd5aac4fbe60fcea5590457a4bd225 Mon Sep 17 00:00:00 2001 From: qiang Date: Mon, 13 Dec 2021 21:10:32 +0800 Subject: [PATCH] chore: build --- packages/uni-app-plus/dist/index.v3.js | 40 +++++++++++++++++--------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/packages/uni-app-plus/dist/index.v3.js b/packages/uni-app-plus/dist/index.v3.js index e50ba52e9..0b5d44049 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', () => { -- GitLab