Exemple #1
0
        public void Login()

        {
            if (phone == null || Password == null)
            {
                HelpMethods.Msg("请您输入完整手机号和密码!");
            }
            else
            {
                HttpPostLogin.HttpPost(Phone, Password);
            }
        }
Exemple #2
0
        public LoginPage()
        {
            InitializeComponent();
            ITokenInfo tokenInfo = DependencyService.Get <ITokenInfo>(DependencyFetchTarget.GlobalInstance);

            loginButton.Clicked += async(sender, e) =>
            {
                HttpPostLogin regster = new HttpPostLogin(Username.Text, Password.Text);
                var           token   = new Token
                {
                    CachedToken = regster.Exe().Token
                };
                await BlobCache.LocalMachine.InsertObject("cache", token);

                tokenInfo.TOKEN = token.CachedToken;
                await Navigation.PushAsync(new Pages.MainPage());
            };

            signupButton.Clicked += (sender, e) =>
            {
                Navigation.PushAsync(new Pages.SignUpPage());
            };
        }