经过打包了很多次的测试,发现问题出在了cordova版本上,之前因为需要降低node.js的版本,重新安装了cordova为最新版本12.0.0,在这个环境下,我打包出来的签名包可以正常拉起微信并进入授权成功回调函数。
之前开发配置的cordova版本是11.1.0,这个版本打出来的包就是可以拉起微信,但进入去授权成功回调函数
使用代码:
var scope = "snsapi_userinfo",
state = "_" + +new Date();
const _that = this;
Wechat.auth( scope, state, function (response) { // Toast("成功回调"); // Toast("444" + JSON.stringify(response)); _that.doLogin(response); _that.showMoreLoginWay = false; }, function (reason) { Toast("授权失败了"); } );
持续的输入与输出。
浙公网安备 33010602011771号