Fix the issue caused by server.servlet.context-path when logging

This commit is contained in:
StyleTang
2021-07-26 12:26:04 +08:00
committed by GitHub
parent bd85a9db96
commit 7d295fdab7
4 changed files with 16 additions and 16 deletions

View File

@@ -37,7 +37,7 @@ var app = angular.module('app', [
if (initFlag) return;
initFlag = true;
var url = '/login/check.query';
var url = 'login/check.query';
var setting = {
type: "GET",
timeout:15000,
@@ -110,10 +110,9 @@ var app = angular.module('app', [
});
app.factory('abc', function ($http, $window) {
console.log('xxxxxxx');
$http({
method: "GET",
url: "/login/check.query"
url: "login/check.query"
}).success(function (resp) {
if (resp.status == 0) {
alert(resp.data)

View File

@@ -24,7 +24,7 @@ app.controller('AppCtrl', ['$scope','$window','$translate','$http','Notification
method: "POST",
url: "login/logout.do"
}).success(function (resp) {
window.location = "/";
window.location = resp.data;
$window.sessionStorage.clear();
});
}

View File

@@ -34,9 +34,7 @@ app.controller('loginController', ['$scope','$location','$http','Notification','
if (resp.status == 0) {
Notification.info({message: 'Login successful, redirect now', delay: 2000});
$window.sessionStorage.setItem("username", $("#username").val());
//alert("XXXXX resp.data="+resp.data.sessionId);
//$window.sessionStorage.setItem("sessionId", resp.data.sessionId);
window.location = "/";
window.location = resp.data;
initFlag = false;
} else{
Notification.error({message: resp.errMsg, delay: 2000});