style:删除不需要的函数params

This commit is contained in:
juzeon 2021-09-13 11:25:19 +08:00
父節點 3525c516a2
當前提交 0a2c10c584
共有 3 個檔案被更改,包括 4 行新增4 行删除

查看文件

@ -57,7 +57,7 @@ export async function replaceProcess(courseList: ICourse[], exit: ICourse) {
}
if (parseInt(single.syrs) > 0) {
logAndNotifyUser('[replace]发现 ' + single.kcmc + ' 剩余人数为' + single.syrs + ',进行换课 at ' + getTimeNow())
if (!(await exitCourse(exitJsonCourse, exit.channel))) {
if (!(await exitCourse(exitJsonCourse))) {
logAndNotifyUser('[replace]退课 ' + exitJsonCourse.kcmc + ' 失败 at ' + getTimeNow())
}
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 {
let resp = await sduAxios.get('/jsxsd/xsxkjg/xstkOper?jx0404id=' + course.jx0404id)
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)
fs.writeFileSync('arr.json', JSON.stringify(resp.data.aaData, null, 2))
let courseList: IJsonCourse[] = resp.data.aaData
courseList = courseList.filter(single => single.kcmc.includes('尔雅') && single.xf >= 2
&& (single.kcmc.includes('国学') || single.kcmc.includes('艺术')))
courseList = courseList.filter(single => (single.kcmc.includes('稷下创新') || single.kcmc.includes('齐鲁创业'))
&& single.xqmc == '软件园校区')
for (let course of courseList) {
console.log(course.kcmc + ' ' + course.kch + ' ' + course.kxh + ' ' + course.syrs + ' ' + course.xf)
}