Explorar o código

查询上传作业和上次作业功能

zengyicheng %!s(int64=2) %!d(string=hai) anos
pai
achega
bb13a237db
Modificáronse 1 ficheiros con 13 adicións e 0 borrados
  1. 13 0
      pbl.js

+ 13 - 0
pbl.js

@@ -226,6 +226,13 @@ router.route('/addWork').all((req, res, next) => {
     postmysql(req, res, "insert_teacher_work");
 });
 
+//上传文件
+router.route('/addCourseWorks').all((req, res, next) => {
+    postmysql(req, res, "addCourseWorks");
+});
+
+
+
 router.route('/addWorkNew').all((req, res, next) => {
     // postmysql(req, res, "insert_teacher_work_new");
     if (req.body[0]) {
@@ -689,6 +696,12 @@ router.route('/getTemplateAdmin').all((req, res, next) => {
     getmysql(req, res, "select_template", json['page'], 10);
 });
 
+//查询上传作业
+router.route('/getCourseWorks').all((req, res, next) => {
+    var json = queryString(req.url); //cid 课程id,page 页数
+    getmysql(req, res, "select_courseWorks", json['cid'], json['stage'], json['task'], json['page'], 10);
+});
+
 
 //admin 添加项目模板文档
 router.route('/addCourseTemplateAdmin').all((req, res, next) => {