function gotoLogin() {
|
window.location.href = "login.html";
|
}
|
|
function getQueryString(name) {
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
var r = window.location.search.substr(1).match(reg);
|
if(r != null) return unescape(r[2]);
|
return null;
|
}
|
|
function doResponse(data, successEvent) {
|
if(data.code == 0)
|
successEvent;
|
else if(data.code == 2)
|
gotoLogin();
|
else
|
layer.msg(data.msg);
|
}
|
|
function getCommonTime(timestamp) {
|
var newDate = new Date();
|
newDate.setTime(timestamp);
|
return newDate.getFullYear() + "-" + (newDate.getMonth() + 1) + "-" + (newDate.getDay() + 1) + " " + newDate.getHours() + ":" + newDate.getMinutes();
|
}
|
|
function bindCheck() {
|
$(".check-all").bind("change", function() {
|
if($(this).is(':checked')) {
|
$(".check-item").prop("checked", true);
|
} else {
|
$(".check-item").prop("checked", false);
|
}
|
});
|
}
|
|
function setSystemItem(){
|
var optionHtml = $(".systemItem").html();
|
$.post("../new/api/v1/system/systemList",{},function(data){
|
if(data.code==0){
|
var systemList = data.data.systemList;
|
for(var ii = 1 ; ii <= systemList.length ; ii++){
|
$(".systemItem").append(optionHtml);
|
var system = systemList[ii-1];
|
var $curOption = $(".systemItem option").eq(ii);
|
$curOption.text(system.name);
|
$curOption.attr("key",system.platform);
|
$curOption.attr("package",system.packageName);
|
}
|
|
}
|
},'json');
|
}
|
|
$(function() {
|
|
setSystemItem();
|
|
|
});
|