webview打开H5,wx.miniProgram.navigateTo无效
小程序代码
<web-view src=“https://xxxxxx.com#wechat_redirect”></web-view>
webview打开的H5页面。
点击调用方法是没有任何反应的,看别人都是直接可以的,求解
<a href=“javascript:;” onclick=“goHref()”>
<script type=“text/javascript” src=“https://res.wx.qq.com/open/js/jweixin-1.3.2.js”></script>
<script>
// 跳转到小程序的一个页面
goHref=function(){
wx.miniProgram.navigateTo({
url: ‘/pages/login/login’,
success: function(){
alert(‘success’)
},
fail: function(){
alert(‘fail’);
},
complete:function(){
alert(‘complete’);
}
})
}
</script>
