lirongchuan
2634460147@qq.com 2 years ago
parent b2d0dbbe36
commit 4ee436ea9d

@ -6,9 +6,9 @@ const teamController = {
showTeam: async function(req,res,next){
try{
let teamData;
if(req.query.userId){
if(req.query.leaderId!=null){
console.log(req.query.id)
teamData= await Team.getById('userId',req.query.userId)
teamData= await Team.getById('leaderId',req.query.leaderId)
}else{
teamData = await Team.all()
}

@ -96,7 +96,8 @@ const courseController = {
//爬取学校课程相关的信息并返回
getAllCourse:async function(req, res, next) {
try {
let info = req.body;
let info = req.query;
console.log(info)
//let userid = info.userId;
const passwd = info.passwd;
const year = info.year;
@ -127,8 +128,9 @@ const courseController = {
//获取输出
pythonProcess.stdout.on('data', (data) => {
ret += data.toString();
console.log(ret)
});
//处理数据
pythonProcess.on('close', (code) => {
if (code === 0) {

@ -19,7 +19,7 @@ const courseControllers= function courseControllers(router){
router.delete('/delete_course',courseController.deleteCourse)
//爬取学校网站的接口
router.get('/get_all_course',courseController.getAllCourse)
router.post('/get_all_course',courseController.getAllCourse)
}

Loading…
Cancel
Save