静态网页:https://cloud1-0gfcx9nmbccc6b34-1309518548.tcloudbaseapp.com/jump-mp.html?id=320282000740
云函数代码:
静态网页:
function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
var r = window.location.search.substr(1).match(reg); //匹配目标参数
if (r != null) return unescape(r[2]); return null; //返回参数值
}
var queryId = getUrlParam("id")
<wx-open-launch-weapp id="launch-btn" username="gh_5c3c6d76392e" path="pages/package-C/yhym/search/index?id="+queryId> <!-- replace -->
已经找到解决贴了,内部游览器也可以带参跳转,没问题了