You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
812 B
28 lines
812 B
/**
|
|
* Created by Administrator on 2016/11/24.
|
|
*/
|
|
function checkCookie() {
|
|
var token = cookie.get("token");
|
|
if (token && token.length > 0) {
|
|
return token;
|
|
} else {
|
|
location.href = "../pages/login.html";
|
|
return null;
|
|
}
|
|
}
|
|
|
|
function initPage(title) {
|
|
$('#card-page-wrapper').prepend('<div class="row"><div class="col-lg-12"><h2 class="page-header">'+title+'</h2></div></div>');
|
|
|
|
var token = checkCookie();
|
|
var startDate = moment().subtract(3, 'days').format('YYYY-MM-DD');
|
|
var endDate = moment().subtract(0, 'days').format('YYYY-MM-DD');
|
|
var args = { token: token, startDate: startDate, endDate: endDate };
|
|
return args;
|
|
}
|
|
|
|
function logout() {
|
|
cookie.remove("token");
|
|
cookie.remove("jurisdiction");
|
|
location.href = "../pages/login.html";
|
|
}
|