|
|
@ -142,6 +142,13 @@ namespace _24Hour.Controllers |
|
|
|
try |
|
|
|
try |
|
|
|
{ |
|
|
|
{ |
|
|
|
var Passmd5 = Md5.Encrypt32(login.Password).ToLower(); |
|
|
|
var Passmd5 = Md5.Encrypt32(login.Password).ToLower(); |
|
|
|
|
|
|
|
var model = await _db.Queryable<App_Sys_UserModel>().Where(x => x.phone== login.phone && x.IsDeleted==0).FirstAsync(); |
|
|
|
|
|
|
|
if (model == null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ret.IsSucceed = false; |
|
|
|
|
|
|
|
ret.Message = "账号不存在,请先注册!"; |
|
|
|
|
|
|
|
return ret; |
|
|
|
|
|
|
|
} |
|
|
|
var date = await _db.Queryable<App_Sys_UserModel>().Where(q => q.IsDeleted == 0 && q.isdeactivate == 0 && q.phone == login.phone && q.Password == Passmd5).FirstAsync(); |
|
|
|
var date = await _db.Queryable<App_Sys_UserModel>().Where(q => q.IsDeleted == 0 && q.isdeactivate == 0 && q.phone == login.phone && q.Password == Passmd5).FirstAsync(); |
|
|
|
if (date != null) |
|
|
|
if (date != null) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -197,7 +204,7 @@ namespace _24Hour.Controllers |
|
|
|
phone = date.phone, |
|
|
|
phone = date.phone, |
|
|
|
photo = date.photo, |
|
|
|
photo = date.photo, |
|
|
|
duties = date.duties, |
|
|
|
duties = date.duties, |
|
|
|
identity=date.identity, |
|
|
|
identity = date.identity, |
|
|
|
usertype = date.usertype, |
|
|
|
usertype = date.usertype, |
|
|
|
unitCode = date.unitCode, |
|
|
|
unitCode = date.unitCode, |
|
|
|
department = "", |
|
|
|
department = "", |
|
|
@ -371,7 +378,7 @@ namespace _24Hour.Controllers |
|
|
|
|
|
|
|
|
|
|
|
[HttpGet] |
|
|
|
[HttpGet] |
|
|
|
[Route("cardIdLogin")] |
|
|
|
[Route("cardIdLogin")] |
|
|
|
public async Task<Result> cardIdLogin(string cardId,string name) |
|
|
|
public async Task<Result> cardIdLogin(string cardId, string name) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var date = await _db.Queryable<App_Sys_UserModel>().Where(q => q.IsDeleted == 0 && q.isdeactivate == 0 && q.cardId == cardId).FirstAsync(); |
|
|
|
var date = await _db.Queryable<App_Sys_UserModel>().Where(q => q.IsDeleted == 0 && q.isdeactivate == 0 && q.cardId == cardId).FirstAsync(); |
|
|
|
if (date != null) |
|
|
|
if (date != null) |
|
|
|