|
@ -408,41 +408,41 @@
|
|
|
|
|
|
|
|
|
$(function () {
|
|
|
if (window.history && window.history.pushState) {
|
|
|
$(window).on('popstate', function () {
|
|
|
var hashLocation = location.hash;
|
|
|
var hashSplit = hashLocation.split("#!/");
|
|
|
var hashName = hashSplit[1];
|
|
|
if (hashName !== '') {
|
|
|
var hash = window.location.hash;
|
|
|
if (hash === '') {
|
|
|
$.ligerDialog.confirm('是否确认后退登出系统!', function (yes) {
|
|
|
if (yes) {
|
|
|
$.ajax({ //获取表的字段列表
|
|
|
type: "POST",
|
|
|
url: "${contextRoot}/system/logoutAction",
|
|
|
dataType: "json",
|
|
|
cache: false,
|
|
|
success: function (data) {
|
|
|
if (data.successFlg) {
|
|
|
localStorage.removeItem("userRole");
|
|
|
location.href = "${contextRoot}/"+data.data+"/loginPage";
|
|
|
}
|
|
|
else {
|
|
|
$.ligerDialog.error(data.message);
|
|
|
}
|
|
|
},
|
|
|
error: function (data) {
|
|
|
$.ligerDialog.error("Status:" + data.status + "(" + data.statusText + ")");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
window.history.pushState('forward', null, './indexPage');
|
|
|
}
|
|
|
<%--if (window.history && window.history.pushState) {--%>
|
|
|
<%--$(window).on('popstate', function () {--%>
|
|
|
<%--var hashLocation = location.hash;--%>
|
|
|
<%--var hashSplit = hashLocation.split("#!/");--%>
|
|
|
<%--var hashName = hashSplit[1];--%>
|
|
|
<%--if (hashName !== '') {--%>
|
|
|
<%--var hash = window.location.hash;--%>
|
|
|
<%--if (hash === '') {--%>
|
|
|
<%--$.ligerDialog.confirm('是否确认后退登出系统!', function (yes) {--%>
|
|
|
<%--if (yes) {--%>
|
|
|
<%--$.ajax({ //获取表的字段列表--%>
|
|
|
<%--type: "POST",--%>
|
|
|
<%--url: "${contextRoot}/system/logoutAction",--%>
|
|
|
<%--dataType: "json",--%>
|
|
|
<%--cache: false,--%>
|
|
|
<%--success: function (data) {--%>
|
|
|
<%--if (data.successFlg) {--%>
|
|
|
<%--localStorage.removeItem("userRole");--%>
|
|
|
<%--location.href = "${contextRoot}/"+data.data+"/loginPage";--%>
|
|
|
<%--}--%>
|
|
|
<%--else {--%>
|
|
|
<%--$.ligerDialog.error(data.message);--%>
|
|
|
<%--}--%>
|
|
|
<%--},--%>
|
|
|
<%--error: function (data) {--%>
|
|
|
<%--$.ligerDialog.error("Status:" + data.status + "(" + data.statusText + ")");--%>
|
|
|
<%--}--%>
|
|
|
<%--});--%>
|
|
|
<%--}--%>
|
|
|
<%--});--%>
|
|
|
<%--}--%>
|
|
|
<%--}--%>
|
|
|
<%--});--%>
|
|
|
<%--window.history.pushState('forward', null, './indexPage');--%>
|
|
|
<%--}--%>
|
|
|
|
|
|
isLogin();
|
|
|
indexPage.init();
|