예제 #1
0
        public static async Task <UserProxy> LoginAsync(UserProxy proxy)
        {
            if (proxy != null)
            {
                var proxyLogin = new ProxyLogin();
                var para       = new VmLogin()
                {
                    UserName = proxy.UserName,
                    Password = proxy.Password,
                };
                proxy.TokenOffical = await proxyLogin.LoginAsync(para);

                if (proxy.HasValue)
                {
                    return(proxy);
                }
            }

            return(null);
        }
예제 #2
0
        public static async Task <UserAccount> LoginAsync(UserAccount account)
        {
            var ret = new List <UserAccount>();

            if (account != null)
            {
                var proxyLogin = new ProxyLogin();
                var para       = new VmLogin()
                {
                    UserName     = account.UserName,
                    Password     = account.Password,
                    PasswordTran = account.PasswordTran,
                };
                account.TokenOffical = await proxyLogin.LoginAsync(para);

                if (account.HasValue)
                {
                    return(account);
                }
            }

            return(null);
        }