问题描述:
通过以下插件发现报错: can't find variable:wx(ios 浏览器)
<script src="https://cdn.jsdelivr.net/eruda/1.2.2/eruda.min.js"></script>
<script>eruda.init();</script>
wx.config({
debug : false,
appId : appId,
timestamp : timestamp,
nonceStr : nonceStr,
signature : signature,
jsApiList : [ 'chooseImage', 'uploadImage', 'downloadImage',
'previewImage', 'openLocation', 'getLocation',
'scanQRCode', 'checkJsApi', 'onMenuShareTimeline',
'onMenuShareAppMessage', 'onMenuShareQQ',
'onMenuShareWeibo', 'onMenuShareQZone' ]
});
解决方法:
找到代码中调用jweixin-1.2.0.js 复制粘贴,去浏览器打开
直接全选复制
粘贴到代码里
现在就可以去微信公众号上测试啦(推荐点击设置退出微信。重新进一下)