Просмотр исходного кода

注册时需要认证手机和邮箱,只需要一种,中文版只体现手机;英文版只体现邮箱 ;以避免客户同时注册两个,会觉得麻烦

lvjincheng 2 лет назад
Родитель
Сommit
7022f93d48

+ 1 - 0
Assets/BowArrow/Scripts/Components/TextAutoLanguage2/Resources/TextAutoLanguage2/en.json

@@ -239,6 +239,7 @@
     "两次输入的密码不一致": "The passwords entered twice are inconsistent",
     "至少需要绑定邮箱号或者手机号": "At least the email number or mobile phone number should be bound",
     "尚未绑定邮箱号": "Email number has not been bound",
+    "尚未绑定手机号": "Phone number has not been bound",
     "该账号已被注册": "This account has been registered",
     "注册成功": "register successful",
     "注册失败": "register failed",

+ 16 - 8
Assets/BowArrow/Scripts/Manager/LoginMgr/RegisterView.cs

@@ -65,7 +65,7 @@ public class RegisterView : MonoBehaviour
         registerInUser.SetActive(!isNext);
         registerInPWD1.SetActive(!isNext);
         registerInPWD2.SetActive(!isNext);
-        registerInEmail.SetActive(!isNext);
+        registerInEmail.SetActive(!isNext && CommonConfig.serverIndex == 1);
         registerInPhone.SetActive(!isNext && CommonConfig.serverIndex == 0);
         if (CommonConfig.banBindRelateAccount)
         {
@@ -156,13 +156,21 @@ public class RegisterView : MonoBehaviour
             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;
-            }
+        // 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;
+        //     }
+        // }
+        if (registerInEmail.activeSelf && string.IsNullOrEmpty(_bindingEmail)) {
+            PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByCNKey("尚未绑定邮箱号"));
+            return;
+        }
+        if (registerInPhone.activeSelf && string.IsNullOrEmpty(_bindingPhone)) {
+            PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByCNKey("尚未绑定手机号"));
+            return;
         }
         InputField captcha = GetInputField(registerInCaptcha);
         if (!captcha.text.Equals(captcha_Register.ToString())) {