提交 43892230 编写于 作者: fxy060608's avatar fxy060608

refactor(sdk): remove resume logic

上级 9ff84e5f
......@@ -2678,13 +2678,6 @@ var serviceContext = (function (vue) {
function getEnterOptions() {
return enterOptions;
}
function initEnterOptions({ path, query, referrerInfo, }) {
extend(enterOptions, {
path,
query: query ? parseQuery(query) : {},
referrerInfo: referrerInfo || {},
});
}
function initLaunchOptions({ path, query, referrerInfo, }) {
extend(launchOptions, {
path,
......@@ -18577,11 +18570,12 @@ var serviceContext = (function (vue) {
emit(ON_APP_ENTER_BACKGROUND);
});
plusGlobalEvent.addEventListener('resume', () => {
const info = parseRedirectInfo();
if (info && info.userAction && info.path) {
initEnterOptions(info);
initEnterReLaunch(info);
}
// TODO 暂时不用
// const info = parseRedirectInfo()
// if (info && info.userAction && info.path) {
// initEnterOptions(info)
// initEnterReLaunch(info)
// }
emit(ON_APP_ENTER_FOREGROUND, getEnterOptions());
});
weexGlobalEvent.addEventListener('uistylechange', function (event) {
......@@ -18614,13 +18608,6 @@ var serviceContext = (function (vue) {
}
function onPlusMessage(type, callback, once = false) {
UniServiceJSBridge.subscribe('plusMessage.' + type, callback, once);
}
function initEnterReLaunch(info) {
__uniConfig.realEntryPagePath =
__uniConfig.realEntryPagePath || __uniConfig.entryPagePath;
__uniConfig.entryPagePath = info.path;
__uniConfig.entryPageQuery = info.query;
$reLaunch({ url: addLeadingSlash(info.path) + info.query }, { resolve() { }, reject() { } });
}
function initAppLaunch(appVm) {
......
......@@ -10,8 +10,6 @@ import { $reLaunch } from '../../api/route/_reLaunch'
import {
EVENT_BACKBUTTON,
backbuttonListener,
parseRedirectInfo,
initEnterOptions,
getEnterOptions,
RedirectInfo,
} from './utils'
......@@ -34,11 +32,12 @@ export function initGlobalEvent() {
})
plusGlobalEvent.addEventListener('resume', () => {
const info = parseRedirectInfo()
if (info && info.userAction && info.path) {
initEnterOptions(info)
initEnterReLaunch(info)
}
// TODO 暂时不用
// const info = parseRedirectInfo()
// if (info && info.userAction && info.path) {
// initEnterOptions(info)
// initEnterReLaunch(info)
// }
emit(ON_APP_ENTER_FOREGROUND, getEnterOptions())
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册