|
@@ -680,6 +680,20 @@ router.route('/dismiss').all((req, res, next) => {
|
|
|
postmysql(req, res, "update_room");
|
|
|
});
|
|
|
|
|
|
+//提交提问
|
|
|
+router.route('/addProblem').all((req, res, next) => {
|
|
|
+ postmysql(req, res, "add_problem");
|
|
|
+ //cid 课程id,chid 章节id,t 提问内容,uid 用户id
|
|
|
+});
|
|
|
+
|
|
|
+
|
|
|
+//查询提交的提问
|
|
|
+router.route('/getProblem').all((req, res, next) => {
|
|
|
+ var json = queryString(req.url);//cid 课程id,page 页数
|
|
|
+ getmysql(req, res, "select_problem", json['cid'], json['page'],10);
|
|
|
+});
|
|
|
+
|
|
|
+
|
|
|
queryString = function(url) {
|
|
|
var a = url.split("?");
|
|
|
var json = querystring.parse(a[1])
|