| | |
| | | btnAccountViewBottomLine.Height = Application.GetRealHeight(2); |
| | | return; |
| | | } |
| | | #if __IOS__ |
| | | etPassword.Foucs = true; |
| | | #endif |
| | | //加载Loading效果 |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | |
| | | } |
| | | //验证码不需要隐藏 |
| | | etPassword.SecureTextEntry = false; |
| | | #if __IOS__ |
| | | etPassword.SetTextContentTypeToOneTimeCode(); |
| | | #endif |
| | | } |
| | | #endregion |
| | | } |
| | |
| | | //} |
| | | //隐藏密码 |
| | | etPassword.SecureTextEntry = true; |
| | | //etPassword.IsNumberKeyboardType = false; |
| | | } |
| | | //验证码登录 |
| | | else if (logintMode == 1) |
| | |
| | | } |
| | | //验证码不需要隐藏 |
| | | etPassword.SecureTextEntry = false; |
| | | etPassword.Text = smsCode; |
| | | //etPassword.IsNumberKeyboardType = true; |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | btnPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor; |
| | | btnPasswordViewBottomLine.Height = Application.GetRealHeight(2); |
| | | new Thread(() => { |
| | | for(var i = 0; i < 10; i++) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | |
| | | #if __IOS__ |
| | | new Thread(() => { |
| | | for(var i = 0; i < 10; i++) |
| | | { |
| | | this.Y = 0-Application.GetRealHeight(10 * i); |
| | | }); |
| | | Thread.Sleep(10); |
| | | } |
| | | }) { IsBackground = true }.Start(); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | this.Y = 0-Application.GetRealHeight(10 * i); |
| | | }); |
| | | Thread.Sleep(10); |
| | | } |
| | | }) { IsBackground = true }.Start(); |
| | | |
| | | var sst = etPassword.MyTextContentType; |
| | | Console.WriteLine(sst); |
| | | etPassword.SetTextContentTypeToOneTimeCode(); |
| | | #endif |
| | | } |
| | | else |
| | | { |
| | |
| | | //当焦点在密码文本框时,点击键盘回撤按键,触发的事件 |
| | | etPassword.EditorEnterAction += (obj) => |
| | | { |
| | | LoginEvent(); |
| | | Application.HideSoftInput(); |
| | | LoginEvent(); |
| | | }; |
| | | } |
| | | |
| | |
| | | { |
| | | //跳转页面---- |
| | | MainPage.GoUserPage(true); |
| | | this.RemoveFromParent(); |
| | | return; |
| | | } |
| | | }); |
| | |
| | | Common.ApiUtlis.Ins.DownloadDataComplete = false; |
| | | //跳转页面---- |
| | | MainPage.GoUserPage(true); |
| | | this.RemoveFromParent(); |
| | | }); |
| | | } |
| | | else |
| | |
| | | //调用验证码登录接口 |
| | | loginResult = pm.LoginValidCode(account, password); |
| | | } |
| | | if(loginResult == null) |
| | | { |
| | | |
| | | return false; |
| | | } |
| | | if (loginResult.Code == StateCode.SUCCESS) |
| | | { |
| | | var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<UserLoginRes>(loginResult.Data.ToString()); |
| | | // UserInfo.Current = new UserInfo |
| | | //{ |
| | | // userType = revertData.userType, |
| | | // accountString = account, |
| | | // password = password, |
| | | // lastTime = DateTime.Now, |
| | | // ID = revertData.userId, |
| | | // loginTokenString = revertData.headerPrefix + revertData.accessToken, |
| | | // refreshToken = revertData.refreshToken, |
| | | // userName = revertData.name |
| | | //}; |
| | | if (OnAppConfig.Instance.LastLoginUserId != revertData.userId) |
| | | { |
| | | OnAppConfig.Instance.LastLoginUserId = revertData.userId; |
| | |
| | | UserInfo.Current.ClearUserInfo(); |
| | | UserInfo.Current.userType = revertData.userType; |
| | | UserInfo.Current.AccountString = account; |
| | | //UserInfo.Current.password = password; |
| | | UserInfo.Current.LastTime = DateTime.Now; |
| | | UserInfo.Current.ID = revertData.userId; |
| | | UserInfo.Current.LoginTokenString = revertData.headerPrefix + revertData.accessToken; |
| | | UserInfo.Current.AccessToken = revertData.accessToken; |
| | | UserInfo.Current.RefreshToken = revertData.refreshToken; |
| | | UserInfo.Current.userName = revertData.name; |
| | | //UserInfo.Current.userMobileInfo = "";//重置用户手机 |
| | | //UserInfo.Current.userEmailInfo = "";//重置用户邮箱 |
| | | //UserInfo.Current.headImagePagePath = "LoginIcon/2.png";// |
| | | //UserInfo.Current.CurrentRegion.RegionID = ""; |
| | | UserInfo.Current.SaveUserInfo(); |
| | | MainPage.Log("登录成功。"); |
| | | #if __IOS__ |