|

楼主 |
发表于 2016-12-21 09:33:04
|
显示全部楼层
另外,请问,我在安卓真机上调试的时候总是返回错误信息
这个错误信息我查了下,官网的说明是
1、用户输入错误,请用户重新输入;
2、用户由于超过3个月未使用appsecret,系统已进行重新设置,请登录公众平台=》开发者中心=》配置项=》里进行查看并使用最新的appsecret。
我的app现在是有微信支付的,微信支付的功能完全可以用,按理说,微信支付和登录都是用的同一套配置的appkey和appsecret,如果登录提示我的
appkey和appsecret错误的话,那支付应该也是会报错的,实际上支付是正常的。
登录是从demo里面copy过来的一份
- if (!navigator.weixin) {
- navigator.notification.alert("请安装最新版本微信app以进行登录!", $.noop, '提示');
- return;
- }
- var weixin = navigator.weixin;
- function saveUser(data) {
- $.alert(JSON.stringify(data));
- return;
- var user = {};
- user.userid = data.openid;
- user.name = data.nickname || "NONAME";
- justep.Shell.userType.set(user.accountType);
- justep.Shell.userName.set(user.name);
- localStorage.setItem("userUUID", JSON.stringify(user));
- justep.Util.hint("登录成功");
- setTimeout(function()
- justep.Shell.closePage("indexmain");
- justep.Shell.showPage("indexmain");
- }, 3000);
- }
- weixin.ssoLogin(function() {
- weixin.getUserInfo(saveUser, function(reason) {
- justep.Util.hint("登录失败: " + JSON.stringify(reason), {
- "type" : "danger"
- });
- });
- }, function(reason) {
- justep.Util.hint("登录失败: " + JSON.stringify(reason), {
- "type" : "danger"
- })
复制代码
|
|