style:删除不需要的函数params
This commit is contained in:
父節點
3525c516a2
當前提交
0a2c10c584
@ -57,7 +57,7 @@ export async function replaceProcess(courseList: ICourse[], exit: ICourse) {
|
|||||||
}
|
}
|
||||||
if (parseInt(single.syrs) > 0) {
|
if (parseInt(single.syrs) > 0) {
|
||||||
logAndNotifyUser('[replace]发现 ' + single.kcmc + ' 剩余人数为' + single.syrs + ',进行换课 at ' + getTimeNow())
|
logAndNotifyUser('[replace]发现 ' + single.kcmc + ' 剩余人数为' + single.syrs + ',进行换课 at ' + getTimeNow())
|
||||||
if (!(await exitCourse(exitJsonCourse, exit.channel))) {
|
if (!(await exitCourse(exitJsonCourse))) {
|
||||||
logAndNotifyUser('[replace]退课 ' + exitJsonCourse.kcmc + ' 失败 at ' + getTimeNow())
|
logAndNotifyUser('[replace]退课 ' + exitJsonCourse.kcmc + ' 失败 at ' + getTimeNow())
|
||||||
}
|
}
|
||||||
if (await acquireCourse(single, course.channel)) {
|
if (await acquireCourse(single, course.channel)) {
|
||||||
|
@ -80,7 +80,7 @@ export async function acquireCourse(course: IJsonCourse, channel: TChannel): Pro
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function exitCourse(course: IJsonCourse, channel: TChannel): Promise<boolean> {
|
export async function exitCourse(course: IJsonCourse): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
let resp = await sduAxios.get('/jsxsd/xsxkjg/xstkOper?jx0404id=' + course.jx0404id)
|
let resp = await sduAxios.get('/jsxsd/xsxkjg/xstkOper?jx0404id=' + course.jx0404id)
|
||||||
if (resp.data.success === true) {
|
if (resp.data.success === true) {
|
||||||
|
@ -23,8 +23,8 @@ async function test() {
|
|||||||
let resp = await sduAxios.post('/jsxsd/xsxkkc/xsxkGgxxkxk?kcxx=&skls=&skxq=&skjc=&sfym=false&sfct=false&szjylb=&sfxx=true&skfs=&xqid=', reqBody)
|
let resp = await sduAxios.post('/jsxsd/xsxkkc/xsxkGgxxkxk?kcxx=&skls=&skxq=&skjc=&sfym=false&sfct=false&szjylb=&sfxx=true&skfs=&xqid=', reqBody)
|
||||||
fs.writeFileSync('arr.json', JSON.stringify(resp.data.aaData, null, 2))
|
fs.writeFileSync('arr.json', JSON.stringify(resp.data.aaData, null, 2))
|
||||||
let courseList: IJsonCourse[] = resp.data.aaData
|
let courseList: IJsonCourse[] = resp.data.aaData
|
||||||
courseList = courseList.filter(single => single.kcmc.includes('尔雅') && single.xf >= 2
|
courseList = courseList.filter(single => (single.kcmc.includes('稷下创新') || single.kcmc.includes('齐鲁创业'))
|
||||||
&& (single.kcmc.includes('国学') || single.kcmc.includes('艺术')))
|
&& single.xqmc == '软件园校区')
|
||||||
for (let course of courseList) {
|
for (let course of courseList) {
|
||||||
console.log(course.kcmc + ' ' + course.kch + ' ' + course.kxh + ' ' + course.syrs + ' ' + course.xf)
|
console.log(course.kcmc + ' ' + course.kch + ' ' + course.kxh + ' ' + course.syrs + ' ' + course.xf)
|
||||||
}
|
}
|
||||||
|
載入中…
x
新增問題並參考
Block a user