Пример #1
0
        public void initial(Auth auth, Tms_Login request, Tms_Login_Logic loginLogic, CommonResponse ecr, string[] token, string uri)
        {
            if (auth.AuthResult(token, uri))
            {
                //if (loginLogic.LoginCheck(request) > 0)
                //{
                //    ecr.meta.code = 200;
                //    ecr.meta.message = "OK";
                //    ecr.data.results = loginLogic.GetTodr1(request);
                //}
                if (uri.IndexOf("/tms/login/check") > 0)
                {
                    ecr.meta.code    = 200;
                    ecr.meta.message = "OK";
                    ecr.data.results = loginLogic.LoginCheck(request);
                }

                else
                {
                    ecr.meta.code    = 612;
                    ecr.meta.message = "Invalid DriverID";
                }
            }
            else
            {
                ecr.meta.code    = 401;
                ecr.meta.message = "Unauthorized";
            }
        }
 public void initial(Auth auth, Tms_Login request, Tms_Login_Logic loginLogic, CommonResponse ecr, string[] token, string uri)
 {
     if (auth.AuthResult(token, uri))
     {
         if (loginLogic.LoginCheck(request) > 0)
         {
             ecr.meta.code    = 200;
             ecr.meta.message = "OK";
             ecr.data.results = loginLogic.GetUserInfo(request);
         }
         else
         {
             ecr.meta.code    = 612;
             ecr.meta.message = "Invalid Phone Number";
         }
     }
     else
     {
         ecr.meta.code    = 401;
         ecr.meta.message = "Unauthorized";
     }
 }