Skip to content

Commit

Permalink
fix: 修复2022.9.24恢复备案制出校后,申请会走到辅导员审核的问题 (#3)
Browse files Browse the repository at this point in the history
* fix: 新申请的表单会走辅导员审核的问题

* feat: 发布1.0.1正式包
  • Loading branch information
CrazyHer committed Oct 2, 2022
1 parent b9a0a28 commit dfefe97
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
dist
dist
test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "run-away-from-sdu",
"version": "1.0.0",
"version": "1.0.1",
"description": "山大? 快润! 山东大学一键申请出校脚本",
"main": "dist/index.js",
"bin": "dist/bin/run-away-from-sdu.js",
Expand Down
18 changes: 17 additions & 1 deletion src/lib/gooutServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const getFormTplStr = async (Cookie: string) => {
fdydh: null,
CRXQ_TEXT: null,
CRXQ: null,
SFLKHCQ: null,
wclx: null,
wcsy: null,
jtsyms: null,
Expand Down Expand Up @@ -101,6 +102,8 @@ export const getFormTplStr = async (Cookie: string) => {
pdgq: null,
xqsd: null,
GJXYXS: null,
DSPPD: null,
YYPXS: null,
};
delete formTpl.body.dataStores[key.replace(/_record/g, '')].rowSet
.primary[0].pk_id;
Expand Down Expand Up @@ -140,7 +143,8 @@ export const getCustomizedFormData = async (
const xm = /"user_name":"(.+?)"/.exec(res)?.[1] || ''; // 姓名
const xh = /"StudentIdNo":"(.+?)"/.exec(res)?.[1] || ''; // 学号
const crxq = /"CRXQ":"(.+?)"/.exec(res)?.[1] || ''; // 出入校区

const dsppd = /"DSPPD":"(.+?)"/.exec(res)?.[1] || '';
const yypxs = /"YYPXS":"(.+?)"/.exec(res)?.[1] || '';
res = res
.replace(
/"name":"zts","source":"process","type":"string","value":""/g,
Expand Down Expand Up @@ -240,6 +244,18 @@ export const getCustomizedFormData = async (
.replace(
/"name":"SYS_DATE","source":"process","type":"string","value":""/g,
`"name":"SYS_DATE","source":"process","type":"string","value":"${new Date().valueOf()}"`
)
.replace(
/"name":"DSPPD","source":"process","type":"string","value":""/g,
`"name":"DSPPD","source":"process","type":"string","value":"${dsppd}","_t": 1,"_o": { "value": "" }`
)
.replace(
/"name":"SFLKHCQ","source":"process","type":"string","value":""/g,
`"name":"SFLKHCQ","source":"process","type":"string","value":"","_t": 1`
)
.replace(
/"name":"YYPXS","source":"process","type":"string","value":""/g,
`"name":"YYPXS","source":"process","type":"string","value":"${yypxs}","_t": 1,"_o": { "value": "" }`
);
return res;
};
Expand Down

0 comments on commit dfefe97

Please sign in to comment.