index.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577
  1. <!DOCTYPE html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  4. <title>moe</title>
  5. <script type="text/javascript" src="/js/jquery.min.js"></script>
  6. <link rel="stylesheet" href="/css/bootstrap.min.css">
  7. <script type="text/javascript" src="/js/bootstrap.min.js"></script>
  8. <link rel="preconnect" href="https://fonts.googleapis.com">
  9. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  10. <link href="/css/css2.css" rel="stylesheet">
  11. <link rel="stylesheet" href="/css/style.css">
  12. <script>
  13. var status = 0, oid, user, pwd, paused = [], isadmin, sel = [], selected = []
  14. const rot = '43.143.233.184:81', root = 'https://43.143.233.184:81/'
  15. function getDate(date) {
  16. return new Date(date).toLocaleDateString()
  17. }
  18. function getCookie(name) {
  19. let arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
  20. if (arr != null) return arr[2];
  21. return null;
  22. }
  23. function delCookie(name, path = 'u') {
  24. var exp = new Date();
  25. exp.setTime(exp.getTime() - 1);
  26. var cval = getCookie(name);
  27. if (cval != null)
  28. document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString() + ((path == 'u') ? '' : ';path=' + path)
  29. }
  30. function getUrl(e) {
  31. return e.replace('dd.sdsz.com.cn', rot).replace(/^http:/, 'https:').replace(rot.split(':')[0] + '/', rot + '/').replace('service=http%3A%2F%2F' + root, 'service=http%3A%2F%2Fdd.sdsz.com.cn')
  32. }
  33. function setStatus(e, fast) {
  34. console.log('STATUS', e)
  35. status = e
  36. $('body').removeClass('grey')
  37. if (e == 1) {
  38. paused = []
  39. $('#loginSt').text('登录成功')
  40. $('.login').hide(200)
  41. $('#loginSt').addClass('label-success')
  42. $('#loginSt').removeClass('label-danger')
  43. $('.reqLogin').show(300)
  44. } else if (e == 2) {
  45. $('#loginSt').text('登录失败')
  46. $('#loginSt').removeClass('label-success')
  47. $('#loginSt').addClass('label-danger')
  48. } else if (e == 3) {
  49. delCookie('moe', '/')
  50. document.cookie = 'moe=guest;path=/';
  51. $('#loginSt').text('游客')
  52. $('.login').hide(200)
  53. $('.reqLogin').show(300)
  54. } else {
  55. isadmin = 0
  56. $('.login').show(200)
  57. $('#loginSt').text('未登录')
  58. $('#loginSt').removeClass('label-success')
  59. $('#loginSt').removeClass('label-danger')
  60. $('.reqLogin').hide(300 * !fast)
  61. $('#user').text('-')
  62. $('body').addClass('grey')
  63. }
  64. }
  65. function delCookies(force = 0) {
  66. if (force) {
  67. delCookie('CASTGC', '/')
  68. delCookie('moe', '/')
  69. delCookie('gosh', '/score/')
  70. if (force <= 2) {
  71. delCookie('gosh', '/sso/')
  72. delCookie('gowd', '/sso/')
  73. }
  74. }
  75. if (force >= 2) {
  76. delCookie('JSESSIONID', '/bxn-portal/')
  77. delCookie('JSESSIONID', '/bxn-library/')
  78. delCookie('JSESSIONID', '/bxn-core-uic/')
  79. }
  80. delCookie('JSESSIONID', '/')
  81. delCookie('SSOID', '/')
  82. delCookie('JSESSIONID', '/sso/')
  83. }
  84. function gget(url, call) {
  85. fetch(url, {
  86. "method": "GET",
  87. "credentials": 'include'
  88. }).then(e => e.text()).then(call)
  89. }
  90. function gpost(url, bd, call) {
  91. fetch(url, {
  92. headers: { 'Content-type': 'application/json' },
  93. method: "POST",
  94. credentials: 'include',
  95. body: bd
  96. }).then(e => e.text()).then(call)
  97. }
  98. function getStatus(ds, dt) {
  99. let s = new Date(ds), t = new Date(dt), e = new Date();
  100. if (e < s) return '未开始'
  101. if (e < t) return '进行中'
  102. else return '已结束'
  103. }
  104. function contestTouch() {
  105. gpost('contest/touch', JSON.stringify({
  106. no: $('#tNo').val(),
  107. title: $('#tTitle').val(),
  108. description: $('#tDescription').val(),
  109. dates: new Date($('#tStart')[0].valueAsNumber).toUTCString(),
  110. datet: new Date($('#tEnd')[0].valueAsNumber).toUTCString(),
  111. sel: $('#tSel').val()
  112. }), e => {
  113. e = JSON.parse(e)
  114. if (e.no) alert('您无权进行此操作')
  115. else {
  116. $('.tNew').toggle(300)
  117. debug('TOUCH', 'contest, affected ' + e.affectedRows + ' rows.')
  118. postLogin();
  119. }
  120. })
  121. }
  122. function contestRm(id, name) {
  123. if (prompt('确认删除?输入“' + name + '”以确认。') != name) return
  124. gpost('contest/rm', `{"id":"${id}"}`, e => {
  125. e = JSON.parse(e)
  126. if (e.no) alert('您无权进行此操作')
  127. else {
  128. debug('RM', 'contest, affected ' + e.affectedRows + ' rows.')
  129. postLogin();
  130. }
  131. })
  132. }
  133. function contestantTouch(id) {
  134. gpost('contestant/touch', JSON.stringify({
  135. name: $(`#c${id}Name`).val(),
  136. description: $(`#c${id}Description`).val(),
  137. img: $(`#c${id}Img`).val(),
  138. contest: id.toString()
  139. }), e => {
  140. e = JSON.parse(e)
  141. if (e.no) alert('您无权进行此操作')
  142. else {
  143. $(`.c${id}New`).toggle(300)
  144. debug('TOUCH', 'contestant, affected ' + e.affectedRows + ' rows.')
  145. getContest(id, 1);
  146. }
  147. })
  148. }
  149. function contestantRm(id, name, tId) {
  150. if (prompt('确认删除?输入“' + name + '”以确认。') != name) return
  151. gpost('contestant/rm', `{"id":"${id}"}`, e => {
  152. e = JSON.parse(e)
  153. if (e.no) alert('您无权进行此操作')
  154. else {
  155. debug('RM', 'contestant, affected ' + e.affectedRows + ' rows.')
  156. getContest(tId, 1);
  157. }
  158. })
  159. }
  160. function select(tId, id) {
  161. selected[tId][id] = !selected[tId][id]
  162. console.log(selected)
  163. let count = 0
  164. if (selected[tId][id]) $('#contestant-' + id).addClass('active'), count++
  165. else $('#contestant-' + id).removeClass('active')
  166. for (let i = selected[tId].length - 1; i >= 0; i--) {
  167. if (i == id) continue;
  168. if (selected[tId][i]) {
  169. if (count >= sel[tId]) selected[tId][i] = false, $('#contestant-' + i).removeClass('active')
  170. else $('#contestant-' + i).addClass('active'), count++
  171. }
  172. else if (selected[tId][i] === false) $('#contestant-' + i).removeClass('active')
  173. }
  174. // if ($('#contestant-' + id).hasClass('active')) {
  175. // $('#contestant-' + id).removeClass('active')
  176. // } else {
  177. // $('#contestant-' + id).addClass('active')
  178. // }
  179. }
  180. function getContest(id, force = 0, call = () => { }) {
  181. debug('GET', 'Contest' + id)
  182. if ($('#content-' + id).text() && !force) return call()
  183. $('#content-' + id).empty()
  184. gpost('contestant', `{"contest":"${id}"}`, e => {
  185. e = JSON.parse(e)
  186. if (!e.length) $('#content-' + id).text('无选手')
  187. else $('#content-' + id).html(`<b style="font-size:16px">选手列表</b>(${e.length}选${sel[id]}):<br>`)
  188. for (let i = 0; i < e.length; i++) {
  189. $('#content-' + id).append(`\
  190. <span id="contestant-${e[i].id}" class="contestant" onclick="select(${id},${e[i].id})">\
  191. <span>${e[i].name}</span>${isadmin ? ` <a href="javascript:contestantRm(${e[i].id},'${e[i].name}',${id})">删除</a>` : ''} \
  192. <img class="img-responsive center-block" src="${e[i].img.split('.png')[0] + '_thumb.png'}">\
  193. <div style="white-space:pre-wrap">${e[i].description}</div>\
  194. </span>`)
  195. selected[id][e[i].id] = false
  196. }
  197. $('#content-' + id).append(`<br><button class="btn btn-default" onclick="vote(${id})">投票 <span class="glyphicon glyphicon-thumbs-up"></span></button>`)
  198. if (isadmin) $('#content-' + id).append(`\
  199. <button class="btn btn-default admin" onclick="$('.c${id}New').toggle(300)">添加选手 <span class="glyphicon glyphicon-plus"></span></button>
  200. <div class="row c${id}New" style="display:none">
  201. <div class="col-md-6">名称
  202. <input id="c${id}Name" class="form-control" placeholder="伅" autocomplete="off">
  203. </div>
  204. <div class="col-md-6">图片链接
  205. <input class="form-control" id="c${id}Img" placeholder="https://**/*.png" autocomplete="off">
  206. </div>
  207. <div class="col-sm-12" style="margin-top: 10px;">
  208. <textarea id="c${id}Description" class="form-control" placeholder="介绍(请勿使用英文引号和分号)" style="resize: vertical"></textarea>
  209. <button class="btn btn-default" onclick="contestantTouch(${id})" style="margin-top: 10px;">提交 <span class="glyphicon glyphicon-send tSend"></span></button>
  210. </div>
  211. </div>
  212. `)
  213. call()
  214. })
  215. }
  216. function postLogin() {
  217. debug('LOGIN DONE.', 'initiate fetching.')
  218. if (status != 1 && status != 3) return;
  219. if (getCookie('moe') && getCookie('moe')[0] == '!') isadmin = 1
  220. if (status == 1) {
  221. if (!user) user = getCookie('gosh'), pwd = getCookie('gowd')
  222. document.cookie = "gosh=" + user + ";path=/score/;expires=Fri, 05 Feb 2077 12:34:56 GMT";
  223. document.cookie = "gosh=" + user + ";path=/sso/;expires=Fri, 05 Feb 2077 12:34:56 GMT";
  224. document.cookie = "gowd=" + pwd + ";path=/sso/;expires=Fri, 05 Feb 2077 12:34:56 GMT";
  225. if (isadmin) $('#user').text('admin')
  226. else get('bxn-portal/portal/api/proxy?username=true&userId=true&needvalidate=true&t=http%3A%2F%2F202.94.10.118%2Fbxn-library%2Fapi%2Flibrary%2FgetLatestBorrowBook%3Fcategory%3D1&resourceId=103519&cache=nocache&systime=0', e => {
  227. e = JSON.parse(e)
  228. $('#user').text(e.requestParams[0].ownerName)
  229. oid = e.requestParams[0].ownerId
  230. })
  231. }
  232. gget('contest', e => {
  233. e = JSON.parse(e)
  234. $('#contest').empty()
  235. for (let i = 0; i < e.length; i++) {
  236. sel[e[i].id] = e[i].sel
  237. selected[e[i].id] = []
  238. $('#contest').prepend(`\
  239. <li id="contest-${e[i].id}">\
  240. <span onclick="getContest(${e[i].id},0,()=>{$(this).toggleClass('active').siblings('div').toggle(300)})" class="title">第 ${e[i].no} 届${e[i].title}\
  241. <span class="pull-right" style="color:#999"><span class="admin"><a href="javascript:contestRm(${e[i].id},'第${e[i].no}届${e[i].title}')">删除</a> ${e[i].id} - </span>${getStatus(e[i].dates, e[i].datet)}</span>\
  242. </span>
  243. <div style="display:none;white-space:pre-wrap"><span class="pull-right" style="color:#999">${getDate(e[i].dates)} - ${getDate(e[i].datet)}</span>${e[i].description}</div><div id="content-${e[i].id}" style="display:none"></div>\
  244. </li>`)
  245. }
  246. if (status == 1 && isadmin) $('.admin').show()
  247. else $('.admin').hide()
  248. })
  249. }
  250. function debug(e, str = '') {
  251. $('.debugList').append(`<li class="auto-warp"><b>${e}</b> ${str} <span class="pull-right" style="color:#999">${status}</span></li>`)
  252. }
  253. function login() {
  254. debug('LOGIN.')
  255. if (status == 1) return;
  256. delCookies()
  257. user = $('#loginId').val(), pwd = $('#loginPwd').val()
  258. return fetch(root + "sso/login", {
  259. headers: {
  260. "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
  261. // "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
  262. },
  263. method: "GET",
  264. mode: "cors",
  265. credentials: 'include'
  266. }).then(() => {
  267. return fetch('https://43.143.233.184/moelogin', {
  268. method: 'POST',
  269. headers: { 'Content-type': 'application/json' },
  270. body: JSON.stringify({
  271. user: user,
  272. pwd: pwd,
  273. cook: getCookie('JSESSIONID')
  274. }),
  275. credentials: 'include',
  276. })
  277. }).then(e => e.text()).then(e => { setStatus((e != 'success') + 1), Promise.resolve() })
  278. }
  279. function matches(e) {
  280. return e.match(/(^\[\]$|param":"|<tr>|DOCTYPE|in\?username=|requestParams|\"newmessage\"|Sorry, Page Not Found|北师大实验中学--登录)/s)
  281. }
  282. // 异步递归嘿嘿嘿,再多 302 也不怕;再加上回调函数,真是妙
  283. async function next(e, call, ac, login) {
  284. if (e.length < 3000 && !matches(e) && (!e.match('\/login\\?') || login)) {
  285. return fetch(getUrl(e), {
  286. method: 'GET',
  287. credentials: 'include',
  288. headers: {
  289. Accept: ac
  290. }
  291. }).then(e => e.text()).then(res => { next(res, call, ac, login) })
  292. }
  293. else return call(e), new Promise((resolve, reject) => { })
  294. }
  295. function pre(e, url, call) {
  296. if (e.match('北师大实验中学--登录')) {
  297. debug('OUTDATED CAS! NEED RELOGIN')
  298. delCookie('CASTGC', '/')
  299. tryLogin()
  300. }
  301. if (e.length < 3000 && e.match('\/login\\?')) {
  302. var name = url.split('/')[0], f = paused.filter(e => e.name == name)
  303. debug('FAILED', url)
  304. if (url.match('\/login\\?')) return
  305. if (f.length) f[0].arr.push(url), f[0].carr.push(call)
  306. else {
  307. paused.push({ name: name, arr: [url], carr: [call] })
  308. debug('GET COOKIE...')
  309. get(name + '/casfailed.jsp', () => {
  310. let f = paused.filter(e => e.name == name)[0]
  311. for (let i = 0; i < f.arr.length; i++)get(f.arr[i], f.carr[i])
  312. paused.splice(paused.indexOf(f), 1)
  313. }, '*/*', 1)
  314. }
  315. } else {
  316. $('#bxn' + url.split('bxn')[1].split(/(\/|%2F)/)[0]).addClass('bg-success').addClass('text-success')
  317. if (status == 1) call(e)
  318. }
  319. }
  320. function get(url, call = () => { }, ac = '*/*', login = 0) {
  321. if (isadmin) return
  322. console.log("GET", url)
  323. debug('GET', url)
  324. if (status != 1) return
  325. next(root + url, e => { pre(e, url, call); }, ac, login)
  326. }
  327. let trying = 0
  328. function tryLogin() {
  329. if (trying) return debug('LOGIN', 'already in progress.')
  330. isadmin = 0
  331. if (getCookie('moe') && getCookie('moe')[0] == '!') {
  332. debug('LOGIN', 'admin!')
  333. setStatus(1), postLogin()
  334. } else if (getCookie('CASTGC')) {
  335. debug('LOGIN', 'using CAS.')
  336. setStatus(1), postLogin()
  337. } else if (getCookie('gosh') && getCookie('gosh') != 'null' && getCookie('gowd') != 'null') {
  338. debug('LOGIN', 'using stored cookie.')
  339. setStatus(0)
  340. trying = 1
  341. $('#loginId').val(getCookie('gosh'))
  342. $('#loginPwd').val(getCookie('gowd'))
  343. login().then(() => { status == 2 ? setStatus(0, 1) : (trying = 0, postLogin()); })
  344. } else debug('LOGIN', 'no available method.'), setStatus(0, 1)
  345. }
  346. $().ready(() => {
  347. $('.e').addClass('reqLogin')
  348. $('.e').removeClass('e')
  349. tryLogin()
  350. $("[data-toggle='tooltip']").tooltip();
  351. $('.banner').text('庆祝 moe 建站 ' + Math.ceil((new Date().getTime() - 1676000714191) / 86400000) + ' 天')
  352. })
  353. </script>
  354. <style>
  355. .pass {
  356. font-weight: bold;
  357. font-family: 'Courier New', Courier, monospace;
  358. }
  359. li {
  360. border-bottom: 3px solid #eee;
  361. word-wrap: break-word;
  362. }
  363. li>.title {
  364. transition-duration: 300ms;
  365. display: inline-block;
  366. width: 100%;
  367. cursor: pointer;
  368. font-size: 18px
  369. }
  370. li>.active.title {
  371. font-size: 22px;
  372. font-weight: bold;
  373. }
  374. li>.active~div {
  375. background-image: linear-gradient(to right, #fffaf0, #f4f2ef);
  376. border-left: 3px solid #ccc;
  377. padding-left: 5px;
  378. }
  379. li:hover {
  380. background-color: #eee;
  381. }
  382. .box {
  383. transition-duration: 300ms;
  384. min-height: 210px;
  385. }
  386. .box::before {
  387. content: '';
  388. display: block;
  389. width: 100%;
  390. height: 3px;
  391. margin-top: 10px;
  392. border-bottom: 1px solid;
  393. border-image: linear-gradient(to right, transparent, #6aaad8, #75ddb6, transparent) 1;
  394. }
  395. .box:hover::before {
  396. border-bottom: 3px solid;
  397. border-image: linear-gradient(to right, transparent, #6aaad8, #75ddb6, transparent) 1;
  398. }
  399. body:not(.grey) .box:hover {
  400. background-image: linear-gradient(#faffef, transparent);
  401. }
  402. .page-header.nohr {
  403. margin-bottom: 0;
  404. border-bottom: none;
  405. }
  406. span.full {
  407. width: 100%;
  408. display: inline-block;
  409. cursor: pointer;
  410. }
  411. .breadcrumb {
  412. padding: 0;
  413. margin-bottom: 5px;
  414. }
  415. .auto-warp {
  416. word-wrap: break-word;
  417. word-break: break-all;
  418. overflow: hidden;
  419. transition-duration: 500ms;
  420. max-height: 22.4px;
  421. }
  422. .auto-warp:hover {
  423. max-height: 100px;
  424. }
  425. .contestant {
  426. display: inline-block;
  427. width: 30%;
  428. vertical-align: top;
  429. border-bottom: 3px solid #ddd;
  430. margin-bottom: 5px;
  431. text-align: center;
  432. transition-duration: 100ms;
  433. cursor: pointer;
  434. }
  435. .contestant:hover {
  436. background-color: #ddd;
  437. border-bottom-left-radius: 15px;
  438. }
  439. .contestant.active {
  440. background-image: linear-gradient(to right, #eee, #ccc);
  441. border-top-left-radius: 25px;
  442. margin-top: 10px;
  443. margin-bottom: 10px;
  444. scale: 1.1;
  445. }
  446. .grey {
  447. background-color: #e3e3e3;
  448. }
  449. body {
  450. transition-duration: 300ms;
  451. }
  452. </style>
  453. </head>
  454. <body class="grey">
  455. <div class="page-header nohr">
  456. <h2>
  457. <!-- <img src="RC.png" width="32px" style="position:relative;top:-4px"> -->
  458. 实萌
  459. </h2>
  460. <span id="loginSt" class="label label-default">未登录</span>
  461. <span id="user" class="label label-default">-</span>
  462. <button class="btn btn-danger btn-xs e" onclick="postLogin()" title="刷新数据">
  463. <span class="glyphicon glyphicon-refresh"></span>
  464. </button>
  465. <button class="btn btn-danger btn-xs e" onclick="delCookies(1);setStatus(0)" onmouseenter="$('#double-off').css('scale','100%')" onmouseleave="$('#double-off').css('scale','0')" title="退出登录">
  466. <span class="glyphicon glyphicon-log-out"></span>
  467. </button>
  468. <button id="double-off" class="btn btn-danger btn-xs e" onclick="delCookies(2);location.reload()" onmouseenter="$('#double-off').css('scale','100%')" onmouseleave="$('#double-off').css('scale','0')" style="scale:0;transition-duration: 1000ms;" data-toggle="tooltip" data-placement="right" title="全部重置">
  469. <span class="glyphicon glyphicon-off"></span>
  470. </button>
  471. <button class="btn btn-danger btn-xs login" onclick="delCookies(2);location.reload()" data-toggle="tooltip" data-placement="right" title="全部重置">
  472. <span class="glyphicon glyphicon-off"></span>
  473. </button>
  474. </div>
  475. <div class="col-sm-12 e box box-contest">
  476. <div class="page-header">
  477. <h3><span class="glyphicon glyphicon-fire"></span> 比赛列表
  478. </h3>
  479. </div>
  480. <ul id="contest" class="list-unstyled"></ul>
  481. <button class="btn btn-default admin" onclick="$('.tNew').toggle(300)">新建比赛 <span class="glyphicon glyphicon-plus"></span></button>
  482. <div class="tNew" style="display:none">
  483. <div class="col-md-4">
  484. 标题
  485. <div class="input-group">
  486. <div class="input-group-addon">第</div>
  487. <input id="tNo" class="form-control" placeholder="0" autocomplete="off">
  488. <div class="input-group-addon">届</div>
  489. <input id="tTitle" class="form-control" placeholder="测试赛" autocomplete="off">
  490. </div>
  491. </div>
  492. <div class="col-md-3 col-sm-6">
  493. 开始时间(以零点计算)
  494. <input class="form-control" type="date" id="tStart" min="2022-01-01" value="2023-02-10">
  495. </div>
  496. <div class="col-md-3 col-sm-6">
  497. 结束时间
  498. <input class="form-control" type="date" id="tEnd" min="2022-01-01" value="2023-02-10">
  499. </div>
  500. <div class="col-md-2">
  501. 多选个数
  502. <input id="tSel" class="form-control" placeholder="2" autocomplete="off">
  503. </div>
  504. <div class="col-sm-12" style="margin-top: 10px;">
  505. <textarea id="tDescription" class="form-control" placeholder="介绍(请勿使用英文引号和分号)" style="resize: vertical"></textarea>
  506. <button class="btn btn-default" onclick="contestTouch()" style="margin-top: 10px;">提交 <span class="glyphicon glyphicon-send tSend"></span></button>
  507. </div>
  508. </div>
  509. </div>
  510. <div class="col-md-4 col-sm-6 box">
  511. <div class="page-header">
  512. <h3><span class="glyphicon glyphicon-user"></span> 账号
  513. <ul class="btn-group breadcrumb debug" style="display: none;font-size:10px;top:5px">
  514. <li id="bxn-portal" onclick="get('bxn-portal/portal/osforstudent/index')">bxn-portal</li>
  515. <li id="bxn-core-uic" onclick="get('bxn-core-uic/uic/index')">bxn-core-uic</li>
  516. <li id="bxn-library" onclick="get('bxn-library/library/jumpExamreport?jumpUrl=')">bxn-library</li>
  517. <li id="bxn-office" onclick="get('bxn-office/mail/index')">bxn-office</li>
  518. </ul>
  519. </h3>
  520. </div>
  521. <button class="btn btn-default e" onclick="$('.debug').toggle(200)">debug</button>
  522. <div class="login">
  523. (登录数字校园)
  524. <br>
  525. <div class="input-group">
  526. <span class="input-group-addon">账号</span>
  527. <input id="loginId" type="id" class="pass form-control" placeholder="20222222">
  528. </div>
  529. <br>
  530. <div class="input-group">
  531. <span class="input-group-addon">密码</span>
  532. <input id="loginPwd" type="password" class="pass form-control" placeholder="password">
  533. <span class="input-group-btn">
  534. <button class="btn btn-default" type="button" onclick="login().then(postLogin)">
  535. <span class="glyphicon glyphicon-log-in"></span> 登录
  536. </button>
  537. </span>
  538. </div>
  539. <br>
  540. <button class="btn btn-default" onclick="setStatus(3);postLogin()"><span class="glyphicon glyphicon-user"></span> 游客</button><small>(可能不计入投票结果)</small>
  541. </div>
  542. <div class="debug" style="display: none;">
  543. <button class="btn btn-default btn-xs" onclick="$('.debugList').empty()"><span class="glyphicon glyphicon-trash"></span> 清除</button>
  544. <ul class="debugList list-unstyled" style="font-family: 'Courier New', Courier, monospace;"></ul>
  545. </div>
  546. </div>
  547. <div style="position:fixed;bottom:10px;left:10px;color:#ccc">
  548. 北师大实验中学
  549. </div>
  550. <div style="position:fixed;bottom:10px;right:10px;color:#ccc" class="banner"></div>
  551. </body>