原因:微信公众号未配置或者小程序未配置
解决方法:
??:ip白名单一定要配置
(1)查看接口是否正常返回(是有参数数据返回的),返回url参数是否是你的域名,如下:
{"status":200,"msg":"ok","data":{"debug":false,"beta":true,"jsApiList":["openAddress","updateTimelineShareData","updateAppMessageShareData","onMenuShareTimeline","onMenuShareAppMessage","onMenuShareQQ","onMenuShareWeibo","onMenuShareQZone","startRecord","stopRecord","onVoiceRecordEnd","playVoice","pauseVoice","stopVoice","onVoicePlayEnd","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","translateVoice","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","closeWindow","scanQRCode","chooseWXPay","openProductSpecificView","addCard","chooseCard","openCard"],"openTagList":[],"appId":"公众号APPID","nonceStr":"0EjJPGLkLq","timestamp":1660785666,"url":"https:\/\/pro.crmeb.net","signature":"4a962caabc1055acf3b9eea76b9334b6766a7782"}}
Copy
(2)有配置异常返回结果如下:
{"status":200,"msg":"ok","data":[]}
Copy
文件:项目根目录/crmeb/services/wechat/OfficialAccount.php
如下图所示部分:
?
写入log日志,可以比较清楚的知道微信配置是哪里有问题
查看是否能正常授权
如果能,手机端不能,则清楚手机微信缓存在尝试