尝试过引入sdk 1.3.0 和 1.3.2均无效
function jumpType() {
alert(‘呵呵’)
function miniprogramReady(){
alert(‘呵呵哒’)
if(window.__wxjs_environment === ‘miniprogram’){
alert(window.__wxjs_environment)
wx.miniProgram.navigateTo({
url:
‘/pages/frontend/Amap/index’
});
//wx.miniProgram.navigateBack({
//delta: 1
//});
}else{
location.href = ‘<?=$this->url->get(‘user/ticket’)?>’;
}
}
if (!window.WeixinJSBridge || !WeixinJSBridge.invoke) {
document.addEventListener(‘WeixinJSBridgeReady’, miniprogramReady, false)
}else{
miniprogramReady()
}
}