From a5ba89efa83d0a4afd0d25dbeba5989e4944b5b8 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 24 十一月 2020 18:57:56 +0800 Subject: [PATCH] 20201124;mqtt代码整理备份 --- HDL_ON/UI/UI1-Login/RegisterPage.cs | 66 +++++++++++++++++++-------------- 1 files changed, 38 insertions(+), 28 deletions(-) diff --git a/HDL_ON/UI/UI1-Login/RegisterPage.cs b/HDL_ON/UI/UI1-Login/RegisterPage.cs index b55a804..720f2ab 100644 --- a/HDL_ON/UI/UI1-Login/RegisterPage.cs +++ b/HDL_ON/UI/UI1-Login/RegisterPage.cs @@ -246,22 +246,22 @@ Text = "+" + phoneZoneCode, TextSize = CSS_FontSize.TextFontSize, }; + + //璺宠浆鍥藉鍖哄彿閫夋嫨鐣岄潰 + EventHandler<MouseEventArgs> eHandler = (sender, e) => { + JLCountrycode.CountryCodeView.Current.Show((countryName, code) => { + if (!string.IsNullOrEmpty(code)) + { + phoneZoneCode = code; + btnGlobalRoaming.Text = "+" + phoneZoneCode; + } + }); + }; + btnGlobalRoaming.MouseUpEventHandler += eHandler; + if (accountType == 0) { accountView.AddChidren(btnGlobalRoaming); - - EventHandler<MouseEventArgs> eHandler = (sender, e) => { - JLCountrycode.CountryCodeView.Current.Show((countryName, code) => { - if (!string.IsNullOrEmpty(code)) - { - phoneZoneCode = code; - btnGlobalRoaming.Text = "+" + phoneZoneCode; - - } - }); - }; - btnGlobalRoaming.MouseUpEventHandler += eHandler; - } //btnDividingLineVertical_AccountView = new Button() @@ -283,6 +283,7 @@ TextSize = CSS_FontSize.TextFontSize, PlaceholderTextColor = CSS_Color.PromptingColor1, PlaceholderText = Language.StringByID(StringId.PlsEntryPhoneNumber), + IsNumberKeyboardType = true }; accountView.AddChidren(etAccount); @@ -677,28 +678,37 @@ var result = false; //璋冪敤鐧诲綍鎺ュ彛 var loginResult = pm.LoginByPassword(account, password); - if (loginResult.Code == HttpUtil.SUCCESS_CODE) + if (loginResult.Code == StateCode.SUCCESS) { var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<UserLoginRes>(loginResult.Data.ToString()); - MainPage.LoginUser = 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 - }; - MainPage.LoginUser.SaveUserInfo(); + // 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 + //}; + 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.refreshToken = revertData.refreshToken; + UserInfo.Current.userName = revertData.name; + + UserInfo.Current.SaveUserInfo(); MainPage.Log("鐧诲綍鎴愬姛銆�"); result = true; } else { //鐧诲綍澶辫触 - IMessageCommon.Current.ShowErrorInfoAlter(NewAPI.API_POST_Login, loginResult.Code); + IMessageCommon.Current.ShowErrorInfoAlter(loginResult.Code); Application.RunOnMainThread(() => { btnPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; @@ -715,7 +725,7 @@ { var result = false; var responsePack = pm.GetHomePager(); - if (responsePack == HttpUtil.SUCCESS_CODE) + if (responsePack == StateCode.SUCCESS) { } else -- Gitblit v1.8.0