We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问题的具体描述
我的子应用地址设置的是:https://xxx/profile/?id=xxx#/participated
但在子应用中实际拿不到 /participated
看源码是
micro-app/src/libs/utils.ts
Line 309 in de59bea
export function formatAppURL(url: string | null, appName: string | null = null): string { if (!isString(url) || !url) return '' try { const { origin, pathname, search } = createURL(addProtocol(url), (window.rawWindow || window).location.href) /** * keep the original url unchanged, such as .html .node .php .net .etc, search, except hash * BUG FIX: Never using '/' to complete url, refer to https://github.com/jd-opensource/micro-app/issues/1147 */ const fullPath = `${origin}${pathname}${search}` return /^https?:\/\//.test(fullPath) ? fullPath : '' } catch (e) { logError(e, appName) return '' } }
想问一下为什么要把子应用 url 的 hash 给干掉,这个会有什么问题吗?
The text was updated successfully, but these errors were encountered:
同样的问题...
Sorry, something went wrong.
@Fov6363 找到解决方案了,子应用配置default-page:#/participated , 同时去除子应用配置url参数中的hash值
default-page:#/participated
@sandlz 抱歉,场景还不一样,我们这个子 hash 路由是可以用户配置的,没有办法在代码中写死
No branches or pull requests
问题描述
我的子应用地址设置的是:https://xxx/profile/?id=xxx#/participated
但在子应用中实际拿不到 /participated
看源码是
micro-app/src/libs/utils.ts
Line 309 in de59bea
想问一下为什么要把子应用 url 的 hash 给干掉,这个会有什么问题吗?
The text was updated successfully, but these errors were encountered: