mirror of
https://github.com/apache/rocketmq-dashboard.git
synced 2026-02-22 22:05:46 +08:00
Fix the issue caused by server.servlet.context-path when logging
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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});
|
||||
|
||||
Reference in New Issue
Block a user