public void Login() { if (phone == null || Password == null) { HelpMethods.Msg("请您输入完整手机号和密码!"); } else { HttpPostLogin.HttpPost(Phone, Password); } }
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()); }; }