|
@@ -251,9 +251,9 @@ public class LoginPanel : BaseUI
|
|
|
{
|
|
|
|
|
|
#if UNITY_EDITOR
|
|
|
-
|
|
|
-
|
|
|
- m_AccountStr = "ghztest2@ghz-tech.com";
|
|
|
+
|
|
|
+
|
|
|
+ m_AccountStr = "yhb_adv10@1.com";
|
|
|
m_PasswordStr = "123456Aa";
|
|
|
#endif
|
|
|
|
|
@@ -296,7 +296,7 @@ public class LoginPanel : BaseUI
|
|
|
HttpTool.is20 = true;
|
|
|
if(HttpTool.is20)
|
|
|
{
|
|
|
- HttpTool.Instance.PostLogin("/user/login", jsonLogin, LoginCallBack);
|
|
|
+ HttpTool.Instance.PostLogin("/user/login", jsonLogin, LoginCallBack2);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -304,6 +304,32 @@ public class LoginPanel : BaseUI
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public void LoginCallBack2(string mes)
|
|
|
+ {
|
|
|
+
|
|
|
+ JObject obj = JObject.Parse(mes);
|
|
|
+ if (obj["code"].ToString() != "200")
|
|
|
+ {
|
|
|
+ m_Logn.interactable = true;
|
|
|
+ m_AccountError.gameObject.SetActive(true);
|
|
|
+ m_AccountErrorStr.text = obj["message"].ToString();
|
|
|
+ UIManager.Instance.HideUI(UINameConfig.LoadingPanel);
|
|
|
+ UserManager.Instance.loginBack(false);
|
|
|
+ return;
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ UserInfo.Instance.Token = obj["data"]["token"].ToString();
|
|
|
+
|
|
|
+
|
|
|
+ UserManager.Instance.loginBack(true);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|