Skip to content
New issue

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

micro-app的 URL不能带参数么 #18

Closed
zimo888 opened this issue Aug 4, 2021 · 4 comments
Closed

micro-app的 URL不能带参数么 #18

zimo888 opened this issue Aug 4, 2021 · 4 comments

Comments

@zimo888
Copy link

zimo888 commented Aug 4, 2021

我请求的url 格式是 https://xxx.com?decorator=xxx, 加载的时候url的参数没了。

<micro-app name='page1' url="https://www.baidu.com?a=1&b=2" baseurl='/home'></micro-app>
@bailicangdu
Copy link
Member

url只作为html的地址,没有其它作用,参数需要设置在浏览器地址上,详情可以查看 https://zeroing.jd.com/micro-app/docs.html#/zh-cn/route

@zimo888
Copy link
Author

zimo888 commented Aug 4, 2021

因为子是一个JSP页面,会请求一个接口返回JSP,需要带参数才能返回正确的 HTML,这种也不行么

@bailicangdu
Copy link
Member

这种情况比较特殊,可以通过配置fetch,在请求地址上手动添加参数,具体参考这里 https://zeroing.jd.com/micro-app/docs.html#/zh-cn/other?id=_2%e3%80%81%e8%87%aa%e5%ae%9a%e4%b9%89fetch

@zimo888
Copy link
Author

zimo888 commented Aug 4, 2021

嗯,这样做应该是可以了,issues我先关了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants