lsc 2 years ago
parent
commit
7f03e3d4c8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      pbl.js

+ 2 - 2
pbl.js

@@ -2136,7 +2136,7 @@ router.route('/getClassStudent').all((req, res, next) => {
 //添加学生到班级
 router.route('/addClassStudent').all((req, res, next) => {
     let cid = req.body[0].cid
-    let student = JSON.parse(req.body[0].studnet)
+    let student = JSON.parse(req.body[0].student)
     for (let i = 0; i < student.length; i++) {
         let _userdata = [student[i]]
         _userdata.unshift(_mysqlLabor[0], _mysqlLabor[1], "selectUser");
@@ -2148,7 +2148,7 @@ router.route('/addClassStudent').all((req, res, next) => {
                 let _userdata2 = [student[i], classid.join(",")]
                 _userdata2.unshift(_mysqlLabor[0], _mysqlLabor[1], "updateStudentClass");
                 mysql.usselect(_userdata2, function (ret) {
-                    if (i == studnet.length - 1) {
+                    if (i == student.length - 1) {
                         res.end(JSON.stringify({ success: 1 }));
                     }
                 });