admin
2021-01-04 aa6ef62aef83e277d4171df1d9f0803f91738216
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<html lang="zh-cn">
 
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>添加发现分类</title>
        <link href="css/bootstrap.min.css" rel="stylesheet">
        <link href="css/maincontent.css" rel="stylesheet">
        <link href="css/tablestyle.css" rel="stylesheet">
        <style>
            .checkbox{
                width: 20px;
                height: 20px;
            }
        </style>
    </head>
 
    <body>
        <nav class="navbar navbar-default navbar-fixed-top">
        </nav>
        <div id="mainbody">
            <div id="sidebar">
                <dl>
                </dl>
            </div>
            <div id="neirong">
                <div class="erjidh">
                    <ol class="breadcrumb">
                        <li>
                            <a href="findClass.html">发现分类</a>
                        </li>
                        <li class="active">添加发现分类</li>
                    </ol>
                </div>
                <table class="table">
                    <tbody>
                        <tr>
                            <td>
                                <form class="form-horizontal" role="form">
                                    <div class="form-group">
                                        <label for="input1" class="changdu1 control-label">名称</label>
                                        <div class="col-sm-7">
                                            <input type="text" class="form-control" id="input1" placeholder="">
                                        </div>
                                    </div>
                                </form>
                            </td>
                        </tr>
                    </tbody>
                </table>
 
                <table class="table">
                    <tbody>
                        <tr>
                            <td>
                                <form class="form-horizontal" role="form">
                                    <div class="form-group">
                                        <label for="input4" class="changdu1 control-label">权重</label>
                                        <div class="col-sm-7"></div>
                                        <span class="col-sm-7">
                        <input name="input2" class="form-control" id="input2"></input>
              </span></div>
                                </form>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <table class="table">
                    <tbody>
                        <tr>
                            <td>
                                <form  class="form-horizontal" role="form">
                                    <div class="form-group">
                                        <label for="input8" class="changdu1 control-label">是否显示</label>
                                        <input class="checkbox" type="checkbox" value="#"><div>
                                    </div>
                                    
                                </form>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <div class="button0">
                    <div class="button">
                        <button type="button" name="save" class="btn btn-primary">保存</button>
                    </div>
                    <div class="button">
                        <a href="findClass.html" class="btn btn-default" role="button">取消</a>
                    </div>
                </div>
            </div>
        </div>
        <script src="js/jquery.min.js"></script>
        <script src="js/bootstrap.min.js"></script>
        <script src="layer/layer.js"></script>
        <script src="js/nav.js"></script>
        <script src="js/common.js"></script>
        <script>
            $(function() {
 
                $("button[name='save']").bind("click", function() {
                    save();
                });
 
            });
 
            function save() {
                var name = $("#input1").val();
                var orderBy = $("#input2").val();
                var show = $(".checkbox")[0].checked;
                $.post("api/find/addFindClass", { "name": name, "orderBy": orderBy,"show":show }, function(data) {
                    if(data.code == "0") {
                        layer.alert('保存成功!', {
                            icon: 1,
                            skin: 'layer-ext-seaing',
                            yes:function(){
                                location.href="findClass.html";
                            }
                        })
                    } else {
                        layer.alert('保存失败!', {
                            icon: 2,
                            skin: 'layer-ext-seaing'
                        })
                    }
                }, "json");
            }
        </script>
    </body>
 
</html>