/** * 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('
'); 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"; }