|
|
@@ -1770,6 +1770,31 @@ router.route("/selectstysconote").all((req, res, next) => {
|
|
|
);
|
|
|
});
|
|
|
|
|
|
+// 自主学习-学习空间-获取单个工具 yym
|
|
|
+router.route("/selectstysconoteone").all((req, res, next) => {
|
|
|
+ var json = queryString(req.url);
|
|
|
+ getmysql(
|
|
|
+ req,
|
|
|
+ res,
|
|
|
+ "selectstysconoteone",
|
|
|
+ json["uid"],
|
|
|
+ json["sid"],
|
|
|
+ json["typ"]
|
|
|
+ );
|
|
|
+});
|
|
|
+
|
|
|
+
|
|
|
+// 获取用户信息 yym
|
|
|
+router.route("/selectuserinfoyym").all((req, res, next) => {
|
|
|
+ var json = queryString(req.url);
|
|
|
+ getmysql(
|
|
|
+ req,
|
|
|
+ res,
|
|
|
+ "selectuserinfoyym",
|
|
|
+ json["userid"]
|
|
|
+ );
|
|
|
+});
|
|
|
+
|
|
|
// 自主学习-学习空间-删除工具 yym
|
|
|
router.route("/delstysconote").all((req, res, next) => {
|
|
|
postmysql(req, res, "delstysconote");
|
|
|
@@ -1796,6 +1821,24 @@ router.route("/getcocostudyspaceAll").all((req, res, next) => {
|
|
|
json["uid"]
|
|
|
);
|
|
|
});
|
|
|
+// 自主学习获取全部学习空间 yym
|
|
|
+router.route("/getcocostudyspaceAllCopy").all((req, res, next) => {
|
|
|
+ var json = queryString(req.url);
|
|
|
+ getmysql(
|
|
|
+ req,
|
|
|
+ res,
|
|
|
+ "getcocostudyspaceAllCopy",
|
|
|
+ json["uid"],
|
|
|
+ json["page"],
|
|
|
+ json["num"]
|
|
|
+
|
|
|
+ );
|
|
|
+});
|
|
|
+
|
|
|
+// 自主学习-学习空间-删除学习空间 yym
|
|
|
+router.route("/delstyspcid").all((req, res, next) => {
|
|
|
+ postmysql(req, res, "delstyspcid");
|
|
|
+});
|
|
|
|
|
|
// 新学生管理查询学生带排序 yym
|
|
|
router.route("/selectStudentManagesrt").all((req, res, next) => {
|
|
|
@@ -7195,16 +7238,56 @@ router.route("/batchRegistrationMoreCopyNew").post(function(req, res, next) {
|
|
|
});
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+//批量添加学生 新学生管理批量添加修改学生账号
|
|
|
+router.route("/batchRegistrationMoreAcc").post(function(req, res, next) {
|
|
|
+ let users = req.body[0];
|
|
|
+ let arr = JSON.parse(decodeURIComponent(req.body[0].arr));
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
+ let _username = encodeURIComponent(arr[i].name);
|
|
|
+ let _mail = encodeURIComponent(arr[i].mail)
|
|
|
+ let _password = users.password || "Coco1234";
|
|
|
+ let _alias = encodeURIComponent(arr[i].name)
|
|
|
+ let _oid = users.oid;
|
|
|
+ let _ph = encodeURIComponent(arr[i].phone ? arr[i].phone : "")
|
|
|
+ let _class = encodeURIComponent(arr[i].class)
|
|
|
+ let _sId = encodeURIComponent(arr[i].sId)
|
|
|
+ //加密密碼
|
|
|
+ _password = bcrypt.hashSync(_password, bcrypt.genSaltSync(10));
|
|
|
+ //生成激活碼
|
|
|
+ let _hashstr = new Date().getTime() + "";
|
|
|
+ let _digest = crypto
|
|
|
+ .createHash("sha256")
|
|
|
+ .update(_hashstr, "utf8")
|
|
|
+ .digest("hex");
|
|
|
+ //用戶數據
|
|
|
+ let _userdata = [
|
|
|
+ _mail,
|
|
|
+ _password,
|
|
|
+ _alias,
|
|
|
+ "",
|
|
|
+ 1, //0老师 1学生
|
|
|
+ _username,
|
|
|
+ "",
|
|
|
+ generateAPIKey(_username),
|
|
|
+ _digest,
|
|
|
+ "",
|
|
|
+ _username,
|
|
|
+ _sId,
|
|
|
+ 2, //1老师 2学生
|
|
|
+ _oid,
|
|
|
+ _ph,
|
|
|
+ _class,
|
|
|
+ "",
|
|
|
+ "0",
|
|
|
+ ];
|
|
|
+ //參數拼接,註冊
|
|
|
+ _userdata.unshift(_mysqluser[0], _mysqluser[1], "pbl_add_batchregisterNew");
|
|
|
+ //用戶註冊處理
|
|
|
+ mysql.usselect(_userdata, function(ret) {
|
|
|
+ res.end(JSON.stringify({ success: 1 }));
|
|
|
+ });
|
|
|
+ }
|
|
|
+});
|
|
|
|
|
|
|
|
|
|