Exemple #1
0
        public void Login()
        {
            LoginRequst request = new LoginRequst();

            request.LOGINNAME      = "admin";
            request.LOGINPWD       = "21232f297a57a5a743894a0e4a801fc3";
            request.LOGINSUBSYSTEM = Guid.NewGuid().ToString();
            //wfg added
            request.LOGINIP = "127.0.0.1";


            AuthService auth = new AuthService(apiContext);
            ResponseMessage <UserInfo> response = auth.Login(request);

            Assert.IsTrue(response.Code == "0");
        }
Exemple #2
0
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="requst"></param>
        /// <returns></returns>
        public ResponseMessage <UserInfo> Login(LoginRequst requst)
        {
            string url = ApiContext.ApiUrl + "/basic/account/login";

            return(ApiContext.Client.Post <ResponseMessage <UserInfo> >(url, requst, "POST", null));
        }