lsc 3 years ago
parent
commit
32a2536bad
1 changed files with 10 additions and 3 deletions
  1. 10 3
      pbl.js

+ 10 - 3
pbl.js

@@ -126,7 +126,7 @@ router.route('/selectOrg').all((req, res, next) => {
 router.route('/insertStudent').all((req, res, next) => {
 router.route('/insertStudent').all((req, res, next) => {
     var json = queryString(req.url);
     var json = queryString(req.url);
     json['userpassword'] = bcrypt.hashSync(json['userpassword'], bcrypt.genSaltSync(10))
     json['userpassword'] = bcrypt.hashSync(json['userpassword'], bcrypt.genSaltSync(10))
-    getmysql(req, res, "insertStudent",json['ph'],json['username'],json['userpassword'],json['type'],json['oid'],json['tid'],json['cid']);
+    getmysql(req, res, "insertStudent", json['ph'], json['username'], json['userpassword'], json['type'], json['oid'], json['tid'], json['cid']);
 });
 });
 
 
 /* 新增学生 */
 /* 新增学生 */
@@ -195,7 +195,7 @@ router.route('/getProject').all((req, res, next) => {
 //查询项目成员
 //查询项目成员
 router.route('/selectProjectStudent').all((req, res, next) => {
 router.route('/selectProjectStudent').all((req, res, next) => {
     var json = queryString(req.url);
     var json = queryString(req.url);
-    getmysql(req, res, "select_student", json['cn'],json['oid'], json['uid']);
+    getmysql(req, res, "select_student", json['cn'], json['oid'], json['uid']);
 });
 });
 
 
 //新增课程
 //新增课程
@@ -205,7 +205,8 @@ router.route('/addWork').all((req, res, next) => {
 
 
 //查询课程
 //查询课程
 router.route('/selectCourse').all((req, res, next) => {
 router.route('/selectCourse').all((req, res, next) => {
-    getmysql(req, res, "select_course");
+    var json = queryString(req.url);
+    getmysql(req, res, "select_course", json['type'], json['uid'], json['oid'], json['page'], 10);
 });
 });
 
 
 //查询学校
 //查询学校
@@ -340,6 +341,12 @@ router.route('/deleteCourseAdmin').all((req, res, next) => {
     postmysql(req, res, "delete_courseAdmin",);
     postmysql(req, res, "delete_courseAdmin",);
 });
 });
 
 
+//teacher 查询模板
+router.route('/getTemplateT').all((req, res, next) => {
+    var json = queryString(req.url);
+    getmysql(req, res, "select_templateT");
+});
+
 
 
 queryString = function (url) {
 queryString = function (url) {
     var a = url.split("?");
     var a = url.split("?");