yujian
2020-05-09 7e7db2fa55a9a3af46d4fd8ede0dee147f101d64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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();
    
    
});