https:
<div class="hktshare">
<div>会客厅</div>
</div>
<div class="del_mask" id="hktshare_pop" style="display: none;">
<div class="del_block">
<div class="del_content">即将打开"智能会客厅"小程序</div>
<div>
<div class="del_cancel" onclick="delhkt()">取消</div>
<div class="wx_open_box">
<wx-open-launch-weapp id="launch-btn" username="gh_4b4a3e566703" path="pages/index/index?source=personalPlan&to=h5tp&linkUrl=https%3A%2F%2Fsales-dev.ihxlife.com%2Fimr%2Fyx_plan%2Fviews%2Fperson_plan%2Fper_produce_plan.html%3FagentCode%3D150007993%26agentState%3D0%26openid%3D%26planNo%3D2022041200000001%26createSource%3Dwmp%26pageName%3Dperson_plan">
<button class="hktbtn" style="font-weight: 600;line-height: 1.6rem;font-size: 0.65rem;width: 49%;background-color: white;color: #4f7b97;">确认</button>
</wx-open-launch-weapp>
</div>
</div>
</div>
</div>
<script src="https://sales-dev.ihxlife.com/HuaPM_V/bcard/h5/tpSwitch.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<script src="./lib/jquery-1.5.2.min.js"></script>
<script src="./lib/jquery.qrcode.min.js?v=1.11"></script>
<script>
$.get("https://uc-dev-bg.ihxlife.com/api/v1/wechat/signatureinfo/get?pageUrl="+location.href.split('#')[0],function(data,status){
wx.config({
debug: true,
appId: 'wxfe7a30139d06a90e',
timestamp: data.data.timestamp,
nonceStr: data.data.nonceStr,
signature: data.data.signature,
jsApiList: ["checkJsApi", "updateTimelineShareData", 'chooseImage',
'previewImage', 'onMenuShareTimeline', 'wx-open-launch-weapp'
],
openTagList:['wx-open-launch-weapp'],
})
wx.error(function (res) {
alert(JSON.stringify(res))
});
$('.hktbtn').click(() =>{
wx.miniProgram.navigateTo({
url:'pages/index/index?source=personalPlan&to=h5tp&linkUrl=https%3A%2F%2Fsales-dev.ihxlife.com%2Fimr%2Fyx_plan%2Fviews%2Fperson_plan%2Fper_produce_plan.html%3FagentCode%3D150007993%26agentState%3D0%26openid%3D%26planNo%3D2022041200000001%26createSource%3Dwmp%26pageName%3Dperson_plan'
})
console.log("点击了会客厅")
})
});
</script>
你直接参考官方的例子写,不要自己搞一套:https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html#%E5%BC%80%E6%94%BE%E6%A0%87%E7%AD%BE
你别放在<wx-open-launch-weapp里面试试
我把这个注销了,但还是不能跳转
<div class="wx_open_box">
<!-- <wx-open-launch-weapp id="launch-btn" username="gh_4b4a3e566703" path="pages/index/index?source=personalPlan&to=h5tp&linkUrl=https%3A%2F%2Fsales-dev.ihxlife.com%2Fimr%2Fyx_plan%2Fviews%2Fperson_plan%2Fper_produce_plan.html%3FagentCode%3D150007993%26agentState%3D0%26openid%3D%26planNo%3D2022041200000001%26createSource%3Dwmp%26pageName%3Dperson_plan"> -->
<!-- <template> -->
<button class="hktbtn" style="font-weight: 600;line-height: 1.6rem;font-size: 0.65rem;width: 49%;background-color: white;color: #4f7b97;">确认</button>
<!-- </template> -->
<!-- </wx-open-launch-weapp> -->
</div>