public async Task <PortalTokenResp> CodeLogin([FromBody] PortalPasscodeReq req) { var stateRes = CheckLoginModelState(req); if (!stateRes.IsSuccess()) { return(new PortalTokenResp().WithResp(stateRes));// stateRes.ConvertToResultInherit<PortalTokenResp>(); } return(await service.CodeLogin(req.name, req.code, req.type, req.is_from_bind)); }
/// <summary> /// 验证码登录 /// </summary> /// <param name="req"></param> /// <returns></returns> public async Task <UserTokenResp> CodeLogin([FromBody] UserPasscodeReq req) { var stateRes = CheckLoginModelState(req); if (!stateRes.IsSuccess()) { return(stateRes.ConvertToResultInherit <UserTokenResp>()); } return(await service.CodeLogin(req.name, req.passcode, req.type)); }