|
@@ -3,10 +3,15 @@
|
|
function ($scope,userService,$ionicNavBarDelegate, storage, $state, msg, $http, util) {
|
|
function ($scope,userService,$ionicNavBarDelegate, storage, $state, msg, $http, util) {
|
|
//$ionicNavBarDelegate.showBackButton(false);
|
|
//$ionicNavBarDelegate.showBackButton(false);
|
|
$scope.wechat_login = function(){
|
|
$scope.wechat_login = function(){
|
|
|
|
+<<<<<<< HEAD
|
|
/* 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) {
|
|
|
|
+=======
|
|
|
|
+ var scope = "snsapi_userinfo", state = "_" + (+new Date());
|
|
|
|
+ // Wechat.auth(scope, state, function (response) {
|
|
|
|
+>>>>>>> 360a5ba8c8ad9157ee85aa0345e508f1865df1a6
|
|
// 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,10 +31,17 @@
|
|
$state.go("loginAccount",{wechat:$scope.wecaht});
|
|
$state.go("loginAccount",{wechat:$scope.wecaht});
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+<<<<<<< HEAD
|
|
}, function (error) {
|
|
}, function (error) {
|
|
console.log("Failed: " + JSON.stringify(error));
|
|
console.log("Failed: " + JSON.stringify(error));
|
|
});*/
|
|
});*/
|
|
$state.go("loginAccount");
|
|
$state.go("loginAccount");
|
|
|
|
+=======
|
|
|
|
+ // }, function (error) {
|
|
|
|
+ // console.log("Failed: " + JSON.stringify(error));
|
|
|
|
+ // });
|
|
|
|
+ //$state.go("loginAccount");
|
|
|
|
+>>>>>>> 360a5ba8c8ad9157ee85aa0345e508f1865df1a6
|
|
};
|
|
};
|
|
}]);
|
|
}]);
|
|
app.controller('loginCtrl', ["$scope", "userService","$stateParams","$ionicNavBarDelegate", "storage", "$state", "msg", "$http", "util","$timeout",
|
|
app.controller('loginCtrl', ["$scope", "userService","$stateParams","$ionicNavBarDelegate", "storage", "$state", "msg", "$http", "util","$timeout",
|