demo20230512/Browser_Local/js/Account/Account.Controller.js

32 lines
866 B
JavaScript
Raw Permalink Normal View History

2023-05-12 10:20:28 +08:00
/*
Logic Solution
WeeeCarbonFootprint
Controller for Account View
*/
angular.module('Account')
.controller('AccountCtrl', ['$scope', 'LogicService', '$window',
function ($scope, LogicService, $window) {
$scope.Login = function () {
LogicService.Login.post({ 'UserName': $scope.UserName, 'Password': $scope.Password, 'RememberMe': true })
.$promise.then(function (response) {
if (JSON.parse(response) > -1) {
} else {
}
$window.sessionStorage.Login = true;
window.location.href = '/Home/WeeeCarbonFootprint#/SurveyOrder/Order';
}, function (response) {
$window.sessionStorage.Login = false;
});
}
$scope.ForgotPwd = function () {
}
$scope.CreateAccount = function () {
window.location.href = '/Home/Account#/Create';
}
}])