Selaa lähdekoodia

发展历程

gzb
wangzhonglu 1 vuosi sitten
vanhempi
commit
e8984e29f1
5 muutettua tiedostoa jossa 89 lisäystä ja 75 poistoa
  1. 27
    0
      css/header.css
  2. 25
    3
      index.html
  3. 0
    61
      sections/header.html
  4. 37
    11
      sections/history.html
  5. 0
    0
      sections/log.html

+ 27
- 0
css/header.css Näytä tiedosto

@@ -0,0 +1,27 @@
1
+html,
2
+body {
3
+  margin: 0;
4
+  padding: 0;
5
+}
6
+.header_html_root {
7
+  display: flex;
8
+  justify-content: space-between;
9
+  align-items: center;
10
+  margin: 0 auto;
11
+  width: 1000px;
12
+  font-size: 16px;
13
+  line-height: 50px;
14
+  font-weight: bold;
15
+  box-sizing: border-box;
16
+}
17
+.header_html_root .header_html_item {
18
+  margin: 0 24px;
19
+  padding: 0 10px;
20
+  color: #333;
21
+  border-bottom: 4px solid transparent;
22
+  cursor: pointer;
23
+}
24
+.header_html_root .header_html_item:hover,
25
+.header_html_root .header_html_item.selected {
26
+  border-bottom: 4px solid #2d8cf0;
27
+}

+ 25
- 3
index.html Näytä tiedosto

@@ -12,6 +12,7 @@
12 12
       href="./librarys/bootstrapValidator@0.5.3/bootstrapValidator.css"
13 13
     />
14 14
     <link rel="stylesheet" href="./css/comm.css" />
15
+    <link rel="stylesheet" href="./css/header.css" />
15 16
     <style>
16 17
       body {
17 18
         background-color: #fff;
@@ -58,7 +59,17 @@
58 59
     </style>
59 60
   </head>
60 61
   <body>
61
-    <div class="top_header_root" data-header_page="index"></div>
62
+    <div class="top_header_root" data-header_page="index">
63
+      <div class="header_html_root">
64
+        <div class="header_html_item" data-url="index">用户信息</div>
65
+        <div class="header_html_item" data-url="history">发展历程</div>
66
+        <div class="header_html_item" data-url="service">服务案例</div>
67
+        <div class="header_html_item" data-url="school">学校图标</div>
68
+        <div class="header_html_item" data-url="trial">申请试用</div>
69
+        <div class="header_html_item" data-url="news">新闻资讯</div>
70
+        <div class="header_html_item" data-url="log">登录日志</div>
71
+      </div>
72
+    </div>
62 73
     <div class="user_main">
63 74
       <div class="header_box">
64 75
         <div class="header_left">
@@ -341,15 +352,26 @@
341 352
     <script src="./utils/index.js"></script>
342 353
     <script>
343 354
       $(function () {
355
+        let page_url = $(".top_header_root").data("header_page");
356
+        $(
357
+          '.header_html_root .header_html_item[data-url="' + page_url + '"]'
358
+        ).addClass("selected");
359
+        $(".header_html_root").on("click", ".header_html_item", function () {
360
+          let _url = $(this).data("url");
361
+          if (_url === "index") {
362
+            window.location.href = "/index.html";
363
+          } else {
364
+            window.location.href = "/sections/" + _url + ".html";
365
+          }
366
+        });
344 367
         if (!$.isLogin()) {
345 368
           window.location.href = "/sections/login.html";
346 369
           return;
347 370
         }
348
-        $(".top_header_root").load("./sections/header.html");
349 371
         let userSearch = {
350 372
           page: Number($.getQueryletiable("page")) || 1,
351 373
           size: 10,
352
-          userstate: Number($.getQueryletiable("userstate")) || 1,
374
+          userstate: Number($.getQueryletiable("userstate")) || 0,
353 375
           username: $.getQueryletiable("username") || "",
354 376
           total: 0,
355 377
           list: [],

+ 0
- 61
sections/header.html Näytä tiedosto

@@ -1,61 +0,0 @@
1
-<!DOCTYPE html>
2
-<html lang="en">
3
-<head>
4
-  <meta charset="UTF-8">
5
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
-  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
-  <title>Document</title>
8
-  <style>
9
-    html,
10
-    body {
11
-      margin: 0;
12
-      padding: 0;
13
-    }
14
-    .header_html_root {
15
-      display: flex;
16
-      justify-content: space-between;
17
-      align-items: center;
18
-      margin: 0 auto;
19
-      width: 1000px;
20
-      font-size: 16px;
21
-      line-height: 50px;
22
-      font-weight: bold;
23
-      box-sizing: border-box;
24
-    }
25
-    .header_html_root .header_html_item {
26
-      margin: 0 24px;
27
-      padding: 0 10px;
28
-      color: #333;
29
-      border-bottom: 4px solid transparent;
30
-      cursor: pointer;
31
-    }
32
-    .header_html_root .header_html_item:hover,
33
-    .header_html_root .header_html_item.selected {
34
-      border-bottom: 4px solid #2d8cf0;
35
-    }
36
-  </style>
37
-</head>
38
-<body>
39
-  <div class="header_html_root">
40
-    <div class="header_html_item" data-url="index">用户信息</div>
41
-    <div class="header_html_item" data-url="history">发展历程</div>
42
-    <div class="header_html_item" data-url="service">服务案例</div>
43
-    <div class="header_html_item" data-url="school">学校图标</div>
44
-    <div class="header_html_item" data-url="trial">申请试用</div>
45
-    <div class="header_html_item" data-url="news">新闻资讯</div>
46
-    <div class="header_html_item" data-url="log">登录日志</div>
47
-  </div>
48
-  <script>
49
-    let page_url = $(".top_header_root").data("header_page");
50
-    $('.header_html_root .header_html_item[data-url="' + page_url + '"]').addClass("selected");
51
-    $(".header_html_root").on("click", ".header_html_item", function () {
52
-      let _url = $(this).data("url");
53
-      if (_url === "index") {
54
-        window.location.href = "/index.html";
55
-      } else {
56
-        window.location.href = "/sections/" + _url + ".html";
57
-      }
58
-    });
59
-  </script>
60
-</body>
61
-</html>

+ 37
- 11
sections/history.html Näytä tiedosto

@@ -16,6 +16,7 @@
16 16
       href="../librarys/bootstrapValidator@0.5.3/bootstrapValidator.css"
17 17
     />
18 18
     <link rel="stylesheet" href="../css/comm.css" />
19
+    <link rel="stylesheet" href="../css/header.css" />
19 20
     <style>
20 21
       body {
21 22
         background-color: #fff;
@@ -59,7 +60,17 @@
59 60
     </style>
60 61
   </head>
61 62
   <body>
62
-    <div class="top_header_root" data-header_page="history"></div>
63
+    <div class="top_header_root" data-header_page="history">
64
+      <div class="header_html_root">
65
+        <div class="header_html_item" data-url="index">用户信息</div>
66
+        <div class="header_html_item" data-url="history">发展历程</div>
67
+        <div class="header_html_item" data-url="service">服务案例</div>
68
+        <div class="header_html_item" data-url="school">学校图标</div>
69
+        <div class="header_html_item" data-url="trial">申请试用</div>
70
+        <div class="header_html_item" data-url="news">新闻资讯</div>
71
+        <div class="header_html_item" data-url="log">登录日志</div>
72
+      </div>
73
+    </div>
63 74
     <div class="history_main">
64 75
       <div class="header_box">
65 76
         <div class="header_left">
@@ -123,11 +134,22 @@
123 134
     <script src="../utils/index.js"></script>
124 135
     <script>
125 136
       $(function () {
137
+        let page_url = $(".top_header_root").data("header_page");
138
+        $(
139
+          '.header_html_root .header_html_item[data-url="' + page_url + '"]'
140
+        ).addClass("selected");
141
+        $(".header_html_root").on("click", ".header_html_item", function () {
142
+          let _url = $(this).data("url");
143
+          if (_url === "index") {
144
+            window.location.href = "/index.html";
145
+          } else {
146
+            window.location.href = "/sections/" + _url + ".html";
147
+          }
148
+        });
126 149
         if (!$.isLogin()) {
127 150
           window.location.href = "/sections/login.html";
128 151
           return;
129 152
         }
130
-        $(".top_header_root").load("./header.html");
131 153
         let historySearch = {
132 154
           page: Number($.getQueryletiable("page")) || 1,
133 155
           size: 10,
@@ -231,24 +253,24 @@
231 253
               "</td><td>" +
232 254
               (_historyItem.dhmonth ? _historyItem.dhmonth : "") +
233 255
               "</td><td>" +
234
-              (_historyItem.content ? _historyItem.content : "") +
256
+              (_historyItem.ltype === 1 ? "中文" : "英文") +
235 257
               "</td><td>" +
236
-              (_historyItem.userstate === 1 ? "正常" : "已删除") +
258
+                (_historyItem.content ? _historyItem.content : "") +
237 259
               "</td><td>" +
238 260
               (_historyItem.createname ? _historyItem.createname : "") +
239 261
               "</td><td>" +
240 262
               $.dateFormat(_historyItem.createtime) +
241
-              '</td><td><span class="my_theme_color action_btn modify_btn" data-userid="' +
242
-              _historyItem.userid +
243
-              '">修改</span><span class="my_theme_color">|</span><span class="del_color action_btn del_btn" data-userid="' +
244
-              _historyItem.userid +
263
+              '</td><td><span class="my_theme_color action_btn modify_btn" data-dhid="' +
264
+              _historyItem.dhid +
265
+              '">修改</span><span class="my_theme_color">|</span><span class="del_color action_btn del_btn" data-dhid="' +
266
+              _historyItem.dhid +
245 267
               '">删除</span></td></tr>';
246 268
           });
247 269
           $(".historyTableBody").html(historyTableBodyHtml);
248
-          let del_userid = null;
270
+          let del_dhid = null;
249 271
           $(".historyTableBody").on("click", ".del_btn", function () {
250 272
             $("#userDelModal").modal("show");
251
-            del_userid = $(this).data("userid");
273
+            del_dhid = $(this).data("dhid");
252 274
           });
253 275
           $("#userDelModal .del_save").on("click", function () {
254 276
             $.ajax({
@@ -257,7 +279,7 @@
257 279
               dataType: "json",
258 280
               contentType: "application/json; charset=utf-8",
259 281
               data: JSON.stringify({
260
-                userid: del_userid,
282
+                dhid: del_dhid,
261 283
               }),
262 284
               success: function (data) {
263 285
                 $("#userDelModal").modal("hide");
@@ -276,6 +298,10 @@
276 298
             });
277 299
           });
278 300
         }
301
+        function setPageList() {
302
+          
303
+        }
304
+        getHistoryList();
279 305
       });
280 306
     </script>
281 307
   </body>

+ 0
- 0
sections/log.html Näytä tiedosto


Loading…
Peruuta
Tallenna