| xqd
@@ -4,9 +4,9 @@
|
|
|
//$ionicNavBarDelegate.showBackButton(false);
|
|
|
$scope.wechat_login = function(){
|
|
|
var scope = "snsapi_userinfo", state = "_" + (+new Date());
|
|
|
- // Wechat.auth(scope, state, function (response) {
|
|
|
+ Wechat.auth(scope, state, function (response) {
|
|
|
// alert("response:"+JSON.stringify(response));
|
|
|
- var response={code:1231};
|
|
|
+ // var response={code:1231};
|
|
|
if(response.code){
|
|
|
msg.loading('登录中...');
|
|
|
userService.wechat_login(response.code).then(function(result){
|
| xqd
@@ -26,9 +26,9 @@
|
|
|
$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");
|
|
|
};
|
|
|
}]);
|