Mike 7 年之前
父節點
當前提交
b0f30c9250
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      miaomiao/www/js/controllers/account.js

+ 5 - 5
miaomiao/www/js/controllers/account.js

xqd 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){
@@ -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");
             };
     }]);