|
|
@@ -1906,11 +1906,13 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
});
|
|
|
|
|
|
modalInstance.result.then(function(){
|
|
|
- $scope.tableParams.reload();
|
|
|
}, function(){
|
|
|
-
|
|
|
});
|
|
|
};
|
|
|
+
|
|
|
+ $scope.addUser = function(newUser) {
|
|
|
+ $scope.adding = true;
|
|
|
+ };
|
|
|
});
|
|
|
|
|
|
app.controller('PasswordCtrl', function($scope, $modalInstance, user, AccountUser, toaster){
|
|
|
@@ -1921,7 +1923,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
$scope.checking = true;
|
|
|
$scope.checkSuccess = false;
|
|
|
$scope.checkFailed = false;
|
|
|
- console.log(password);
|
|
|
AccountUser.checkPassword({password: password}, function(data){
|
|
|
$scope.checkSuccess = true;
|
|
|
$scope.checking = false;
|
|
|
@@ -1933,9 +1934,25 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
});
|
|
|
};
|
|
|
|
|
|
- //确认送样
|
|
|
+ //修改密码
|
|
|
$scope.ok = function () {
|
|
|
-
|
|
|
+ console.log($scope.user.newPassword);
|
|
|
+ console.log($scope.user.newPassword1);
|
|
|
+ if($scope.user.newPassword == $scope.user.newPassword1) {//验证重复密码相等
|
|
|
+ AccountUser.updatePassword({password: $scope.user.password, newPassword: $scope.user.newPassword}, {}, function(data){
|
|
|
+ toaster.pop('success', '成功', '修改密码成功,请牢记您的新密码。');
|
|
|
+ $scope.user.password = null;
|
|
|
+ $scope.user.newPassword = null;
|
|
|
+ $scope.user.newPassword1 = null;
|
|
|
+ $scope.checking = false;
|
|
|
+ $scope.checkSuccess = false;
|
|
|
+ $scope.checkFailed = false;
|
|
|
+ }, function(response){
|
|
|
+ toaster.pop('error', '错误', response.data);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ toaster.pop('error', '错误', '重复密码不一致');
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
$scope.cancel = function () {
|