|
@@ -2509,6 +2509,22 @@ router.route('/batchRegistrationMore').post(function(req, res, next) {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
+//初始化密码
|
|
|
+router.route('/iniPassword').post(function(req, res, next) {
|
|
|
+ let users = req.body[0];
|
|
|
+ _password = users.pa;
|
|
|
+ //加密密碼
|
|
|
+ _password = bcrypt.hashSync(_password, bcrypt.genSaltSync(10));
|
|
|
+ //用戶數據
|
|
|
+ let _userList = [
|
|
|
+ users.uid,
|
|
|
+ _password,
|
|
|
+ ];
|
|
|
+ _userList.unshift(_mysqluser[0], _mysqluser[1], "iniPassword");
|
|
|
+ mysql.usselect(_userList, function(ret) {
|
|
|
+ res.end(JSON.stringify({ success: 1 }));
|
|
|
+ });
|
|
|
+});
|
|
|
//批量添加教师
|
|
|
router.route('/batchRegistrationMore1').post(function(req, res, next) {
|
|
|
let users = req.body[0];
|