跳转地址不能是tabbar地址,官方的帮助文档很粗糙,很多细节很坑!
wx.miniProgram.navigateTo无响应使用wx.miniProgram.navigateTo从web-view里面的网页打开小程序的一个页面/pages/locat/locat时没有响应。在开发工具上能正常跳转的,但是在真机上就没有响应了。请求指导帮助! 网页: <script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js" charset="utf-8"></script> <script> $(".dizhi_img").on("click",function () { var mappoint = $(this).attr("data-mappoint").split(","); var latitude = mappoint[1]; var longitude = mappoint[0]; var url = '/pages/location/location?latitude='+encodeURIComponent(latitude)+'&longitude='+encodeURIComponent(longitude)+ '&name='+encodeURIComponent($(this).attr("data-name"))+'&address='+encodeURIComponent($(this).attr("data-address")); wx.miniProgram.navigateTo({ url:url, success: function(){ console.log('success') }, fail: function(){ console.log('fail'); }, complete:function(){ console.log('complete'); } }); }); </script> 小程序: new Promise((resolve, reject) => { // 位置授权 wx.getSetting({ success(res) { if (!res.authSetting['scope.userLocation']) { wx.authorize({ scope: 'scope.userLocation', success(){ // 用户已经同意位置权限 resolve(true); }, fail(){ resolve(false); } }); } else { //用户原来已经授予过权限 resolve(true); } }, fail() { resolve(false); } }); // resolve(localtiontag); }).then((relc) => { console.log(relc); if(relc == true){ wx.getLocation({//获取当前经纬度 type: 'wgs84', //返回可以用于wx.openLocation的经纬度 success: function (res) { wx.openLocation({//使用微信内置地图查看位置。 latitude: parseFloat(decodeURIComponent(options.latitude)),//要去的纬度-地址 longitude: parseFloat(decodeURIComponent(options.longitude)),//要去的经度-地址 name: decodeURIComponent(options.name), address: decodeURIComponent(options.address) }); } }); }else{ wx.navigateBack({ changed: true }); } });
2018-09-03@徐金金,请问你是怎么解决的?能贴下代码吗?谢谢,我现在用这个接口,一直报 {"errcode":47001,"errmsg":"data format error hint}错误
敏感图片检测接口调用敏感图片检测接口 https://api.weixin.qq.com/wxa/img_sec_check?access_token= 总是返回 {"errcode":41005,"errmsg":"media data missing hint: [yccPpa00088***]"} 参数:@C:\phpStudy\WWW\test\upload_cut_tempimg\15246560060977.jpg
2018-06-01