Commit 97229de7 by 高宇强

gyq

parent 61c2a0e0
......@@ -500,6 +500,33 @@ class LaoActionApi extends APIBase {
if (!obj.id) {
return system.getResult(null, "参数错误");
}
try{
if (obj.phone_no){
var phone_no = this.trim(obj.phone_no);
if (!/^1[23456789]\d{9}$/.test(phone_no)) {
return system.getResult(null, "手机号码格式不正确");
}
if (obj.vcode){
var vcode = this.trim(obj.vcode);
var key = this.vcodePrev + phone_no;
var code = await this.redisClient.get(key) || "";
if(!code) {
return system.getResult(null, "验证码已失效,请再1分钟之内输入");
}
if(vcode != code) {
return system.getResult(null, "验证码错误,请重新输入");
}
}
else{
return system.getResult(null, "验证码为空,请输入验证码");
}
}
var result = await this.usersSve.updateUserInfo(obj);
if (result == 1) {
var user_info = await this.usersSve.findUserInfoByid(obj.id);
......@@ -508,6 +535,11 @@ class LaoActionApi extends APIBase {
return system.getResult(null, "更新失败");
}
}
catch{
return system.getResult(null, "更新失败!");
}
}
async UpdateLabourStatus(obj) { //更新劳工信息审核状态
if (!obj.id || !obj.cur_status) {
......@@ -645,15 +677,15 @@ module.exports = LaoActionApi;
// var tesk = new LaoActionApi();
// var parm = {
// // find_type:1,
// // find_info:3,
// find_type:4,
// find_info:"北京"
// //id:2,
// //cur_status:"已过期"
// //memo_text:"sssssssss"
// //user_name:"高",
// com_name:"京东"
// //com_name:"京东"
// };
// tesk.FindRecruitByWhere(parm).then(function(result){
// tesk.FindRecruitInfo(parm).then(function(result){
// console.log(result);
// console.log(result.data.rows);
// }).catch(function(e){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment