|
@@ -1,7 +1,7 @@
|
|
(function (app) {
|
|
(function (app) {
|
|
app.controller('wechatLoginCtrl', ["$scope", "userService","$ionicNavBarDelegate", "storage", "$state", "msg", "$http", "util","$timeout",
|
|
app.controller('wechatLoginCtrl', ["$scope", "userService","$ionicNavBarDelegate", "storage", "$state", "msg", "$http", "util","$timeout",
|
|
function ($scope, userService,$ionicNavBarDelegate, storage, $state, msg, $http, util, $timeout) {
|
|
function ($scope, userService,$ionicNavBarDelegate, storage, $state, msg, $http, util, $timeout) {
|
|
- $ionicNavBarDelegate.showBackButton(false);
|
|
|
|
|
|
+ //$ionicNavBarDelegate.showBackButton(false);
|
|
$scope.loginbywx = function(){
|
|
$scope.loginbywx = 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) {
|
|
@@ -10,7 +10,6 @@
|
|
}, function (reason) {
|
|
}, function (reason) {
|
|
alert("Failed: " + reason);
|
|
alert("Failed: " + reason);
|
|
});
|
|
});
|
|
- msg.loading('登录中...');
|
|
|
|
userService.loginbywx($scope.wechat).then(function(result){
|
|
userService.loginbywx($scope.wechat).then(function(result){
|
|
msg.hide();
|
|
msg.hide();
|
|
storage.setObject('user', result.data.data.user);
|
|
storage.setObject('user', result.data.data.user);
|
|
@@ -23,10 +22,11 @@
|
|
});
|
|
});
|
|
};
|
|
};
|
|
}]);
|
|
}]);
|
|
- app.controller('loginCtrl', ["$scope", "userService","$ionicNavBarDelegate", "storage", "$state", "msg", "$http", "util","$timeout",
|
|
|
|
- function ($scope, userService,$ionicNavBarDelegate, storage, $state, msg, $http, util, $timeout) {
|
|
|
|
- $ionicNavBarDelegate.showBackButton(false);
|
|
|
|
|
|
+ app.controller('loginCtrl', ["$scope", "userService","$stateParams","$ionicNavBarDelegate", "storage", "$state", "msg", "$http", "util","$timeout",
|
|
|
|
+ function ($scope, userService,$stateParams,$ionicNavBarDelegate, storage, $state, msg, $http, util, $timeout) {
|
|
|
|
+ //$ionicNavBarDelegate.showBackButton(false);
|
|
$scope.wecaht = $stateParams.wechat;
|
|
$scope.wecaht = $stateParams.wechat;
|
|
|
|
+ debugger;
|
|
$scope.vm = {
|
|
$scope.vm = {
|
|
mobile: '',
|
|
mobile: '',
|
|
verify_code: '',
|
|
verify_code: '',
|