Greasy Fork镜像 支持简体中文。

JGSU 补签到

井冈山大学疫情签到补签到

  1. // ==UserScript==
  2. // @name JGSU 补签到
  3. // @version 0.0.3
  4. // @description 井冈山大学疫情签到补签到
  5. // @namespace Zxneric
  6. // @author Zxneric
  7. // @match *://ehall.jgsu.edu.cn/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function () {
  13. 'use strict';
  14. window.sign = function () {
  15. const days_need_submit = []
  16.  
  17. const stu_name = 'QaQ' // 替换为姓名
  18. const stu_code = '1234' // 替换为学号
  19.  
  20. if (stu_name === 'QaQ' || stu_code === '1234') {
  21. alert('请先替换姓名和学号')
  22. return
  23. }
  24.  
  25. let data_fill_flag = false
  26. const sub_data = {
  27. "SFHBRYJCS_DISPLAY": "否",
  28. "SZD": "",
  29. "SFHBRYJCS": "0",
  30. "SZD_DISPLAY": "",
  31. "SFYSQZJCS": "0",
  32. "SFYSQZ_DISPLAY": "否",
  33. "TXRQ": "",
  34. "XSBH": "",
  35. "CZZ": "",
  36. "DDYMT": "3",
  37. "DDYMT_DISPLAY": "绿码",
  38. "CZRQ": "Feb 12, 2022 10:44:15 PM",
  39. "TW": "36",
  40. "SFYSQZ": "0",
  41. "WID": "",
  42. "SFSTBS": "0",
  43. "CZZXM": "",
  44. "DKDW": "",
  45. "SFYSQZJCS_DISPLAY": "否",
  46. "SFSTBS_DISPLAY": "否",
  47. "SFSTBSQKSM": "",
  48. "SFHBRYJCSQKSM": "",
  49. "SFYSQZJCSQKSM": "",
  50. "SFYSQZQKSM": ""
  51. }
  52.  
  53. console.info('开始签到')
  54. fetch("https://ehall.jgsu.edu.cn/xsfw/sys/swmlsfxyqtbjgsu/modules/xssq/getMrtbxx.do", {
  55. "headers": {
  56. "accept": "application/json, text/plain, */*",
  57. "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
  58. "cache-control": "no-cache",
  59. "content-type": "application/x-www-form-urlencoded",
  60. "pragma": "no-cache",
  61. "sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"98\", \"Microsoft Edge\";v=\"98\"",
  62. "sec-ch-ua-mobile": "?0",
  63. "sec-ch-ua-platform": "\"Windows\"",
  64. "sec-fetch-dest": "empty",
  65. "sec-fetch-mode": "cors",
  66. "sec-fetch-site": "same-origin"
  67. },
  68. "referrer": "https://ehall.jgsu.edu.cn/xsfw/sys/swmlsfxyqtbjgsu/*default/index.do",
  69. "referrerPolicy": "strict-origin-when-cross-origin",
  70. "body": "data=%7B%7D",
  71. "method": "POST",
  72. "mode": "cors",
  73. "credentials": "include"
  74. }).then((resp) => {
  75. return resp.json()
  76. }).then((data) => {
  77. const cus = data.data;
  78. for (let i = 0; i < cus.length; i++) {
  79. if (!("WID" in cus[i])) {
  80. const rq = cus[i]['RQ']
  81. days_need_submit.push(rq)
  82. } else {
  83. if (!data_fill_flag) {
  84. data_fill_flag = true
  85.  
  86. const loc_str = cus[i]['SZD_DISPLAY']
  87. const loc_code = cus[i]['SZD']
  88. sub_data['SZD_DISPLAY'] = loc_str
  89. sub_data['SZD'] = loc_code
  90.  
  91. sub_data['CZZ'] = stu_code
  92. sub_data['XSBH'] = stu_code
  93. sub_data['CZZXM'] = stu_name
  94. }
  95. }
  96. }
  97. const now = new Date();
  98. const today = `${now.getFullYear()}-${(now.getMonth() + 1).toString().padStart(2, '0')}-${now.getDate().toString().padStart(2, '0')}`
  99. days_need_submit.filter((item) => {
  100. return today !== item;
  101. })
  102.  
  103. if (days_need_submit.length === 0) {
  104. console.warn('没有需要签到的日期')
  105. return
  106. }
  107.  
  108. console.info(`需要补签的日期:${days_need_submit}`)
  109.  
  110. for (const day of days_need_submit) {
  111. console.info(`${day} 补签中`)
  112. sub_data['TXRQ'] = day
  113. fetch("https://ehall.jgsu.edu.cn/xsfw/sys/swmlsfxyqtbjgsu/modules/xssq/savaStuMrqk.do", {
  114. "headers": {
  115. "accept": "application/json, text/plain, */*",
  116. "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
  117. "cache-control": "no-cache",
  118. "content-type": "application/x-www-form-urlencoded",
  119. "pragma": "no-cache",
  120. "sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"98\", \"Microsoft Edge\";v=\"98\"",
  121. "sec-ch-ua-mobile": "?0",
  122. "sec-ch-ua-platform": "\"Windows\"",
  123. "sec-fetch-dest": "empty",
  124. "sec-fetch-mode": "cors",
  125. "sec-fetch-site": "same-origin"
  126. },
  127. "referrer": "https://ehall.jgsu.edu.cn/xsfw/sys/swmlsfxyqtbjgsu/*default/index.do",
  128. "referrerPolicy": "strict-origin-when-cross-origin",
  129. "body": "data=" + encodeURIComponent(JSON.stringify(sub_data)),
  130. "method": "POST",
  131. "mode": "cors",
  132. "credentials": "include"
  133. }).then((resp) => {
  134. return resp.text()
  135. }).then((text) => {
  136. console.log(`${day} 补签成功: ${text}`)
  137. });
  138. }
  139. })
  140. }
  141. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址