var serverUrl = "http://www.fschool365.cn/";
|
var token = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsIkxvZ2luVXNlciI6IjEiLCJpYXQiOjE0NzE3NDIxOTR9.mLbpKswkYJyaO-fvc_V2bLE0_yXgohRQCCrbrSSymrU";
|
|
function GetQueryString(name) {
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
var r = window.location.search.substr(1).match(reg);
|
if(r != null) return unescape(r[2]);
|
return null;
|
}
|
|
var sessionCache = {
|
json_value : "json",
|
getSessionCashe : function(key,dataType,remove){
|
var obj = window.localStorage.getItem(key);
|
if(dataType != null && dataType === "json"){
|
/*if(remove){
|
window.localStorage.removeItem(key);
|
}*/
|
return jQuery.parseJSON(obj);
|
}else{
|
/*if(remove){
|
window.localStorage.removeItem(key);
|
}*/
|
return obj;
|
}
|
},
|
setSessionCashe : function(key,value,dataType){
|
if(dataType != null && dataType === "json"){
|
window.localStorage.setItem(key,JSON.stringify(value));
|
}else{
|
window.localStorage.setItem(key,value);
|
}
|
}
|
}
|
|
|
var getUrlParam = function (name) {
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
var r = window.location.search.substr(1).match(reg);
|
if (r != null) return unescape(r[2]); return null;
|
}
|