wx.miniProgram.navigateTo无法进入fail异常处理
$( ".btn-kefu" ).click( function () { if (/miniprogram/i.test(navigator.userAgent) || window.__wxjs_environment === 'miniprogram' ){ wx.miniProgram.navigateTo({ url: '/pages/others/contactUs' , fail: function (){ console.log( "跳转失败" ); alert( "请拨打咨询热线:123456789" ); } }); } else { NTKF.im_openInPageChat(); } }) |
如果是在微信小程序中,则跳转到客服页面,跳转地址故意设置成无效以制造失败的效果,结果并没有进入fail回调中,为啥?
库是
https://res.wx.qq.com/open/js/jweixin-1.3.2.js