Showing
2 changed files
with
31 additions
and
583 deletions
| ... | ... | @@ -12,571 +12,9 @@ |
| 12 | 12 | 'use strict'; |
| 13 | 13 | |
| 14 | 14 | // Your code here... |
| 15 | - var MENU_DATE = { | |
| 16 | - "0": { | |
| 17 | - "title": "首页" | |
| 18 | - }, | |
| 19 | - "1": { | |
| 20 | - "title": "学院概况" | |
| 21 | - }, | |
| 22 | - "2": { | |
| 23 | - "title": "院长致辞", | |
| 24 | - "parent": "学院概况" | |
| 25 | - }, | |
| 26 | - "3": { | |
| 27 | - "title": "发展历程", | |
| 28 | - "parent": "学院概况" | |
| 29 | - }, | |
| 30 | - "4": { | |
| 31 | - "title": "现任领导", | |
| 32 | - "parent": "学院概况" | |
| 33 | - }, | |
| 34 | - "5": { | |
| 35 | - "title": "办学特色", | |
| 36 | - "parent": "学院概况" | |
| 37 | - }, | |
| 38 | - "6": { | |
| 39 | - "title": "学院架构", | |
| 40 | - "parent": "学院概况" | |
| 41 | - }, | |
| 42 | - "7": { | |
| 43 | - "title": "科学研究", | |
| 44 | - "parent": "学院概况" | |
| 45 | - }, | |
| 46 | - "8": { | |
| 47 | - "title": "人才培养", | |
| 48 | - "parent": "学院概况" | |
| 49 | - }, | |
| 50 | - "9": { | |
| 51 | - "title": "学院文化", | |
| 52 | - "parent": "学院概况" | |
| 53 | - }, | |
| 54 | - "10": { | |
| 55 | - "title": "国际化", | |
| 56 | - "parent": "学院概况" | |
| 57 | - }, | |
| 58 | - "11": { | |
| 59 | - "title": "师资队伍" | |
| 60 | - }, | |
| 61 | - "12": { | |
| 62 | - "title": "专职教师/共建团队PI", | |
| 63 | - "parent": "师资队伍" | |
| 64 | - }, | |
| 65 | - "13": { | |
| 66 | - "title": "兼职教授/研究生导师", | |
| 67 | - "parent": "师资队伍" | |
| 68 | - }, | |
| 69 | - "14": { | |
| 70 | - "title": "学术与学科" | |
| 71 | - }, | |
| 72 | - "15": { | |
| 73 | - "title": "通知通告", | |
| 74 | - "parent": "学术与学科" | |
| 75 | - }, | |
| 76 | - "16": { | |
| 77 | - "title": "学术报告", | |
| 78 | - "parent": "学术与学科" | |
| 79 | - }, | |
| 80 | - "17": { | |
| 81 | - "title": "海洋科学一级学科", | |
| 82 | - "parent": "学术与学科" | |
| 83 | - }, | |
| 84 | - "18": { | |
| 85 | - "title": "重点科研平台", | |
| 86 | - "parent": "学术与学科" | |
| 87 | - }, | |
| 88 | - "19": { | |
| 89 | - "title": "工作指引与指南", | |
| 90 | - "parent": "学术与学科" | |
| 91 | - }, | |
| 92 | - "20": { | |
| 93 | - "title": "规章制度", | |
| 94 | - "parent": "学术与学科" | |
| 95 | - }, | |
| 96 | - "21": { | |
| 97 | - "title": "表格下载", | |
| 98 | - "parent": "学术与学科" | |
| 99 | - }, | |
| 100 | - "22": { | |
| 101 | - "title": "教学与教务" | |
| 102 | - }, | |
| 103 | - "23": { | |
| 104 | - "title": "通知通告", | |
| 105 | - "parent": "教学与教务" | |
| 106 | - }, | |
| 107 | - "24": { | |
| 108 | - "title": "课程安排", | |
| 109 | - "parent": "教学与教务" | |
| 110 | - }, | |
| 111 | - "25": { | |
| 112 | - "title": "本科教务系统", | |
| 113 | - "parent": "教学与教务" | |
| 114 | - }, | |
| 115 | - "26": { | |
| 116 | - "title": "本科报考资讯", | |
| 117 | - "parent": "教学与教务" | |
| 118 | - }, | |
| 119 | - "27": { | |
| 120 | - "title": "与中学的衔接", | |
| 121 | - "parent": "教学与教务" | |
| 122 | - }, | |
| 123 | - "28": { | |
| 124 | - "title": "教研/实践育人立项", | |
| 125 | - "parent": "教学与教务" | |
| 126 | - }, | |
| 127 | - "29": { | |
| 128 | - "title": "创新/创业训练计划", | |
| 129 | - "parent": "教学与教务" | |
| 130 | - }, | |
| 131 | - "30": { | |
| 132 | - "title": "专业综合改革试点", | |
| 133 | - "parent": "教学与教务" | |
| 134 | - }, | |
| 135 | - "31": { | |
| 136 | - "title": "实验教学示范中心", | |
| 137 | - "parent": "教学与教务" | |
| 138 | - }, | |
| 139 | - "32": { | |
| 140 | - "title": "表格下载", | |
| 141 | - "parent": "教学与教务" | |
| 142 | - }, | |
| 143 | - "33": { | |
| 144 | - "title": "研究生教育" | |
| 145 | - }, | |
| 146 | - "34": { | |
| 147 | - "title": "通知通告", | |
| 148 | - "parent": "研究生教育" | |
| 149 | - }, | |
| 150 | - "35": { | |
| 151 | - "title": "专业方向", | |
| 152 | - "parent": "研究生教育" | |
| 153 | - }, | |
| 154 | - "36": { | |
| 155 | - "title": "课程安排", | |
| 156 | - "parent": "研究生教育" | |
| 157 | - }, | |
| 158 | - "37": { | |
| 159 | - "title": "研究生教学系统", | |
| 160 | - "parent": "研究生教育" | |
| 161 | - }, | |
| 162 | - "38": { | |
| 163 | - "title": "研究生招生信息", | |
| 164 | - "parent": "研究生教育" | |
| 165 | - }, | |
| 166 | - "39": { | |
| 167 | - "title": "研究生导师介绍", | |
| 168 | - "parent": "研究生教育" | |
| 169 | - }, | |
| 170 | - "40": { | |
| 171 | - "title": "工作指引与指南", | |
| 172 | - "parent": "研究生教育" | |
| 173 | - }, | |
| 174 | - "41": { | |
| 175 | - "title": "表格下载", | |
| 176 | - "parent": "研究生教育" | |
| 177 | - }, | |
| 178 | - "42": { | |
| 179 | - "title": "学生工作" | |
| 180 | - }, | |
| 181 | - "43": { | |
| 182 | - "title": "通知通告", | |
| 183 | - "parent": "学生工作" | |
| 184 | - }, | |
| 185 | - "44": { | |
| 186 | - "title": "团学组织", | |
| 187 | - "parent": "学生工作" | |
| 188 | - }, | |
| 189 | - "45": { | |
| 190 | - "title": "海科院迎新", | |
| 191 | - "parent": "学生工作" | |
| 192 | - }, | |
| 193 | - "46": { | |
| 194 | - "title": "学子风采", | |
| 195 | - "parent": "学生工作" | |
| 196 | - }, | |
| 197 | - "47": { | |
| 198 | - "title": "师生午餐会", | |
| 199 | - "parent": "学生工作" | |
| 200 | - }, | |
| 201 | - "48": { | |
| 202 | - "title": "海洋大讲堂", | |
| 203 | - "parent": "学生工作" | |
| 204 | - }, | |
| 205 | - "49": { | |
| 206 | - "title": "班级风采", | |
| 207 | - "parent": "学生工作" | |
| 208 | - }, | |
| 209 | - "50": { | |
| 210 | - "title": "就业信息", | |
| 211 | - "parent": "学生工作" | |
| 212 | - }, | |
| 213 | - "51": { | |
| 214 | - "title": "就业指导", | |
| 215 | - "parent": "学生工作" | |
| 216 | - }, | |
| 217 | - "52": { | |
| 218 | - "title": "管理办法", | |
| 219 | - "parent": "学生工作" | |
| 220 | - }, | |
| 221 | - "53": { | |
| 222 | - "title": "表格下载", | |
| 223 | - "parent": "学生工作" | |
| 224 | - }, | |
| 225 | - "54": { | |
| 226 | - "title": "人力资源" | |
| 227 | - }, | |
| 228 | - "55": { | |
| 229 | - "title": "通知公告", | |
| 230 | - "parent": "人力资源" | |
| 231 | - }, | |
| 232 | - "56": { | |
| 233 | - "title": "人才招聘", | |
| 234 | - "parent": "人力资源" | |
| 235 | - }, | |
| 236 | - "57": { | |
| 237 | - "title": "博士后工作", | |
| 238 | - "parent": "人力资源" | |
| 239 | - }, | |
| 240 | - "58": { | |
| 241 | - "title": "规章制度", | |
| 242 | - "parent": "人力资源" | |
| 243 | - }, | |
| 244 | - "59": { | |
| 245 | - "title": "办事程序", | |
| 246 | - "parent": "人力资源" | |
| 247 | - }, | |
| 248 | - "60": { | |
| 249 | - "title": "表格下载", | |
| 250 | - "parent": "人力资源" | |
| 251 | - }, | |
| 252 | - "61": { | |
| 253 | - "title": "党政综合" | |
| 254 | - }, | |
| 255 | - "62": { | |
| 256 | - "title": "通知通告", | |
| 257 | - "parent": "党政综合" | |
| 258 | - }, | |
| 259 | - "63": { | |
| 260 | - "title": "学院党委架构", | |
| 261 | - "parent": "党政综合" | |
| 262 | - }, | |
| 263 | - "64": { | |
| 264 | - "title": "两学一做专题", | |
| 265 | - "parent": "党政综合" | |
| 266 | - }, | |
| 267 | - "65": { | |
| 268 | - "title": "三严三实专题", | |
| 269 | - "parent": "党政综合" | |
| 270 | - }, | |
| 271 | - "66": { | |
| 272 | - "title": "教师代表委员会", | |
| 273 | - "parent": "党政综合" | |
| 274 | - }, | |
| 275 | - "67": { | |
| 276 | - "title": "视觉形象系统", | |
| 277 | - "parent": "党政综合" | |
| 278 | - }, | |
| 279 | - "68": { | |
| 280 | - "title": "师生服务指南", | |
| 281 | - "parent": "党政综合" | |
| 282 | - }, | |
| 283 | - "69": { | |
| 284 | - "title": "财务规定", | |
| 285 | - "parent": "党政综合" | |
| 286 | - }, | |
| 287 | - "70": { | |
| 288 | - "title": "规章制度", | |
| 289 | - "parent": "党政综合" | |
| 290 | - }, | |
| 291 | - "71": { | |
| 292 | - "title": "联系我们", | |
| 293 | - "parent": "党政综合" | |
| 294 | - }, | |
| 295 | - "72": { | |
| 296 | - "title": "设备与实验室" | |
| 297 | - }, | |
| 298 | - "73": { | |
| 299 | - "title": "规章制度", | |
| 300 | - "parent": "设备与实验室" | |
| 301 | - }, | |
| 302 | - "74": { | |
| 303 | - "title": "办事程序", | |
| 304 | - "parent": "设备与实验室" | |
| 305 | - }, | |
| 306 | - "75": { | |
| 307 | - "title": "表格下载", | |
| 308 | - "parent": "设备与实验室" | |
| 309 | - }, | |
| 310 | - "76": { | |
| 311 | - "title": "公共仪器预约", | |
| 312 | - "parent": "设备与实验室" | |
| 313 | - }, | |
| 314 | - "77": { | |
| 315 | - "title": "设备管理系统", | |
| 316 | - "parent": "设备与实验室" | |
| 317 | - }, | |
| 318 | - "78": { | |
| 319 | - "title": "学院文化" | |
| 320 | - }, | |
| 321 | - "79": { | |
| 322 | - "title": "以党建带群建", | |
| 323 | - "parent": "学院文化" | |
| 324 | - }, | |
| 325 | - "80": { | |
| 326 | - "title": "鼓励协同创新", | |
| 327 | - "parent": "学院文化" | |
| 328 | - }, | |
| 329 | - "81": { | |
| 330 | - "title": "倡导服务社会", | |
| 331 | - "parent": "学院文化" | |
| 332 | - }, | |
| 333 | - "82": { | |
| 334 | - "title": "畅通师生交流", | |
| 335 | - "parent": "学院文化" | |
| 336 | - }, | |
| 337 | - "83": { | |
| 338 | - "title": "打造文化精品", | |
| 339 | - "parent": "学院文化" | |
| 340 | - }, | |
| 341 | - "84": { | |
| 342 | - "title": "坚持国际化策略", | |
| 343 | - "parent": "学院文化" | |
| 344 | - }, | |
| 345 | - "85": { | |
| 346 | - "title": "校友之窗" | |
| 347 | - }, | |
| 348 | - "86": { | |
| 349 | - "title": "校友风采", | |
| 350 | - "parent": "校友之窗" | |
| 351 | - }, | |
| 352 | - "87": { | |
| 353 | - "title": "校友名录", | |
| 354 | - "parent": "校友之窗" | |
| 355 | - } | |
| 356 | - } | |
| 15 | + var MENU_DATE; | |
| 357 | 16 | |
| 358 | - var TAXONOMY_DATE = { | |
| 359 | - "0": { | |
| 360 | - "taxonomy": "学院概况", | |
| 361 | - "url": "198" | |
| 362 | - }, | |
| 363 | - "1": { | |
| 364 | - "taxonomy": "学院概况", | |
| 365 | - "url": "199" | |
| 366 | - }, | |
| 367 | - "2": { | |
| 368 | - "taxonomy": "人力资源", | |
| 369 | - "url": "178" | |
| 370 | - }, | |
| 371 | - "3": { | |
| 372 | - "taxonomy": "通知公告", | |
| 373 | - "url": "179" | |
| 374 | - }, | |
| 375 | - "4": { | |
| 376 | - "taxonomy": "人才招聘", | |
| 377 | - "url": "180" | |
| 378 | - }, | |
| 379 | - "5": { | |
| 380 | - "taxonomy": "博士后工作", | |
| 381 | - "url": "181" | |
| 382 | - }, | |
| 383 | - "6": { | |
| 384 | - "taxonomy": "校友之窗", | |
| 385 | - "url": "195" | |
| 386 | - }, | |
| 387 | - "7": { | |
| 388 | - "taxonomy": "校友风采", | |
| 389 | - "url": "196" | |
| 390 | - }, | |
| 391 | - "8": { | |
| 392 | - "taxonomy": "校友名录", | |
| 393 | - "url": "197" | |
| 394 | - }, | |
| 395 | - "9": { | |
| 396 | - "taxonomy": "研究生教育", | |
| 397 | - "url": "159" | |
| 398 | - }, | |
| 399 | - "10": { | |
| 400 | - "taxonomy": "通知通告", | |
| 401 | - "url": "160" | |
| 402 | - }, | |
| 403 | - "11": { | |
| 404 | - "taxonomy": "专业方向", | |
| 405 | - "url": "161" | |
| 406 | - }, | |
| 407 | - "12": { | |
| 408 | - "taxonomy": "课程安排", | |
| 409 | - "url": "162" | |
| 410 | - }, | |
| 411 | - "13": { | |
| 412 | - "taxonomy": "研究生招生信息", | |
| 413 | - "url": "163" | |
| 414 | - }, | |
| 415 | - "14": { | |
| 416 | - "taxonomy": "研究生导师介绍", | |
| 417 | - "url": "164" | |
| 418 | - }, | |
| 419 | - "15": { | |
| 420 | - "taxonomy": "工作指引与指南", | |
| 421 | - "url": "165" | |
| 422 | - }, | |
| 423 | - "16": { | |
| 424 | - "taxonomy": "表格下载", | |
| 425 | - "url": "166" | |
| 426 | - }, | |
| 427 | - "17": { | |
| 428 | - "taxonomy": "设备与实验室", | |
| 429 | - "url": "190" | |
| 430 | - }, | |
| 431 | - "18": { | |
| 432 | - "taxonomy": "规章制度", | |
| 433 | - "url": "191" | |
| 434 | - }, | |
| 435 | - "19": { | |
| 436 | - "taxonomy": "办事程序", | |
| 437 | - "url": "192" | |
| 438 | - }, | |
| 439 | - "20": { | |
| 440 | - "taxonomy": "表格下载", | |
| 441 | - "url": "193" | |
| 442 | - }, | |
| 443 | - "21": { | |
| 444 | - "taxonomy": "设备管理系统", | |
| 445 | - "url": "194" | |
| 446 | - }, | |
| 447 | - "22": { | |
| 448 | - "taxonomy": "学生工作", | |
| 449 | - "url": "167" | |
| 450 | - }, | |
| 451 | - "23": { | |
| 452 | - "taxonomy": "通知通告", | |
| 453 | - "url": "168" | |
| 454 | - }, | |
| 455 | - "24": { | |
| 456 | - "taxonomy": "海科院迎新", | |
| 457 | - "url": "169" | |
| 458 | - }, | |
| 459 | - "25": { | |
| 460 | - "taxonomy": "学子风采", | |
| 461 | - "url": "170" | |
| 462 | - }, | |
| 463 | - "26": { | |
| 464 | - "taxonomy": "师生午餐会", | |
| 465 | - "url": "171" | |
| 466 | - }, | |
| 467 | - "27": { | |
| 468 | - "taxonomy": "海洋大讲堂", | |
| 469 | - "url": "172" | |
| 470 | - }, | |
| 471 | - "28": { | |
| 472 | - "taxonomy": "班级风采", | |
| 473 | - "url": "173" | |
| 474 | - }, | |
| 475 | - "29": { | |
| 476 | - "taxonomy": "就业信息", | |
| 477 | - "url": "174" | |
| 478 | - }, | |
| 479 | - "30": { | |
| 480 | - "taxonomy": "就业指导", | |
| 481 | - "url": "175" | |
| 482 | - }, | |
| 483 | - "31": { | |
| 484 | - "taxonomy": "管理办法", | |
| 485 | - "url": "176" | |
| 486 | - }, | |
| 487 | - "32": { | |
| 488 | - "taxonomy": "表格下载", | |
| 489 | - "url": "177" | |
| 490 | - }, | |
| 491 | - "33": { | |
| 492 | - "taxonomy": "党政综合", | |
| 493 | - "url": "182" | |
| 494 | - }, | |
| 495 | - "34": { | |
| 496 | - "taxonomy": "通知通告", | |
| 497 | - "url": "183" | |
| 498 | - }, | |
| 499 | - "35": { | |
| 500 | - "taxonomy": "两学一做专题", | |
| 501 | - "url": "184" | |
| 502 | - }, | |
| 503 | - "36": { | |
| 504 | - "taxonomy": "三严三实专题", | |
| 505 | - "url": "185" | |
| 506 | - }, | |
| 507 | - "37": { | |
| 508 | - "taxonomy": "师生服务指南", | |
| 509 | - "url": "186" | |
| 510 | - }, | |
| 511 | - "38": { | |
| 512 | - "taxonomy": "财务规定", | |
| 513 | - "url": "187" | |
| 514 | - }, | |
| 515 | - "39": { | |
| 516 | - "taxonomy": "规章制度", | |
| 517 | - "url": "188" | |
| 518 | - }, | |
| 519 | - "40": { | |
| 520 | - "taxonomy": "联系我们", | |
| 521 | - "url": "189" | |
| 522 | - }, | |
| 523 | - "41": { | |
| 524 | - "taxonomy": "学术与学科", | |
| 525 | - "url": "146" | |
| 526 | - }, | |
| 527 | - "42": { | |
| 528 | - "taxonomy": "通知通告", | |
| 529 | - "url": "147" | |
| 530 | - }, | |
| 531 | - "43": { | |
| 532 | - "taxonomy": "学术报告", | |
| 533 | - "url": "148" | |
| 534 | - }, | |
| 535 | - "44": { | |
| 536 | - "taxonomy": "重点科研平台", | |
| 537 | - "url": "149" | |
| 538 | - }, | |
| 539 | - "45": { | |
| 540 | - "taxonomy": "规章制度", | |
| 541 | - "url": "151" | |
| 542 | - }, | |
| 543 | - "46": { | |
| 544 | - "taxonomy": "工作指引与指南", | |
| 545 | - "url": "150" | |
| 546 | - }, | |
| 547 | - "47": { | |
| 548 | - "taxonomy": "表格下载", | |
| 549 | - "url": "152" | |
| 550 | - }, | |
| 551 | - "48": { | |
| 552 | - "taxonomy": "教学与教务", | |
| 553 | - "url": "153" | |
| 554 | - }, | |
| 555 | - "49": { | |
| 556 | - "taxonomy": "通知通告", | |
| 557 | - "url": "154" | |
| 558 | - }, | |
| 559 | - "50": { | |
| 560 | - "taxonomy": "课程安排", | |
| 561 | - "url": "155" | |
| 562 | - }, | |
| 563 | - "51": { | |
| 564 | - "taxonomy": "本科报考资讯", | |
| 565 | - "url": "156" | |
| 566 | - }, | |
| 567 | - "52": { | |
| 568 | - "taxonomy": "与中学的衔接", | |
| 569 | - "url": "157" | |
| 570 | - }, | |
| 571 | - "53": { | |
| 572 | - "taxonomy": "表格下载", | |
| 573 | - "url": "158" | |
| 574 | - }, | |
| 575 | - "54": { | |
| 576 | - "taxonomy": "学院架构", | |
| 577 | - "url": "145" | |
| 578 | - } | |
| 579 | - }; | |
| 17 | + var TAXONOMY_DATE; | |
| 580 | 18 | |
| 581 | 19 | function hasStorage(name, date) { |
| 582 | 20 | if (typeof localStorage.getItem(name) != 'string') { | ... | ... |
| 1 | -var MENU_DATE = {}; | |
| 2 | -var num = 0; | |
| 3 | -$('.navTwo > ul > li').each(function(index) { | |
| 4 | - MENU_DATE[num] = { | |
| 5 | - 'title': $(this).children('a').text() | |
| 6 | - }; | |
| 7 | - num++; | |
| 1 | +(function($) { | |
| 2 | + var MENU_DATE = {}; | |
| 3 | + var num = 0; | |
| 4 | + $('ul.nav > li').each(function(index) { | |
| 5 | + MENU_DATE[num] = { | |
| 6 | + 'title': $(this).children('a').text() | |
| 7 | + }; | |
| 8 | + num++; | |
| 9 | + if ($(this).children('ul').length > 0) { | |
| 10 | + $(this).children('ul').children('li').each(function(index) { | |
| 11 | + if ($(this).children('ul').length > 0) { | |
| 12 | + $(this).children('ul').children('li').each(function(index) { | |
| 13 | + MENU_DATE[num] = { | |
| 14 | + 'title': $(this).children('a').text(), | |
| 15 | + 'parent': $(this).parents('li').children('a').text() | |
| 16 | + }; | |
| 17 | + num++; | |
| 18 | + }); | |
| 19 | + } | |
| 20 | + MENU_DATE[num] = { | |
| 21 | + 'title': $(this).children('a').text(), | |
| 22 | + 'parent': $(this).parents('li').children('a').text() | |
| 23 | + }; | |
| 24 | + num++; | |
| 25 | + }); | |
| 26 | + } | |
| 27 | + }); | |
| 8 | 28 | |
| 9 | - if ($(this).children('ul').length > 0) { | |
| 10 | - $(this).children('ul').children('li').each(function(index) { | |
| 11 | - MENU_DATE[num] = { | |
| 12 | - 'title': $(this).find('a').text(), | |
| 13 | - 'parent': $(this).parents('li').children('a').text() | |
| 14 | - }; | |
| 15 | - num++; | |
| 16 | - }); | |
| 17 | - } | |
| 18 | -}); | |
| 19 | - | |
| 20 | -console.log(JSON.stringify(MENU_DATE)); | |
| 29 | + console.log(JSON.stringify(MENU_DATE)); | |
| 30 | +})(jQuery) | ... | ... |
Please
register
or
login
to post a comment