Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        /// <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));
        }