index.html 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638
  1. <!DOCTYPE html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  4. <title>北师大实验中学数字校园</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="https://fonts.googleapis.com/css2?family=Anonymous+Pro:ital,wght@0,400;0,700;1,400;1,700
  11. &family=Noto+Serif+SC:wght@300;400;500;600;700&display=swap" rel="stylesheet">
  12. <link rel="stylesheet" href="/css/style.css">
  13. <script>
  14. var status, oid, user, pwd, paused = []
  15. const rot = '43.143.233.184:81', root = 'https://43.143.233.184:81/'
  16. function getCookie(name) {
  17. let arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
  18. if (arr != null) return arr[2];
  19. return null;
  20. }
  21. function delCookie(name, path = 'u') {
  22. var exp = new Date();
  23. exp.setTime(exp.getTime() - 1);
  24. var cval = getCookie(name);
  25. if (cval != null)
  26. document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString() + ((path == 'u') ? '' : ';path=' + path)
  27. }
  28. function getUrl(e) {
  29. 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')
  30. }
  31. function setStatus(e, fast) {
  32. console.log('STATUS', e)
  33. status = e
  34. if (e == 1) {
  35. $('#loginSt').text('登录成功')
  36. $('.login').hide(200)
  37. $('#loginSt').addClass('label-success')
  38. $('#loginSt').removeClass('label-danger')
  39. $('.reqLogin').show(300)
  40. } else if (e == 2) {
  41. $('#loginSt').text('登录失败')
  42. $('#loginSt').removeClass('label-success')
  43. $('#loginSt').addClass('label-danger')
  44. } else {
  45. $('.login').show(200)
  46. $('#loginSt').text('未登录')
  47. $('#loginSt').removeClass('label-success')
  48. $('#loginSt').removeClass('label-danger')
  49. $('.reqLogin').hide(300 * !fast)
  50. $('#avatar').attr('src', '')
  51. $('#user').text('-')
  52. }
  53. }
  54. function delCookies(force = 0) {
  55. if (force) {
  56. delCookie('CASTGC', '/')
  57. delCookie('gosh', '/score/')
  58. if (force <= 2) {
  59. delCookie('gosh', '/sso/')
  60. delCookie('gowd', '/sso/')
  61. }
  62. }
  63. if (force >= 2) {
  64. delCookie('JSESSIONID', '/bxn-portal/')
  65. delCookie('JSESSIONID', '/bxn-library/')
  66. delCookie('JSESSIONID', '/bxn-core-uic/')
  67. }
  68. delCookie('JSESSIONID', '/')
  69. delCookie('JSESSIONID', '/sso/')
  70. }
  71. var ggg
  72. function getMail(from, i, id, uid) {
  73. $('.mil-' + i).toggleClass('active')
  74. if ($('.mail-' + i).text() == '') {
  75. get(`${['bxn-office/mails/user/showMailDetail?source=&mailItemId', 'bxn-office/messages/sys/sysMsgDetail?unwrap=true&sysMsgId', 'bxn-office/notices/user/getNoticeDetail?unwrap=true&noticeId'][from]}=${id}${['&userMailItemId=', '&ownerId=', ''][from]}${uid || ''}${['', '&_=0', '&_=0'][from]}`, e => {
  76. f = ''
  77. if (from == 0) {
  78. f = `<a onclick="$(this).hasClass('confirm')?removeMail('${uid}'):$(this).addClass('confirm').html('<span class=\\'glyphicon glyphicon-trash\\'></span> 确认?')"><span class="glyphicon glyphicon-trash"></span> 删除邮件</a>`
  79. if (e.match('"下载"')) {
  80. f += '<br>' + e.replace(/.*?ico.*?(bxn-office\/a.*?)title.*?file-info">(.*?)<.*?/gs, '<a href="https://43.143.233.184:81/$1>~ $2</a>,\n').split('/span')[0].replace(/,/g, '<br>').replace(/~/g, '<span class="glyphicon glyphicon-link"></span>')
  81. }
  82. e = e.replace(/^.*"bbcode-content">(.*?)<\/div>.*/gs, '$1')
  83. } else if (from == 1) {
  84. e = e.replace(/.*容:<\/label>(.*?)<\/p>.*/gs, '$1')
  85. } else if (from == 2) {
  86. if (e.match('"下载"')) {
  87. f = e.replace(/.*件:.*?<a.*?(<a.*?href=")(.*?) .*?fo">[ \t\n\r]*(.*?)[ \t\n\r]*<.*/gs, '$1https://43.143.233.184:81$2><span class="glyphicon glyphicon-link"></span> $3</a>')
  88. }
  89. e = e.replace(/.*?通..容:.*?tent">(.*?)<\/td.*/gs, '$1')
  90. }
  91. e = e.replace(/\[right\](.*?)\[\/right\]/gs, '<div class="pull-right">$1</div><br>').replace(/( *([\t\n\r ]|&nbsp;|<br>|<p><br\/><\/p>) *)+/g, '<br>').replace(/<br>(style|class)/g, ' $1').replace(/<br>$/gs, '')
  92. $('.mail-' + i).html(f + e)
  93. $('.mail-' + i).toggle(300)
  94. })
  95. } else {
  96. $('.mail-' + i).toggle(300)
  97. }
  98. }
  99. function getTime(time) {
  100. let a = new Date(), b = new Date(time)
  101. a.setHours(0)
  102. b.setHours(0)
  103. let diff = Math.ceil(a.getTime() / 86400000) - Math.ceil(b.getTime() / 86400000)
  104. if (diff < 1) return '今天'
  105. if (diff < 2) return '昨天'
  106. if (diff < 3) return '前天'
  107. if (diff < 7) return diff + '天前'
  108. return time.split(' ')[0]
  109. }
  110. var mails = []
  111. function insertMail(e) {
  112. e = '[' + e.slice(0, e.length - 1) + ']'
  113. e = JSON.parse(e)
  114. $('#mailList').empty()
  115. e = e.concat(mails).sort(function (a, b) { return new Date(b.time) - new Date(a.time) });
  116. mails = e
  117. str = ''
  118. for (let i = 0; i < e.length; i++) {
  119. str += `<li class="mail mil-${i}"><span class="full" onclick="getMail(${e[i].from},${i},'${e[i].id}',${e[i].uid})"><b>${e[i].title}</b><span class="pull-right" style="color:#999;">${e[i].name} ${getTime(e[i].time)} <span class="full-time" style="color:#bbb;">${e[i].time.split(' ')[1]}</span></span></span><span class="mail-text mail-${i}"></span></span></li>`
  120. }
  121. $('#mailList').append(str)
  122. $('.mail-text,.full-time').hide()
  123. }
  124. function refreshMail() {
  125. mails = []
  126. $('#mailList').empty()
  127. $('#mailList').append('<il>获取中...</il>')
  128. get('bxn-office/mails/user/index', e => {
  129. // 这代码谁写的?真是太烂了,我一行就把他五行干掉了(是刚才的我写的)
  130. // e = e.replace(/\n^(?!.*(sender|mailDetail|mailItemId)).*$/gm, '').replace(/[\r\n ]+/g, '')
  131. // e = e.replace(/<(a|td|span)[^<]*>([^<]*)<\/\1>/g, ',$2')
  132. // e = e.replace(/<(a|td|span)[^<]*>([^<]*)<\/\1>/g, ',$2')
  133. // e = e.replace(/<tr[^"]*"([^"]*)"[^"]*"([^"]*)"><td[^>]*>/g, '\n,$1,$2').replace(/(.sender{\n|\t.*)/gm, '')
  134. // e = e.replace(/^,(.*),(.*),(.*),(.*),(.*),(.{10,10})(.{8,8})$/gm, '{"id":"$1","uid":"$2","name":"$3","title":"$5","time":"$6 $7"},').replace(/\n/g, '')
  135. e = e.replace(/.*?mailItemId=(.*?) .*?MailItemId=(.*?)>.*?sender">(.*?) ?<.*?tail">(.*?)<.*?tail">(.*?)</gs, '{"from":0,"id":$1,"uid":$2,"name":"$3","title":"$4","time":"$5"},').split('/td')[0]
  136. insertMail(e)
  137. })
  138. get('bxn-office/messages/sys/sysInfoList', e => {
  139. e = e.replace(/.*?a-id="(.*?)".*?erId="(.*?)".*?d-td t.*?>\n?[\t\n\r]*(.*?)\n?[\t\n\r]*<\/td>.*?>(.*?)</gs, '{"from":1,"id":"$1","uid":"$2","name":"<i>消息</i>","title":"$3","time":"$4"},').split('/td')[0]
  140. insertMail(e)
  141. })
  142. get('bxn-office/notices/user/received', e => {
  143. e = e.replace(/.*?ta-id="(.*?)".*?d-td.*?d-td .*?on"> ?(.*?)<.*?ta-id.*?>(.*?)<(?:.*?d-td){4,4}">[\t\n\r ]*(.*?)[\t\n\r ]*</gs, '{"from":2,"id":"$1","title":"$2","name":"<i>通知</i> - $3","time":"$4"},').split('/td')[0]
  144. insertMail(e)
  145. })
  146. }
  147. function postLogin() {
  148. console.log("POSTLOGIN")
  149. if (status != 1) return;
  150. if (!user) user = getCookie('gosh'), pwd = getCookie('gowd')
  151. document.cookie = "gosh=" + user + ";path=/score/";
  152. document.cookie = "gosh=" + user + ";path=/sso/";
  153. document.cookie = "gowd=" + pwd + ";path=/sso/";
  154. $('#changePwd').val(pwd)
  155. get('bxn-library/library/jumpExamreport?jumpUrl=http://36.112.23.77/analysis/auto/%23/autoLogin', e => {
  156. $('#scoreOld').attr('href', e)
  157. })
  158. get('bxn-portal/portal/osforstudent/index', e => {
  159. let f = e.match(/'https:\/\/service.*?'/gs)[0].split("'")[1]
  160. $('.service').attr('href', f)
  161. $('.serviceLearn').attr('href', f + encodeURIComponent('/fe-pc/b/fe_leco_student/portal/?system_partition_gId=3'))
  162. })
  163. 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 => {
  164. e = JSON.parse(e)
  165. $('#user').text(e.requestParams[0].ownerName)
  166. oid = e.requestParams[0].ownerId
  167. $('#avatar').attr('src', root + 'avatar/tiny/' + oid)
  168. })
  169. refreshMail()
  170. }
  171. function login() {
  172. console.log("LOGIN!!")
  173. if (status == 1) return;
  174. delCookies()
  175. user = $('#loginId').val(), pwd = $('#loginPwd').val()
  176. return fetch(root + "sso/login", {
  177. "headers": {
  178. "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
  179. // "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"
  180. },
  181. "method": "GET",
  182. "mode": "cors",
  183. "credentials": 'include'
  184. }).then(() => {
  185. return fetch('https://43.143.233.184/andlogin', {
  186. method: 'POST',
  187. headers: { 'Content-type': 'application/json' },
  188. body: JSON.stringify({
  189. user: user,
  190. pwd: pwd,
  191. cook: getCookie('JSESSIONID')
  192. }),
  193. credentials: 'include',
  194. })
  195. }).then(e => e.text()).then(e => { setStatus((e != 'success') + 1), Promise.resolve() })
  196. }
  197. function matches(e) {
  198. return e.match(/(^\[\]$|param":"|<tr>|DOCTYPE|in\?username=|requestParams|\"newmessage\")/s)
  199. }
  200. async function next(e, call, ac, login) {
  201. if (e.length < 3000 && !matches(e) && (!e.match('\/login\\?') || login)) {
  202. return fetch(getUrl(e), {
  203. method: 'GET',
  204. credentials: 'include',
  205. headers: {
  206. Accept: ac
  207. }
  208. }).then(e => e.text()).then(res => { next(res, call, ac, login) })
  209. }
  210. else return call(e), new Promise((resolve, reject) => { })
  211. }// 异步递归嘿嘿嘿,再多 302 也不怕;再加上回调函数,真是妙
  212. function pre(e, url, call) {
  213. if (e.match('casfailed')) delCookie('CASTGC', '/')
  214. if (e.length < 3000 && e.match('\/login\\?')) {
  215. let f = paused.filter(e => e.name == url.split('/')[0])
  216. console.log("ERR", url)
  217. if (url.match('\/login\\?')) return
  218. if (f.length) f[0].arr.push(url), f[0].carr.push(call)
  219. else {
  220. paused.push({ name: url.split('/')[0], arr: [url], carr: [call] })
  221. console.log('ERR -->')
  222. get(e.split('cn/')[1], () => {
  223. let f = paused.filter(e => e.name == url.split('/')[0])[0]
  224. for (let i = 0; i < f.arr.length; i++)get(f.arr[i], f.carr[i])
  225. paused.splice(paused.indexOf(f), 1)
  226. }, '*/*', 1)
  227. }
  228. } else {
  229. $('#bxn' + url.split('bxn')[1].split(/(\/|%2F)/)[0]).addClass('bg-success').addClass('text-success')
  230. if (status == 1) call(e)
  231. }
  232. }
  233. function get(url, call = () => { }, ac = '*/*', login = 0) {
  234. console.log("GET", url)
  235. if (status != 1) return
  236. next(root + url, e => { pre(e, url, call); }, ac, login)
  237. }
  238. function change() {
  239. if (status != 1 || pwd == $('#changePwd').val()) return
  240. var fd = new URLSearchParams()
  241. fd.append('rating', '4')
  242. fd.append('ratingWord', '极佳')
  243. fd.append('oldPassword', pwd)
  244. fd.append('newPassword', $('#changePwd').val())
  245. fd.append('reNewPassword', $('#changePwd').val())
  246. fetch(root + 'bxn-core-uic/uic-public/personal/management/password/save', {
  247. "headers": {
  248. "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
  249. // "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"
  250. },
  251. method: 'POST',
  252. body: fd,
  253. credentials: 'include',
  254. })
  255. $('#changeBtn').addClass('btn-success')
  256. }
  257. let trying = 0
  258. function tryLogin(force) {
  259. console.log("TRY")
  260. if (trying) return
  261. console.log("GO")
  262. if (!force && getCookie('CASTGC')) {
  263. setStatus(1), postLogin()
  264. } else if (getCookie('gosh') != 'null' && getCookie('gowd') != 'null') {
  265. setStatus(0)
  266. trying = 1
  267. $('#loginId').val(getCookie('gosh'))
  268. $('#loginPwd').val(getCookie('gowd'))
  269. login().then(() => { status == 2 ? setStatus(0, 1) : (trying = 0, postLogin()); })
  270. } else setStatus(0, 1)
  271. }
  272. scrollToBottom = () => {
  273. (function smoothscroll() {
  274. const currentScroll = document.documentElement.scrollTop || document.body.scrollTop; // 已经被卷掉的高度
  275. const clientHeight = document.documentElement.clientHeight; // 浏览器高度
  276. const scrollHeight = document.documentElement.scrollHeight; // 总高度
  277. if (scrollHeight - 10 > currentScroll + clientHeight) {
  278. window.requestAnimationFrame(smoothscroll);
  279. window.scrollTo(0, currentScroll + (scrollHeight - currentScroll - clientHeight) / 2);
  280. }
  281. })();
  282. };
  283. var mp = new Map(), ans = new Map()
  284. function getPar(e) {
  285. if (e === undefined) return ''
  286. let g = ans.get(e)
  287. if (!g) {
  288. if (e.parentId == 'null') g = `{id:'${e.param}',name:'${e.label}',rule:'${e.nextRuleId}'}`
  289. else g = getPar(mp.get(e.parentId)) + `,{id:'${e.param}',name:'${e.label}',rule:'${e.nextRuleId}'}`
  290. ans.set(e, g)
  291. }
  292. return g
  293. }
  294. var target = [], base
  295. function delRec(e) {
  296. target = target.filter(u => u != e)
  297. }
  298. function addRec(e, c, l) {
  299. if (target.filter(u => u == e).length) return
  300. $('#recSel').append(`<li onclick="delRec('${e}');$(this).remove()" style="cursor:pointer"><span style="font-size:10px">${e} ${c}</span> ${l}</li>`)
  301. target.push(e)
  302. }
  303. function getRec(re) {
  304. get(`bxn-office/participant-select/rule-id/${re.rule}/param/${re.id}?unwrap=true&_=0`, e => {
  305. e = JSON.parse(e)
  306. if (e.length == 0) { $('.s-' + re.id + '>a').hide(); return }
  307. $('#recList>li').hide()
  308. let str = ''
  309. for (let i = 0; i < e.length; i++) {
  310. mp.set(e[i].param, e[i])
  311. }
  312. for (let i = 0; i < e.length; i++) {
  313. let par = getPar(e[i])
  314. let full = ''
  315. if (e.filter(u => u.parentId == e[i].param).length) full = `setRec([${par}],1)`
  316. else full = `setRec([${par}])`
  317. if (e[i].nextRuleId === null) full = `addRec('${e[i].param}','${e[i].code}','${e[i].label}')`
  318. str += `<li class="${e[i].parentId} s-${e[i].param} ${e[i].nextRuleId === null ? 'endRec' : ''}">${e.filter(u => u.parentId == e[i].param).length ? `${e[i].param.match('1-') ? `<a onclick="setRec([${par}])" style="position: absolute;transform: translateX(-25px);"><span class="glyphicon glyphicon-pencil"></span></a> ` : '<span style="position: absolute;transform: translateX(-15px);">></span>'}<span class="full" onclick="${full}">${e[i].label}` : `<span class="full" onclick="${full}">${e[i].label}`}<span class="pull-right" style="color:#999">${e[i].code ? e[i].code + ' - ' : ''}${e[i].param}</span></span></li>`
  319. }
  320. $('#recList').append(str)
  321. if (re.rule == 'getOrganizationsAndTagsByUserCategoryRule') {
  322. $('#recList>li').hide()
  323. $('li.1-401,li.4-403,li.3-403,li.2-404').show()
  324. }
  325. }, 'application/json, text/javascript, */*')
  326. }
  327. var getBase = [, { id: '1', rid: '1-401', rule: 'getOrganizationsAndTagsByUserCategoryRule', name: '学校(部门)', rname: '老师' }, , { id: '3', rid: '3-403', rule: 'getOrganizationsAndTagsByUserCategoryRule', rname: '家长', name: '学校(班级)' }, { id: '4', rid: '4-403', rule: 'getOrganizationsAndTagsByUserCategoryRule', rname: '学生', name: '学校(班级)' }]
  328. function setRec(e, ex = 0) {
  329. if (e.length == 0) {
  330. $('#recList').html(oof)
  331. $('#recNav').empty()
  332. }
  333. if (!e[0]) return
  334. $('#recNav').empty()
  335. $('#recNav').append(`<li onclick="setRec([])"><span style="font-size:10px">${getBase[base].id}</span> ${getBase[base].rname}</li>`)
  336. let str = ''
  337. for (let i = 0; i < e.length; i++) {
  338. str += `${i ? ',' : ''}{id:'${e[i].rid || e[i].id}',name:'${e[i].name}',rule:'${e[i].rule}'}`
  339. $('#recNav').append(`<li onclick="setRec([${str}],1)"><span style="font-size:10px">${e[i].rid || e[i].id}</span> ${e[i].name}</li>`)
  340. }
  341. let f = e[e.length - 1]
  342. if (ex) {
  343. $('#recList>li').hide()
  344. $('#recList>li.' + f.id).show()
  345. ggg.show()
  346. } else {
  347. getRec(f)
  348. }
  349. }
  350. function toggleWrite() {
  351. $('.boxWrite').is(':visible') ? ($('.box').show(300), $('.boxWrite').hide(300)) : (setTimeout(scrollToBottom, 200), $('.box').hide(300), $('.boxWrite').show(300));
  352. }
  353. function sendMail() {
  354. var fd = new URLSearchParams()
  355. str = ''
  356. for (let i = 0; i < target.length; i++) {
  357. str += ',' + target[i]
  358. }
  359. fd.append('filelist', '[]')
  360. fd.append('mailItemId', '')
  361. fd.append('forwardMailItemId', '')
  362. fd.append('replyMailItemId', '')
  363. fd.append('targetIds', str.slice(1))
  364. fd.append('subject', $('#writeSub').val())
  365. fd.append('files', '')
  366. fd.append('content', $('#writeCt').val())
  367. fetch(root + 'bxn-office/mails/user/sendMail?unwrap=true', {
  368. "headers": {
  369. "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
  370. },
  371. method: 'POST',
  372. body: fd,
  373. credentials: 'include',
  374. }).then(e => { $('#writeBtn>span').removeClass('glyphicon-send').removeClass('glyphicon-exclamation-sign').addClass(e.status == 200 ? 'glyphicon-ok' : 'glyphicon-exclamation-sign'); refreshMail() })
  375. }
  376. function removeMail(e) {
  377. var fd = new URLSearchParams()
  378. fd.append('checkmail', e)
  379. fetch(root + 'bxn-office/mails/user/removeMail?unwrap=true', {
  380. "headers": {
  381. "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
  382. },
  383. method: 'POST',
  384. body: fd,
  385. credentials: 'include',
  386. }).then(refreshMail)
  387. }
  388. $().ready(() => {
  389. $('.e').addClass('reqLogin')
  390. $('.e').removeClass('e')
  391. tryLogin()
  392. $("[data-toggle='tooltip']").tooltip();
  393. $('.recL').hide(300)
  394. $('#recList').html(oof)
  395. $('.banner').text('庆祝数字校园建站 ' + Math.ceil((new Date().getTime() - 1675136714191) / 86400000) + ' 天')
  396. })
  397. oof = `<li onclick="base=1;setRec([getBase[base]])">老师</li><li onclick="base=4;setRec([getBase[base]])">学生</li><li onclick="base=3;setRec([getBase[base]])">家长</li>`
  398. </script>
  399. <style>
  400. .in {
  401. font-weight: bold;
  402. font-family: 'Courier New', Courier, monospace;
  403. }
  404. li {
  405. border-bottom: 3px solid #eee;
  406. word-wrap: break-word;
  407. }
  408. li:hover {
  409. background-color: #eee;
  410. }
  411. :is(#recList, #recNav)>li {
  412. cursor: pointer;
  413. }
  414. li.endRec {
  415. color: #1a5e93
  416. }
  417. .box {
  418. transition-duration: 300ms;
  419. min-height: 210px;
  420. }
  421. .box::before {
  422. content: '';
  423. display: block;
  424. width: 100%;
  425. height: 3px;
  426. margin-top: 10px;
  427. border-bottom: 1px solid;
  428. border-image: linear-gradient(to right, transparent, #6aaad8, #75ddb6, transparent) 1;
  429. }
  430. .box:hover::before {
  431. border-bottom: 3px solid;
  432. border-image: linear-gradient(to right, transparent, #6aaad8, #75ddb6, transparent) 1;
  433. }
  434. .box:hover {
  435. background-image: linear-gradient(#faffef, transparent);
  436. }
  437. .page-header.nohr {
  438. margin-bottom: 0;
  439. border-bottom: none;
  440. }
  441. .lim {
  442. max-height: 210px;
  443. overflow: auto;
  444. }
  445. .lim:hover {
  446. max-height: 500px;
  447. overflow: auto;
  448. }
  449. .boxMail::-webkit-scrollbar {
  450. width: 5px;
  451. }
  452. .boxMail::-webkit-scrollbar-track {
  453. background-color: transparent;
  454. }
  455. .boxMail::-webkit-scrollbar-thumb {
  456. background-color: transparent;
  457. border-radius: 2px;
  458. }
  459. .boxMail:hover::-webkit-scrollbar-thumb {
  460. background-color: #bbb;
  461. }
  462. .mail,
  463. .mail b {
  464. transition-duration: 300ms;
  465. }
  466. .mail b {
  467. font-weight: 400;
  468. }
  469. .mail.active {
  470. background-image: linear-gradient(to right, #fffaf0, #f4f2ef);
  471. border-left: 3px solid #ccc;
  472. padding-left: 5px;
  473. }
  474. .mail.active b {
  475. font-weight: 700;
  476. font-size: 16px;
  477. }
  478. span.full {
  479. width: 100%;
  480. display: inline-block;
  481. cursor: pointer;
  482. }
  483. .breadcrumb {
  484. padding: 0;
  485. margin-bottom: 5px;
  486. }
  487. </style>
  488. </head>
  489. <body>
  490. <div class="page-header nohr">
  491. <h2><img src="RC.png" width="32px" style="position:relative;top:-4px">
  492. 数字校园
  493. <button class="btn btn-default btn-xs">
  494. <span class="glyphicon glyphicon-question-sign"></span>
  495. </button>
  496. </h2>
  497. <span id="loginSt" class="label label-default">未登录</span>
  498. <span id="user" class="label label-default">-</span>
  499. <button class="btn btn-danger btn-xs e" onclick="postLogin()" title="刷新数据">
  500. <span class="glyphicon glyphicon-refresh"></span>
  501. </button>
  502. <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="退出登录">
  503. <span class="glyphicon glyphicon-log-out"></span>
  504. </button>
  505. <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="全部重置">
  506. <span class="glyphicon glyphicon-off"></span>
  507. </button>
  508. <button class="btn btn-danger btn-xs login" onclick="delCookies(2);location.reload()" data-toggle="tooltip" data-placement="right" title="全部重置">
  509. <span class="glyphicon glyphicon-off"></span>
  510. </button>
  511. <img id="avatar" style="position:absolute;right:10px;top:10px;">
  512. </div>
  513. <div class="col-md-4 col-sm-6 box">
  514. <div class="page-header">
  515. <h3><span class="glyphicon glyphicon-link"></span> 链接</h3>
  516. </div>
  517. <div class="btn-group" style="margin-bottom: 10px;">
  518. <a id="scoreOld" class="btn btn-default e" target="_blank">心意答</a>
  519. <a class="btn btn-default e" href="/score" target="_blank"><span class="glyphicon glyphicon-stats"></span> 成绩整理</a>
  520. </div>
  521. <div class="btn-group" style="margin-bottom: 10px;">
  522. <a class="btn btn-default e service" target="_blank"><span class="glyphicon glyphicon-tasks"></span> 中台</a>
  523. <a class="btn btn-default e serviceLearn" target="_blank"><span class="glyphicon glyphicon-book"></span> 学习平台</a>
  524. </div>
  525. </div>
  526. <div class="col-md-4 col-sm-6 box">
  527. <div class="page-header">
  528. <h3><span class="glyphicon glyphicon-user"></span> 账号
  529. <ul id="cookie" class="btn-group breadcrumb" style="display: none;font-size:10px;top:5px">
  530. <li id="bxn-portal" onclick="get('bxn-portal/portal/osforstudent/index')">bxn-portal</li>
  531. <li id="bxn-core-uic" onclick="get('bxn-core-uic/uic/index')">bxn-core-uic</li>
  532. <li id="bxn-library" onclick="get('bxn-library/library/jumpExamreport?jumpUrl=')">bxn-library</li>
  533. <li id="bxn-office" onclick="get('bxn-office/mail/index')">bxn-office</li>
  534. </ul>
  535. </h3>
  536. </div>
  537. <button class="btn btn-default e" onclick="$('#change').toggle(200)">修改密码</button>
  538. <button class="btn btn-default e" onclick="$('#cookie').toggle(200)">cookie</button>
  539. <div class="login">
  540. <br>
  541. <div class="input-group">
  542. <span class="input-group-addon">账号</span>
  543. <input id="loginId" type="id" class="in form-control" placeholder="20222222">
  544. </div>
  545. <br>
  546. <div class="input-group">
  547. <span class="input-group-addon">密码</span>
  548. <input id="loginPwd" type="password" class="in form-control" placeholder="password">
  549. <span class="input-group-btn">
  550. <button class="btn btn-default" type="button" onclick="login().then(postLogin)">
  551. <span class="glyphicon glyphicon-log-out"></span> 登录
  552. </button>
  553. </span>
  554. </div>
  555. </div>
  556. <div id="change" style="display: none;">
  557. <br>
  558. <div class="input-group">
  559. <span class="input-group-addon">新密码</span>
  560. <input id="changePwd" type="password" class="in form-control" placeholder="password" onmouseenter="this.type='id'" onmouseleave="this.type='password'">
  561. <span class="input-group-btn"><button id="changeBtn" class="btn btn-default" type="button" onclick="change()">修改</button></span>
  562. </div>
  563. </div>
  564. </div>
  565. <div class="col-md-4 col-sm-6 box boxMail lim">
  566. <div class="page-header">
  567. <h3><span class="glyphicon glyphicon-envelope"></span> 消息
  568. <button class="btn btn-default btn-xs e" onclick="toggleWrite();">写信</button>
  569. <button class="btn btn-default btn-xs e" onclick="$('.mail-text').hide(300);$('.mail').removeClass('active')">全部收起</button>
  570. <button class="btn btn-default btn-xs e pull-right" onclick="$('.boxMail').toggleClass('col-sm-6').toggleClass('col-md-4').toggleClass('col-sm-12').toggleClass('lim');$('.full-time').toggle()">
  571. <span class="glyphicon glyphicon-fullscreen"></span>
  572. </button>
  573. </h3>
  574. </div>
  575. <ul id="mailList" class="list-unstyled e"></ul>
  576. </div>
  577. <div class="col-sm-12 box boxWrite" style="display: none;">
  578. <div class="page-header">
  579. <h3><span class="glyphicon glyphicon-pencil"></span> 写信
  580. <button class="btn btn-default btn-xs e" onclick="toggleWrite();">关闭</button>
  581. </h3>
  582. </div>
  583. <div class="rec">
  584. 收件人:
  585. <ul id="recSel" class="breadcrumb list-unstyled e" style="display: inline-block;"></ul>
  586. <button class="btn btn-default btn-xs e" onclick="$('.recL').toggle(300,()=>$('#recList').html(oof));$('#recNav').empty();$(this).children().toggleClass('glyphicon-chevron-down')"><span class="glyphicon glyphicon-plus"></span></button>
  587. <div>
  588. <ul id="recNav" class="recL breadcrumb list-unstyled e"></ul>
  589. <ul id="recList" class="recL list-unstyled e"></ul>
  590. </div>
  591. </div>
  592. <br>
  593. <form class="bs-example bs-example-form" role="form">
  594. <div class="col-md-6">
  595. <div class="input-group">
  596. <!-- <span class="input-group-addon"></span> -->
  597. <input id="writeSub" class="form-control" placeholder="标题">
  598. <span class="input-group-btn">
  599. <button id="writeBtn" type="button" class="btn btn-default" onclick="sendMail()" id="chatBtn" style="height: 34px;"><span class="glyphicon glyphicon-send"></span> 发送</button>
  600. </span>
  601. </div>
  602. <textarea id="writeCt" type="text" class="form-control" autocomplete="off" style="resize:vertical;top:-1px;position: relative;" placeholder="内容"></textarea>
  603. </div>
  604. </form>
  605. </div>
  606. <div style="position:fixed;bottom:10px;left:10px;color:#ccc">
  607. 北师大实验中学
  608. </div>
  609. <div style="position:fixed;bottom:10px;right:10px;color:#ccc" class="banner">
  610. 庆祝数字校园建站
  611. </div>
  612. </body>