密码不保存到cook里面

This commit is contained in:
luchenqun 2017-03-19 15:25:21 +08:00
parent 3ad3041e35
commit 980998c115
1 changed files with 2 additions and 3 deletions

View File

@ -1,5 +1,5 @@
app.controller('loginCtr', ['$scope', '$filter', '$state', '$cookieStore', 'bookmarkService', 'pubSubService', function($scope, $filter, $state, $cookieStore, bookmarkService, pubSubService) { app.controller('loginCtr', ['$scope', '$filter', '$state', '$cookieStore', 'bookmarkService', 'pubSubService', function($scope, $filter, $state, $cookieStore, bookmarkService, pubSubService) {
console.log("Hello loginCtr...", $cookieStore.get("username"), $cookieStore.get("password")); console.log("Hello loginCtr...", $cookieStore.get("username"));
pubSubService.publish('Common.menuActive', { pubSubService.publish('Common.menuActive', {
login: false, login: false,
@ -7,7 +7,7 @@ app.controller('loginCtr', ['$scope', '$filter', '$state', '$cookieStore', 'book
}); });
$scope.username = $cookieStore.get("username") || ""; $scope.username = $cookieStore.get("username") || "";
$scope.password = $cookieStore.get("password") || ""; $scope.password = "";
$scope.showErr = false; $scope.showErr = false;
$scope.errInfo = ''; $scope.errInfo = '';
@ -31,7 +31,6 @@ app.controller('loginCtr', ['$scope', '$filter', '$state', '$cookieStore', 'book
autoLogin: autoLogin, autoLogin: autoLogin,
}; };
$cookieStore.put("username", $scope.username); $cookieStore.put("username", $scope.username);
$cookieStore.put("password", $scope.password);
bookmarkService.login(params) bookmarkService.login(params)
.then((data) => { .then((data) => {
console.log(data); console.log(data);