App打开小程序出现【页面不存在】
发布于 4 年前 作者 xieyang 16016 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)

app打开小程序时,当path上带有://或%3A%2F%2F时,进入小程序就会出现【页面不存在的场景】,安卓没有问题

  • 预期表现

页面可以正常访问

  • 复现路径

‘/pages/index/index?test=https%3A%2F%2Fwww.baidu.com

  • 提供一个最简复现 Demo

ios代码

WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];

launchMiniProgramReq.userName = userName; 

launchMiniProgramReq.path = ‘/pages/index/index?test=https%3A%2F%2Fwww.baidu.com’; 

launchMiniProgramReq.miniProgramType = miniProgramType;

return  [WXApi sendReq:launchMiniProgramReq];

  • 其他

目前暂时使用 encodeURIComponent 2次解决问题,如 /pages/index/index?test=https%253A%252F%252Fwww.baidu.com ,但在page.onload 中的 获取到的test值表现不一样,安卓为 https%253A%252F%252Fwww.baidu.com, ios 为 https%3A%2F%2Fwww.baidu.com

1 回复

你好,能否提供复现问题的小程序代码片段?

回到顶部