Пример #1
0
        public FunctionResult <JobToken> MobileLogin(string mobile, string code)
        {
            var       r    = new FunctionResult <JobToken>();
            LoginInfo data = LoginDal.MobileLogin(mobile, code);

            if (data != null)
            {
                var jobToken = new JobToken()
                {
                    JobId  = GetJobId(data.UserId),
                    UserId = data.UserId,
                    Token  = GetToken()
                };
                if (JobTokenDal.Add(jobToken) > 0)
                {
                    r.Data = jobToken;
                }
                else
                {
                    r.ErrorMsg = "无法获取标识";
                }
            }
            else
            {
                r.ErrorMsg = "无匹配用户登陆信息";
            }
            return(r);
        }