小程序
小游戏
企业微信
微信支付
扫描小程序码分享
在h5页面用wx-open-launch-weapp跳转到小程序之后,能否获取跳转之前的h5网页链接?
2 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
你的query写当前的 location.href
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
<wx-open-launch-weapp id="launch-btn" username="gh_7c2bc00a6bf8" :path="path">
<script type="text/wxtag-template">
<style> img { width: 100%;} </style>
<img src="https://qiniu-image.qtshe.com/20201207-05.png" alt="" />
</script>
</wx-open-launch-weapp>
data() {
return {
path: `pages/index/index.html?localUrl=${window.location.href}`
}
onLoad(options) {
console.log(options.localUrl)
你跳转的时候把H5通过参数传过来不就好了
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
你的query写当前的 location.href
<wx-open-launch-weapp id="launch-btn" username="gh_7c2bc00a6bf8" :path="path">
<script type="text/wxtag-template">
<style> img { width: 100%;} </style>
<img src="https://qiniu-image.qtshe.com/20201207-05.png" alt="" />
</script>
</wx-open-launch-weapp>
data() {
return {
path: `pages/index/index.html?localUrl=${window.location.href}`
}
}
onLoad(options) {
console.log(options.localUrl)
}
你跳转的时候把H5通过参数传过来不就好了