下载界面增加开始按钮,登陆注册bug修改

This commit is contained in:
Caiyanpeng committed 2021-05-20 14:12:43 +08:00
1 parent 470d52b1bc
commit 09514e2a8a
5 files changed
+1645 -1337

No files matched your search

+45 -11
View File
@@ -309,14 +309,7 @@ public class LoginController : MonoBehaviour
{
UIManager.AddEvent(wxLogin1.Find("Image").gameObject, EventTriggerType.PointerClick, (b) =>
{
wxLock = true;
wxBrowser.LoadHTML("<div/>");
//wxBrowser.Url = "chrome://version/";
wxLogin1.DOLocalMoveY(-573, 0.3f).onComplete = () =>
{
wxLock = false;
wxLogin1.gameObject.SetActive(false);
};
wxReturnLogin();
});
wxBrowser = wxLogin1.Find("Browser (GUI)").GetComponent<Browser>();
if (wxBrowser != null)
@@ -619,6 +612,8 @@ public class LoginController : MonoBehaviour
async void GetCaptcha()
{
var btn = signPage1.Find("Captcha").Find("BtnGet");
btn.GetComponent<Button>().enabled = false;
btn.GetComponent<Button>().interactable = false;
var btnText = signPage1.Find("Captcha").Find("BtnGet").Find("Text").GetComponent<Text>();
var Email = signForm.email;
var r = await ConfigHelper.userApi.GetCaptcha(Email.text);
@@ -643,7 +638,10 @@ public class LoginController : MonoBehaviour
}
else
{
btn.GetComponent<Button>().enabled = true;
btn.GetComponent<Button>().interactable = true;
Utils.showToast(gameObject, r.errMsg);
Utils.SetValidate(signFormDict, r.errFieldMsg);
}
}
#endregion
@@ -886,10 +884,24 @@ public class LoginController : MonoBehaviour
if (wxLogin2.gameObject.activeSelf) wxLogin2.gameObject.SetActive(false);
//if (wxLogin3.gameObject.activeSelf) wxLogin3.gameObject.SetActive(false);
pageNums = 4;
if (wxLogin1.transform.localPosition.y == 0)
{
wxReturnLogin();
}
Canvas.ForceUpdateCanvases();
this.StartScrollPanel(1);
}
void wxReturnLogin()
{
wxLock = true;
wxBrowser.LoadHTML("<div/>");
//wxBrowser.Url = "chrome://version/";
wxLogin1.DOLocalMoveY(-573, 0.3f).onComplete = () =>
{
wxLock = false;
wxLogin1.gameObject.SetActive(false);
};
}
/// <summary>
/// 立刻跳到登录页并且返回按钮强行失效
/// </summary>
@@ -1124,9 +1136,31 @@ public class LoginController : MonoBehaviour
void Update()
{
//Debug.Log($"{phone.isFocused}, ${pwd != null}, ${Input.GetKeyDown(KeyCode.Tab)}");
if (Input.GetKeyDown(KeyCode.Tab) && loginForm !=null && loginForm.email.isFocused && loginForm.password != null)
if (Input.GetKeyDown(KeyCode.Tab))
{
loginForm.password.ActivateInputField();
if (loginForm != null && loginForm.email.isFocused && loginForm.password != null)
{
loginForm.password.ActivateInputField();
}
if (signForm != null)
{
if (signForm.email.isFocused)
{
signForm.captcha.ActivateInputField();
}
if (signForm.captcha.isFocused)
{
signForm.password.ActivateInputField();
}
if (signForm.password.isFocused)
{
signForm.cpassword.ActivateInputField();
}
if (signForm.cpassword.isFocused)
{
signForm.email.ActivateInputField();
}
}
}
if (Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Return))
{