From 05f6c8a08bd6b813900846fdafeebb6069922edf Mon Sep 17 00:00:00 2001 From: CaiYanPeng Date: Thu, 14 Oct 2021 14:04:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=B3=A8=E5=86=8C=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Scenes/LoginController.cs | 62 ++++++++++++++++++------ 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/Assets/Scripts/Scenes/LoginController.cs b/Assets/Scripts/Scenes/LoginController.cs index 7fa8dbb0..cca6b10e 100644 --- a/Assets/Scripts/Scenes/LoginController.cs +++ b/Assets/Scripts/Scenes/LoginController.cs @@ -398,10 +398,16 @@ public class LoginController : BaseScene { if (pageNums == 5) { +#if UNITY_ANDROID || UNITY_IOS + MobileAni(false); +#endif StartScrollPanel(3); } else if (pageNums == 4) { +#if UNITY_ANDROID || UNITY_IOS + MobileAni(false); +#endif StartScrollPanel(2); } else @@ -675,6 +681,7 @@ public class LoginController : BaseScene //wxLogin3.Find("NickName").GetComponent().text = wxInfoJson.Value("nickname"); signContainer.gameObject.SetActive(false); pageNums = 3; + MobileAni(true); //this.goSign(); StartScrollPanel(2); } @@ -713,9 +720,16 @@ public class LoginController : BaseScene //Timer t = new Ti if (r.result) { - if (r.data.Value("isExist") && pageNums == 5) + if (pageNums == 5) { - HidePassword(); + if (r.data.Value("isExist")) + { + HidePassword(); + } + else + { + ShowPassword(true); + } } time = 60; btnText.text = $"Again({time})"; @@ -826,6 +840,7 @@ public class LoginController : BaseScene { var u = JObject.FromObject(r.data).ToObject(); RefreshWx3(u, 1); + MobileAni(true); StartScrollPanel(4); } else @@ -872,6 +887,27 @@ public class LoginController : BaseScene userResult = data; App.CurrentUser = data; } +#if UNITY_ANDROID || UNITY_IOS + void MobileAni(bool flag) + { + if (flag) + { + //顯示pf + imagedf.GetComponent().DOFade(1, 0.3f); + imagexf.GetComponent().DOFade(1, 0.3f); + LoginBg.GetComponent().DOSizeDelta(new Vector2(354, 300), 0.3f); + LoginBg.GetComponent().DOLocalMoveY(-35, 0.3f); + } + else + { + imagedf.GetComponent().DOFade(0, .3f); + imagexf.GetComponent().DOFade(0, .3f); + LoginBg.GetComponent().DOSizeDelta(new Vector2(354, 370), .3f); + LoginBg.GetComponent().DOLocalMoveY(0, .3f); + } + } + +#endif /// /// 去最后一页准备进入主场景 /// @@ -879,10 +915,7 @@ public class LoginController : BaseScene { if (!UpdateInfo()) return; #if UNITY_ANDROID || UNITY_IOS - imagedf.GetComponent().DOFade(1, 0.3f); - imagexf.GetComponent().DOFade(1, 0.3f); - LoginBg.GetComponent().DOSizeDelta(new Vector2(354, 300), 0.3f); - LoginBg.GetComponent().DOLocalMoveY(-35, 0.3f); + MobileAni(true); #endif if (pageNums == 5) { @@ -969,10 +1002,7 @@ public class LoginController : BaseScene private void goLoginReturn2() { #if UNITY_ANDROID || UNITY_IOS - imagedf.GetComponent().DOFade(1, .3f); - imagexf.GetComponent().DOFade(1, .3f); - LoginBg.GetComponent().DOSizeDelta(new Vector2(354, 300), .3f); - LoginBg.GetComponent().DOLocalMoveY(-35, .3f); + MobileAni(true); #endif if (wxLogin2.gameObject.activeSelf) wxLogin2.gameObject.SetActive(false); //if (wxLogin3.gameObject.activeSelf) wxLogin3.gameObject.SetActive(false); @@ -1083,9 +1113,12 @@ public class LoginController : BaseScene } - void ShowPassword() + void ShowPassword(bool ignoreEmail = false) { - signForm.email.text = ""; + if (!ignoreEmail) + { + signForm.email.text = ""; + } signForm.password.text = ""; signForm.captcha.text = ""; signForm.cpassword.text = ""; @@ -1107,10 +1140,7 @@ public class LoginController : BaseScene void goSign(bool isAccount = true, int type = 0) { #if UNITY_ANDROID || UNITY_IOS - imagedf.GetComponent().DOFade(0, .3f); - imagexf.GetComponent().DOFade(0, .3f); - LoginBg.GetComponent().DOSizeDelta(new Vector2(354, 370), .3f); - LoginBg.GetComponent().DOLocalMoveY(0, .3f); + MobileAni(false); #endif if (!isAccount) {