Browse Source

1.切回中文版。2.禁用找回密码及相关功能

lvjincheng 3 years ago
parent
commit
3650367ee7

+ 2 - 0
Assets/BowArrow/Scripts/CommonConfig.cs

@@ -14,6 +14,8 @@ public class CommonConfig
     {
         get => AppLanguages[Array.IndexOf(AppNames, Application.productName)];
     }
+    //禁止绑定关联账号的相关功能(找回密码,注册界面绑定手机邮箱,个人界面绑定手机邮箱)
+    public static bool banBindRelateAccount { get => Application.platform == RuntimePlatform.IPhonePlayer; }
     public static bool iosTaoKe = false; //IOS套壳开关
     public static bool ReleaseVersion2 = true;
     /*

+ 4 - 0
Assets/BowArrow/Scripts/Manager/LoginMgr/LoginView.cs

@@ -36,6 +36,10 @@ public class LoginView : MonoBehaviour
             transform.Find("BtnForgetPWD").gameObject.SetActive(false); //隐藏忘记密码
             transform.Find("Logo/Layout/Text1").gameObject.SetActive(false);
         }
+        if (CommonConfig.banBindRelateAccount)
+        {
+            transform.Find("BtnForgetPWD").gameObject.SetActive(false); //隐藏忘记密码
+        }
     }
 
     void Start()

+ 25 - 4
Assets/BowArrow/Scripts/Manager/LoginMgr/RegisterView.cs

@@ -66,6 +66,11 @@ public class RegisterView : MonoBehaviour
         registerInPWD2.SetActive(!isNext);
         registerInEmail.SetActive(!isNext);
         registerInPhone.SetActive(!isNext && CommonConfig.serverIndex == 0);
+        if (CommonConfig.banBindRelateAccount)
+        {
+            registerInEmail.SetActive(false);
+            registerInPhone.SetActive(false);
+        }
         registerInCaptcha.SetActive(!isNext);
 
         btnNext.SetActive(!isNext);
@@ -149,10 +154,13 @@ public class RegisterView : MonoBehaviour
             PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByCNKey("两次输入的密码不一致"));
             return;
         }
-        if (string.IsNullOrEmpty(_bindingEmail) && string.IsNullOrEmpty(_bindingPhone)) {
-            if (CommonConfig.serverIndex == 0) PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByCNKey("至少需要绑定邮箱号或者手机号"));
-            else PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByCNKey("尚未绑定邮箱号"));
-            return;
+        if (!CommonConfig.banBindRelateAccount)
+        {
+            if (string.IsNullOrEmpty(_bindingEmail) && string.IsNullOrEmpty(_bindingPhone)) {
+                if (CommonConfig.serverIndex == 0) PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByCNKey("至少需要绑定邮箱号或者手机号"));
+                else PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByCNKey("尚未绑定邮箱号"));
+                return;
+            }
         }
         InputField captcha = GetInputField(registerInCaptcha);
         if (!captcha.text.Equals(captcha_Register.ToString())) {
@@ -169,6 +177,19 @@ public class RegisterView : MonoBehaviour
         }
         usrRecord = user.text;
         pwdRecord = pwd1.text;
+        if (CommonConfig.banBindRelateAccount)
+        {
+            StartCoroutine(LoginController.Instance.Register(
+                usrRecord, pwdRecord, (res) => {
+                    PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByCNKey(res.msg));
+                    if (res.code == 0) {
+                        InitPage(true); //前往完善用户信息
+                        LoginView.ins.FillLoginInput(usrRecord, pwdRecord);
+                    }
+                }
+            ));
+            return;
+        }
         StartCoroutine(LoginController.Instance.Register2(
             usrRecord, pwdRecord, _bindingEmail, _bindingPhone, (res) => {
                 PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByCNKey(res.msg));

+ 6 - 0
Assets/BowArrow/Scripts/View/Home/MeView.cs

@@ -21,6 +21,12 @@ public class MeView : ViewBase, MenuBackInterface
             inputs.transform.GetChild(2).gameObject.SetActive(false);
             transform.Find("BtnSave").Translate(Vector3.up * 25, Space.Self);
         }
+        if (CommonConfig.banBindRelateAccount)
+        {
+            inputs.transform.GetChild(2).gameObject.SetActive(false);
+            inputs.transform.GetChild(3).gameObject.SetActive(false);
+            (transform.Find("BtnSave") as RectTransform).anchoredPosition = new Vector2(154, -208);
+        }
 
         RenderAfterSave();
     }

+ 1 - 1
ProjectSettings/ProjectSettings.asset

@@ -13,7 +13,7 @@ PlayerSettings:
   useOnDemandResources: 0
   accelerometerFrequency: 60
   companyName: JssF
-  productName: HOUYI
+  productName: "\u9752\u51E4\u9E3E"
   defaultCursor: {fileID: 0}
   cursorHotspot: {x: 0, y: 0}
   m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}