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

fix(sdk): parseRedirectInfo

上级 6045d0b4
......@@ -2702,7 +2702,7 @@ var serviceContext = (function (vue) {
referrerInfo.extraData = extraData;
}
return {
path,
path: path || '',
query: query ? '?' + query : '',
referrerInfo,
userAction,
......@@ -17096,8 +17096,10 @@ var serviceContext = (function (vue) {
const weexPlus = weex.requireModule('plus');
if (weexPlus.getRedirectInfo) {
const { path, query, referrerInfo } = parseRedirectInfo();
entryPagePath = path;
entryPageQuery = query;
if (path) {
entryPagePath = path;
entryPageQuery = query;
}
__uniConfig.referrerInfo = referrerInfo;
}
else {
......@@ -18546,7 +18548,7 @@ var serviceContext = (function (vue) {
});
plusGlobalEvent.addEventListener('resume', () => {
const info = parseRedirectInfo();
if (info && info.userAction) {
if (info && info.userAction && info.path) {
initEnterOptions(info);
initEnterReLaunch(info);
}
......
......@@ -17,8 +17,10 @@ export function initEntry() {
if (weexPlus.getRedirectInfo) {
const { path, query, referrerInfo } = parseRedirectInfo()!
entryPagePath = path
entryPageQuery = query
if (path) {
entryPagePath = path
entryPageQuery = query
}
__uniConfig.referrerInfo = referrerInfo
} else {
const argsJsonStr = plus.runtime.arguments
......
......@@ -35,7 +35,7 @@ export function initGlobalEvent() {
plusGlobalEvent.addEventListener('resume', () => {
const info = parseRedirectInfo()
if (info && info.userAction) {
if (info && info.userAction && info.path) {
initEnterOptions(info)
initEnterReLaunch(info)
}
......
......@@ -66,7 +66,7 @@ export function parseRedirectInfo(): RedirectInfo | void {
referrerInfo.extraData = extraData
}
return {
path,
path: path || '',
query: query ? '?' + query : '',
referrerInfo,
userAction,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册