|
@@ -4,9 +4,9 @@
|
|
//$ionicNavBarDelegate.showBackButton(false);
|
|
//$ionicNavBarDelegate.showBackButton(false);
|
|
$scope.wechat_login = function(){
|
|
$scope.wechat_login = function(){
|
|
var scope = "snsapi_userinfo", state = "_" + (+new Date());
|
|
var scope = "snsapi_userinfo", state = "_" + (+new Date());
|
|
- Wechat.auth(scope, state, function (response) {
|
|
|
|
|
|
+ // Wechat.auth(scope, state, function (response) {
|
|
// alert("response:"+JSON.stringify(response));
|
|
// alert("response:"+JSON.stringify(response));
|
|
- // var response={code:1231};
|
|
|
|
|
|
+ var response={code:1231};
|
|
if(response.code){
|
|
if(response.code){
|
|
msg.loading('登录中...');
|
|
msg.loading('登录中...');
|
|
userService.wechat_login(response.code).then(function(result){
|
|
userService.wechat_login(response.code).then(function(result){
|
|
@@ -26,9 +26,9 @@
|
|
$state.go("loginAccount",{wechat:$scope.wecaht});
|
|
$state.go("loginAccount",{wechat:$scope.wecaht});
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- }, function (error) {
|
|
|
|
- console.log("Failed: " + JSON.stringify(error));
|
|
|
|
- });
|
|
|
|
|
|
+ // }, function (error) {
|
|
|
|
+ // console.log("Failed: " + JSON.stringify(error));
|
|
|
|
+ // });
|
|
//$state.go("loginAccount");
|
|
//$state.go("loginAccount");
|
|
};
|
|
};
|
|
}]);
|
|
}]);
|