urlscheme中query不支持encode?

小程序 文章 2021-03-03 18:01 374 0 全屏看文

AI助手支持GPT4.0

urlscheme中query不支持encode?Does query in urlscheme support encode?

urlscheme中query不支持encode?

新开放的短信跳转微信小程序功能中,生成链接是,传入参数query不支持对参数进行encode,如此想请教下,在此种跳转webview,参数为webview对应的url情况,如何保证获取参数的正确性

In the newly opened SMS jump wechat applet function, the generation link is that the incoming parameter query does not support encoding the parameters. If you want to ask, how can you ensure the correctness of the parameters when you jump to WebView and the parameters are the URL corresponding to WebView

回答:

默垂眸:

虽然会有些麻烦 但是还是可以解决这个问题的

就是你通过urlscheme跳转小程序的时候传入一个id 然后通过这个id去使用接口去获取后台存入的webview的url 然后放到webview展示即可

这么说能明白吗?

Brother斌🎈:

试一下参数传type=1,2之类的标识,再根据标识判断显示的url

微喵网络:

怎么跳转到小程序页面,就怎么跳转到小程序的webview页

何处慕jiao人:跳转webview页面,参数为url的情况下,url未进行encode,那么参数获取不正确,想请问有没有什么方法可以解决这个问题
微喵网络:不要通过参数传递url

-EOF-

AI助手支持GPT4.0