Browse Source

玩家信息登记

hexiaojie 8 months ago
parent
commit
0d95a43704

+ 70 - 29
GameClient/Assets/Game/HotUpdate/Controller/LoginController.cs

@@ -6,7 +6,10 @@ namespace GFGGame
     public class LoginController
     {
         public static string ageTipsTitle = "适龄提示说明";
-        public static string ageTips = "1)本游戏是一款角色扮演类游戏,适用于年满16周岁及以上的用户,建议未成年人在家长监护下使用游戏产品。\n2)本游戏基于架空的故事背景和幻想世界观,剧情简单且积极向上,没有基于真实历史和现实事件的改编内容游戏玩法以收集不同服装进行搭配展开,有较为简单的竞技和对抗玩法,游戏中有基于文字的陌生人社交系统。\n3)本游戏中有用户实名认证系统,认证为未成年人的用户将接受以下管理:游戏中部分玩法和道具需要付费。未满8周岁的用户不能付费; 8周岁以上未满16周岁的未成年人用户,单次充值金额不得超过50元人民币,每月充值金额累计不得超过200元人民币; 16周岁以上的未成年人用户,单次充值金额不得超过100元人民币,每月充值金额累计不得超过400元人民币。\n4)本游戏以服装收集及搭配为主要玩法,有助于玩家开阔眼界、进一步提升审美能力。游戏中很多服装融入了中华传统元素,可以有助于中华传统文化的传播,体验中国的古典美。";
+
+        public static string ageTips =
+            "1)本游戏是一款角色扮演类游戏,适用于年满16周岁及以上的用户,建议未成年人在家长监护下使用游戏产品。\n2)本游戏基于架空的故事背景和幻想世界观,剧情简单且积极向上,没有基于真实历史和现实事件的改编内容游戏玩法以收集不同服装进行搭配展开,有较为简单的竞技和对抗玩法,游戏中有基于文字的陌生人社交系统。\n3)本游戏中有用户实名认证系统,认证为未成年人的用户将接受以下管理:游戏中部分玩法和道具需要付费。未满8周岁的用户不能付费; 8周岁以上未满16周岁的未成年人用户,单次充值金额不得超过50元人民币,每月充值金额累计不得超过200元人民币; 16周岁以上的未成年人用户,单次充值金额不得超过100元人民币,每月充值金额累计不得超过400元人民币。\n4)本游戏以服装收集及搭配为主要玩法,有助于玩家开阔眼界、进一步提升审美能力。游戏中很多服装融入了中华传统元素,可以有助于中华传统文化的传播,体验中国的古典美。";
+
         public static void ShowLogin()
         {
             ViewManager.Show<LoginView>();
@@ -15,7 +18,8 @@ namespace GFGGame
         public static async ET.ETTask LoginTest(string account, bool cancelDelete = false)
         {
             ViewManager.Show<ModalStatusView>("登录中...");
-            (int errorCode, long deleteTime) = await ET.LoginHelper.LoginTest(GameGlobal.zoneScene, GameConfig.LoginAddress, account, cancelDelete);
+            (int errorCode, long deleteTime) = await ET.LoginHelper.LoginTest(GameGlobal.zoneScene,
+                GameConfig.LoginAddress, account, cancelDelete);
 
             if (errorCode == ET.ErrorCode.ERR_Success)
             {
@@ -34,6 +38,7 @@ namespace GFGGame
                     PlayerPrefs.SetString(GameConst.ACCOUNT_LAST_LOGIN_KEY, account);
                     PlayerPrefs.SetString(GameConst.PASSWORD_LAST_LOGIN_KEY, "");
                 }
+
                 GameController.CheckSpecialAccount("sygfg");
                 LocalCache.SetBool(GameConst.LAST_LOGIN_IS_VISITOR_KEY, GameGlobal.isVisitor);
                 PlayerPrefs.Save();
@@ -47,10 +52,12 @@ namespace GFGGame
         }
 
 
-        public static async ET.ETTask Login(string account, string password, bool isMD5 = false, bool cancelDelete = false)
+        public static async ET.ETTask Login(string account, string password, bool isMD5 = false,
+            bool cancelDelete = false)
         {
             ViewManager.Show<ModalStatusView>("登录中...");
-            (int errorCode, long deleteTime) = await ET.LoginHelper.Login(GameGlobal.zoneScene, GameConfig.LoginAddress, account, password, isMD5, cancelDelete);
+            (int errorCode, long deleteTime) = await ET.LoginHelper.Login(GameGlobal.zoneScene, GameConfig.LoginAddress,
+                account, password, isMD5, cancelDelete);
 
             if (errorCode == ET.ErrorCode.ERR_Success)
             {
@@ -72,9 +79,11 @@ namespace GFGGame
                     {
                         passwordMD5 = MD5Helper.stringMD5(password);
                     }
+
                     PlayerPrefs.SetString(GameConst.ACCOUNT_LAST_LOGIN_KEY, account);
                     PlayerPrefs.SetString(GameConst.PASSWORD_LAST_LOGIN_KEY, passwordMD5);
                 }
+
                 GameController.CheckSpecialAccount(account);
                 LocalCache.SetBool(GameConst.LAST_LOGIN_IS_VISITOR_KEY, GameGlobal.isVisitor);
                 PlayerPrefs.Save();
@@ -97,25 +106,27 @@ namespace GFGGame
                 ViewManager.Hide<ModalStatusView>();
                 return;
             }
+
             await ReqNoticeInfo();
 
             ViewManager.Hide<ModalStatusView>();
         }
+
         private static void OnLoginFail(int errorCode, string account, long deleteTime, string password, bool isMD5)
         {
             ViewManager.Hide<ModalStatusView>();
-            if(errorCode == ErrorCode.ERR_LoginIsLimit && deleteTime > 0)
+            if (errorCode == ErrorCode.ERR_LoginIsLimit && deleteTime > 0)
             {
                 //删除账号提示
                 AlertSystem.Show("账号注销处理中,若确定登录将取消账号注销,是否确定登录游戏?")
-                    .SetLeftButton(true, "取消", (o)=>
+                    .SetLeftButton(true, "取消", (o) =>
                     {
                         GameController.QuitToLoginView(true);
                         EventAgent.DispatchEvent(ConstMessage.LOGIN_FAIL, account);
                     })
-                    .SetRightButton(true, "确定", (o)=>
+                    .SetRightButton(true, "确定", (o) =>
                     {
-                        if(string.IsNullOrEmpty(password))
+                        if (string.IsNullOrEmpty(password))
                         {
                             LoginTest(account, true).Coroutine();
                         }
@@ -126,10 +137,12 @@ namespace GFGGame
                     });
                 return;
             }
+
             if (ErrorCodeController.Handler(errorCode))
             {
                 GameController.QuitToLoginView(true);
             }
+
             EventAgent.DispatchEvent(ConstMessage.LOGIN_FAIL, account);
         }
 
@@ -142,24 +155,32 @@ namespace GFGGame
                 // Debug.Log("noticeTime:" + noticeInfo.time + "  currentTime:" + (TimeInfo.Instance.ServerNow() / 1000));
 
                 long noticeTime = TimeUtil.GetDayTimeBySec(noticeInfo.time, GlobalCfgArray.globalCfg.refreshTime);
-                long currentTime = TimeUtil.GetDayTimeBySec(TimeInfo.Instance.ServerNow(), GlobalCfgArray.globalCfg.refreshTime);
+                long currentTime =
+                    TimeUtil.GetDayTimeBySec(TimeInfo.Instance.ServerNow(), GlobalCfgArray.globalCfg.refreshTime);
                 // Debug.Log("noticeTime:" + noticeTime + "  currentTime:" + currentTime);
                 if ((currentTime - noticeTime) / 1000 / TimeUtil.SECOND_PER_DAY < 3)
                 {
-                    ViewManager.Show<SystemNoticeView>(new object[] { NoticeDataManager.Instance.LastNoticeInfo.title, NoticeDataManager.Instance.LastNoticeInfo.content });
+                    ViewManager.Show<SystemNoticeView>(new object[]
+                    {
+                        NoticeDataManager.Instance.LastNoticeInfo.title,
+                        NoticeDataManager.Instance.LastNoticeInfo.content
+                    });
                 }
             }
             else
             {
                 ErrorCodeController.Handler(result);
             }
+
             return;
         }
 
-        public static async ETTask Register(string account, string password, string name, string identityNum, string code)
+        public static async ETTask Register(string account, string password, string name, string identityNum,
+            string code)
         {
             ViewManager.Show<ModalStatusView>("注册中...");
-            int errorCode = await LoginHelper.Register(GameGlobal.zoneScene, GameConfig.LoginAddress, account, password, name, identityNum, code);
+            int errorCode = await LoginHelper.Register(GameGlobal.zoneScene, GameConfig.LoginAddress, account, password,
+                name, identityNum, code);
 
             if (errorCode == ErrorCode.ERR_Success)
             {
@@ -183,17 +204,16 @@ namespace GFGGame
                 await ETTask.Create();
                 return;
             }
+
             var serverInfosComponent = GameGlobal.zoneScene.GetComponent<ServerInfosComponent>();
             if (serverInfosComponent.ServerInfoList.Count <= 0)
             {
                 AlertSystem.Show("服务器列表为空:\n请检查网络和服务器状态")
-                    .SetRightButton(true, "知道啦", (object data) =>
-                    {
-                        Application.Quit();
-                    });
+                    .SetRightButton(true, "知道啦", (object data) => { Application.Quit(); });
                 await ETTask.Create();
                 return;
             }
+
             if (serverInfosComponent.CurrentServerId <= 0)
             {
                 var serverInfo = serverInfosComponent.ServerInfoList[0];
@@ -203,7 +223,8 @@ namespace GFGGame
 
         public static async ETTask GetRoles()
         {
-            GameGlobal.OpenServerTime = GameGlobal.zoneScene.GetComponent<ServerInfosComponent>().GetCurrentServerInfo().OpenServerTime;
+            GameGlobal.OpenServerTime = GameGlobal.zoneScene.GetComponent<ServerInfosComponent>().GetCurrentServerInfo()
+                .OpenServerTime;
             ViewManager.Show<ModalStatusView>("获取角色信息...");
             int errorCode = await LoginHelper.GetRoles(GameGlobal.zoneScene);
             if (errorCode != ErrorCode.ERR_Success)
@@ -211,6 +232,7 @@ namespace GFGGame
                 ErrorCodeController.Handler(errorCode);
                 await ETTask.Create();
             }
+
             var roleInfosComponent = GameGlobal.zoneScene.GetComponent<RoleInfosComponent>();
             if (roleInfosComponent.RoleInfos != null && roleInfosComponent.RoleInfos.Count > 0)
             {
@@ -233,16 +255,18 @@ namespace GFGGame
             {
                 return name;
             }
+
             ErrorCodeController.Handler(result);
             return "";
         }
 
         public static async ETTask ReqCreateRole(string roleName = null)
         {
-            if(string.IsNullOrEmpty(roleName))
+            if (string.IsNullOrEmpty(roleName))
             {
                 roleName = await ReqRandomRoleName();
             }
+
             ViewManager.Show<ModalStatusView>("创建角色中...");
             int errorCode = await ET.LoginHelper.CreateRole(GameGlobal.zoneScene, roleName);
             if (errorCode != ErrorCode.ERR_Success)
@@ -251,6 +275,7 @@ namespace GFGGame
                 ErrorCodeController.Handler(errorCode);
                 return;
             }
+
             ViewManager.Hide<CreateRoleView>();
             var roleInfosComponent = GameGlobal.zoneScene.GetComponent<RoleInfosComponent>();
             var roleInfo = roleInfosComponent.RoleInfos[0];
@@ -270,12 +295,14 @@ namespace GFGGame
                 ErrorCodeController.Handler(errorCode);
                 return;
             }
+
             errorCode = await LoginHelper.EnterGame(GameGlobal.zoneScene);
             if (errorCode != ErrorCode.ERR_Success)
             {
                 ErrorCodeController.Handler(errorCode);
                 return;
             }
+
             ViewManager.Hide<ModalStatusView>();
             ViewManager.Hide<LoginView>();
             ViewManager.Show<LoadingView>(0.01f);
@@ -297,27 +324,23 @@ namespace GFGGame
             {
                 string errMessage = "与服务器连接失败。";
                 Log.Error($"Reconnect fail, errorCode {errorCode}!");
-                if(errorCode == ErrorCode.ERR_TokenError)
+                if (errorCode == ErrorCode.ERR_TokenError)
                 {
                     errMessage = "登录已过期,请重新登录";
                     AlertSystem.Show(errMessage)
-                            .SetRightButton(true, "好的", (object data) =>
-                            {
-                                GameController.QuitToLoginView(false);
-                            });
+                        .SetRightButton(true, "好的", (object data) => { GameController.QuitToLoginView(false); });
                     return;
                 }
-                else if(errorCode == ErrorCode.ERR_NetWorkError)
+                else if (errorCode == ErrorCode.ERR_NetWorkError)
                 {
                     errMessage = "网络异常,与服务器连接失败。";
                 }
+
                 AlertSystem.Show(errMessage)
-                        .SetRightButton(true, "重新连接", (object data) =>
-                        {
-                            ReqReConnectGate().Coroutine();
-                        });
+                    .SetRightButton(true, "重新连接", (object data) => { ReqReConnectGate().Coroutine(); });
                 return;
             }
+
             await GameGlobal.zoneScene.GetComponent<ObjectWait>().Wait<ET.WaitType.Wait_SceneChangeFinish>();
             EventAgent.DispatchEvent(ConstMessage.NUMERIC_CHANGE, NumericType.All);
             GameController.OnReconnected();
@@ -325,5 +348,23 @@ namespace GFGGame
             ViewManager.Hide<ModalStatusView>();
             GameController.CheckUpdateVersion();
         }
+
+        //玩家账号信息登记
+        public static async ETTask RegisterRoleInfo(string account, string password, string name, string identityNum,
+            string code, string phoneNumber)
+        {
+            int errorCode =
+                await LoginHelper.RegisterRoleInfo(GameGlobal.zoneScene, account, password, name, identityNum, code,
+                    phoneNumber);
+
+            // if (errorCode != ErrorCode.ERR_Success)
+            // {
+            //    // ErrorCodeController.Handler(errorCode);
+            // }
+            // else
+            // {
+            //     AlertSystem.Hide();
+            // }
+        }
     }
-}
+}

+ 28 - 0
GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Login/LoginHelper.cs

@@ -492,5 +492,33 @@ namespace ET
 
             return (ErrorCode.ERR_Success, response.Name);
         }
+
+        //玩家信息登记
+        public static async ETTask<int> RegisterRoleInfo(Scene zoneScene, string account,
+            string password,
+            string name, string identityNum, string code, string phoneNumber)
+        {
+            var passwordMD5 = MD5Helper.stringMD5(password);
+            M2C_RegisterRoleInfo response = (M2C_RegisterRoleInfo)await MessageHelper.SendToServer(
+                new C2M_RegisterRoleInfo
+                {
+                    PhoneNumber = phoneNumber,
+                    VerificationCode = code,
+                    Account = account,
+                    Password = passwordMD5,
+                    IdCard = identityNum,
+                    CardName = name
+                });
+            if (response.Error != ErrorCode.ERR_Success)
+            {
+                return response.Error;
+            }
+            else
+            {
+                BonusController.TryShowBonusList(ItemUtil.CreateItemDataList(response.RewardList));
+            }
+
+            return ErrorCode.ERR_Success;
+        }
     }
 }

+ 98 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Login/UI_RoleInfoRegisterUI.cs

@@ -0,0 +1,98 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.Login
+{
+    public partial class UI_RoleInfoRegisterUI
+    {
+        public GComponent target;
+        public GComponent m_bg;
+        public GButton m_btnSubmit;
+        public GButton m_btnSendCode;
+        public GTextInput m_inputPhone;
+        public GTextInput m_inputCode;
+        public GTextInput m_inputAccount;
+        public GTextInput m_inputIDNumber;
+        public GTextInput m_inputName;
+        public GTextInput m_inputPassword;
+        public GTextInput m_inputPassword2;
+        public const string URL = "ui://myoktu7pq5ri5u";
+        public const string PACKAGE_NAME = "Login";
+        public const string RES_NAME = "RoleInfoRegisterUI";
+        private static UI_RoleInfoRegisterUI _proxy;
+
+        public static UI_RoleInfoRegisterUI Create(GObject gObject = null)
+        {
+            var ui = new UI_RoleInfoRegisterUI();
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_RoleInfoRegisterUI Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_RoleInfoRegisterUI();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static void ProxyEnd()
+        {
+            if (_proxy != null)
+            {
+                _proxy.Dispose();
+            }
+        }
+
+        public static void ClearProxy()
+        {
+            ProxyEnd();
+            _proxy = null;
+        }
+
+        private void Init(GComponent comp)
+        {
+            m_bg = (GComponent)comp.GetChild("bg");
+            m_btnSubmit = (GButton)comp.GetChild("btnSubmit");
+            m_btnSendCode = (GButton)comp.GetChild("btnSendCode");
+            m_inputPhone = (GTextInput)comp.GetChild("inputPhone");
+            m_inputCode = (GTextInput)comp.GetChild("inputCode");
+            m_inputAccount = (GTextInput)comp.GetChild("inputAccount");
+            m_inputIDNumber = (GTextInput)comp.GetChild("inputIDNumber");
+            m_inputName = (GTextInput)comp.GetChild("inputName");
+            m_inputPassword = (GTextInput)comp.GetChild("inputPassword");
+            m_inputPassword2 = (GTextInput)comp.GetChild("inputPassword2");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_bg = null;
+            m_btnSubmit = null;
+            m_btnSendCode = null;
+            m_inputPhone = null;
+            m_inputCode = null;
+            m_inputAccount = null;
+            m_inputIDNumber = null;
+            m_inputName = null;
+            m_inputPassword = null;
+            m_inputPassword2 = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Login/UI_RoleInfoRegisterUI.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8fcc48047d637ab49b399a65c0414f9b
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 50 - 16
GameClient/Assets/Game/HotUpdate/ServerProxy/RoleInfoSProxy.cs

@@ -35,6 +35,7 @@ namespace GFGGame
                     return true;
                 }
             }
+
             return false;
         }
 
@@ -42,7 +43,8 @@ namespace GFGGame
         public static async ETTask<OtherRoleInfoDetailData> ReqOtherRoleDetailInfo(long otherRoleId)
         {
             S2C_GetOtherRoleDetailInfo response = null;
-            response = (S2C_GetOtherRoleDetailInfo)await MessageHelper.SendToServer(new C2S_GetOtherRoleDetailInfo() { OtherRoleId = otherRoleId });
+            response = (S2C_GetOtherRoleDetailInfo)await MessageHelper.SendToServer(new C2S_GetOtherRoleDetailInfo()
+                { OtherRoleId = otherRoleId });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
@@ -91,7 +93,7 @@ namespace GFGGame
                     }
 
                     roleInfoDetail.roleInfo.itemList.Clear();
-                    for(int i = 0; i < response.RoleInfo.ItemList.Count; i++)
+                    for (int i = 0; i < response.RoleInfo.ItemList.Count; i++)
                     {
                         roleInfoDetail.roleInfo.itemList.Add(response.RoleInfo.ItemList[i]);
                     }
@@ -99,6 +101,7 @@ namespace GFGGame
                     return roleInfoDetail;
                 }
             }
+
             return null;
         }
 
@@ -107,7 +110,8 @@ namespace GFGGame
         public static async ETTask<string> ReqModifySlogan(string slogan)
         {
             S2C_ModifySignature response = null;
-            response = (S2C_ModifySignature)await MessageHelper.SendToServer(new C2S_ModifySignature() { Signature = slogan });
+            response = (S2C_ModifySignature)await MessageHelper.SendToServer(new C2S_ModifySignature()
+                { Signature = slogan });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
@@ -116,6 +120,7 @@ namespace GFGGame
                     return RoleDataManager.slogan;
                 }
             }
+
             return RoleDataManager.slogan;
         }
 
@@ -135,8 +140,10 @@ namespace GFGGame
                     return true;
                 }
             }
+
             return false;
         }
+
         //修改角色头像
         public static async ETTask<bool> ReqModifyRoleHead(int headId)
         {
@@ -149,20 +156,24 @@ namespace GFGGame
                     RoleDataManager.headId = response.HeadItemId;
                     if (LeagueDataManager.Instance.Type == LeagueJoinType.Join)
                     {
-                        LeagueDataManager.Instance.LeagueData.LeagueMemberDatas[RoleDataManager.roleId].RoleInfo.headId = RoleDataManager.headId;
+                        LeagueDataManager.Instance.LeagueData.LeagueMemberDatas[RoleDataManager.roleId].RoleInfo
+                            .headId = RoleDataManager.headId;
                     }
 
                     EventAgent.DispatchEvent(ConstMessage.CHANGE_ROLE_HEAD);
                     return true;
                 }
             }
+
             return false;
         }
+
         //修改角色头像框
         public static async ETTask<bool> ReqModifyRoleHeadBorder(int HeadBorder)
         {
             S2C_AuHeadBorder response = null;
-            response = (S2C_AuHeadBorder)await MessageHelper.SendToServer(new C2S_AuHeadBorder() { HeadBorderItemId = HeadBorder });
+            response = (S2C_AuHeadBorder)await MessageHelper.SendToServer(new C2S_AuHeadBorder()
+                { HeadBorderItemId = HeadBorder });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
@@ -170,12 +181,15 @@ namespace GFGGame
                     RoleDataManager.headBorderId = response.HeadBorderItemId;
                     if (LeagueDataManager.Instance.Type == LeagueJoinType.Join)
                     {
-                        LeagueDataManager.Instance.LeagueData.LeagueMemberDatas[RoleDataManager.roleId].RoleInfo.headBorderId = RoleDataManager.headBorderId;
+                        LeagueDataManager.Instance.LeagueData.LeagueMemberDatas[RoleDataManager.roleId].RoleInfo
+                            .headBorderId = RoleDataManager.headBorderId;
                     }
+
                     EventAgent.DispatchEvent(ConstMessage.CHANGE_ROLE_HEAD);
                     return true;
                 }
             }
+
             return false;
         }
 
@@ -183,7 +197,8 @@ namespace GFGGame
         public static async ETTask<bool> ReqModifyShowPhoto(List<long> photoDatas)
         {
             S2C_AddOpenAlbumInfo response = null;
-            response = (S2C_AddOpenAlbumInfo)await MessageHelper.SendToServer(new C2S_AddOpenAlbumInfo() { PictureIds = photoDatas });
+            response = (S2C_AddOpenAlbumInfo)await MessageHelper.SendToServer(new C2S_AddOpenAlbumInfo()
+                { PictureIds = photoDatas });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
@@ -191,13 +206,15 @@ namespace GFGGame
                     return true;
                 }
             }
+
             return false;
         }
 
         public static async ETTask<bool> ReqSaveChangeGearSwitch(int isOn)
         {
             S2C_SaveChangeGearSwitch response;
-            response = (S2C_SaveChangeGearSwitch)await MessageHelper.SendToServer(new C2S_SaveChangeGearSwitch() { Switch = isOn });
+            response = (S2C_SaveChangeGearSwitch)await MessageHelper.SendToServer(new C2S_SaveChangeGearSwitch()
+                { Switch = isOn });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
@@ -205,6 +222,7 @@ namespace GFGGame
                     return true;
                 }
             }
+
             return false;
         }
 
@@ -219,13 +237,15 @@ namespace GFGGame
                     return true;
                 }
             }
+
             return false;
         }
 
         public static async ETTask<bool> ReqSaveBadgeList(List<int> itemList)
         {
             S2C_UpWearBadges response;
-            response = (S2C_UpWearBadges)await MessageHelper.SendToServer(new C2S_UpWearBadges() { ItemList = itemList });
+            response = (S2C_UpWearBadges)await MessageHelper.SendToServer(
+                new C2S_UpWearBadges() { ItemList = itemList });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
@@ -233,6 +253,7 @@ namespace GFGGame
                     return true;
                 }
             }
+
             return false;
         }
 
@@ -240,7 +261,8 @@ namespace GFGGame
         public static async ETTask<bool> ReqNewRoleGetSuit(int id)
         {
             S2C_GetSuitSelectReward response;
-            response = (S2C_GetSuitSelectReward)await MessageHelper.SendToServer(new C2S_GetSuitSelectReward() { SuitId = id });
+            response = (S2C_GetSuitSelectReward)await MessageHelper.SendToServer(new C2S_GetSuitSelectReward()
+                { SuitId = id });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
@@ -251,13 +273,15 @@ namespace GFGGame
                     return true;
                 }
             }
+
             return false;
         }
+
         //新手领取套装状态
         public static async ETTask<bool> ReqNewRoleGetSuitStatus()
         {
             S2C_GetSuitSelectStatus response;
-            response = (S2C_GetSuitSelectStatus)await MessageHelper.SendToServer(new C2S_GetSuitSelectStatus() {  });
+            response = (S2C_GetSuitSelectStatus)await MessageHelper.SendToServer(new C2S_GetSuitSelectStatus() { });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
@@ -266,13 +290,15 @@ namespace GFGGame
                     return true;
                 }
             }
+
             return false;
         }
 
         //获取主题id
         public static async ETTask<bool> GetThemeID()
         {
-            S2C_GetDataRecord response = (S2C_GetDataRecord)await MessageHelper.SendToServer(new C2S_GetDataRecord() { });
+            S2C_GetDataRecord response =
+                (S2C_GetDataRecord)await MessageHelper.SendToServer(new C2S_GetDataRecord() { });
             for (int i = 0; i < response.AllKs.Count; i++)
             {
                 if (response.AllKs[i] == MainDataManager.Instance.CardBgKey)
@@ -281,21 +307,29 @@ namespace GFGGame
                     return true;
                 }
             }
+
             MainDataManager.Instance.CardBgID = 0;
             return true;
         }
+
         //绑定获取验证码
         public static async ETTask<bool> GetMobileVerification(string phoneNumber)
         {
-            S2C_GetMobileVerificationCodeUnit response = (S2C_GetMobileVerificationCodeUnit)await MessageHelper.SendToServer(new C2S_GetMobileVerificationCodeUnit() { PhoneNumber = phoneNumber});
+            S2C_GetMobileVerificationCodeUnit response =
+                (S2C_GetMobileVerificationCodeUnit)await MessageHelper.SendToServer(
+                    new C2S_GetMobileVerificationCodeUnit() { PhoneNumber = phoneNumber });
+
             return true;
         }
+
         //绑定手机
-        public static async ETTask<bool> BindMobilePhoneNumber(string phoneNumber,string code)
+        public static async ETTask<bool> BindMobilePhoneNumber(string phoneNumber, string code)
         {
-            S2C_BindMobilePhoneNumber response = (S2C_BindMobilePhoneNumber)await MessageHelper.SendToServer(new C2S_BindMobilePhoneNumber() { PhoneNumber = phoneNumber ,VerCode = code});
+            S2C_BindMobilePhoneNumber response =
+                (S2C_BindMobilePhoneNumber)await MessageHelper.SendToServer(new C2S_BindMobilePhoneNumber()
+                    { PhoneNumber = phoneNumber, VerCode = code });
             BonusController.TryShowBonusList(ItemUtil.CreateItemDataList(response.RewardList));
             return true;
         }
     }
-}
+}

+ 13 - 5
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -149,7 +149,7 @@ namespace GFGGame
             _ui.m_btnTapTapJump.target.onClick.Add(OnClickTapTapJump);
             _btnGallery.onClick.Add(OnClickGallery);
             _btnPoem.onClick.Add(OnClickPoem);
-            
+
             _ui.m_btnActivityXDMH.target.onClick.Add(OnClickBtnXDMH);
 
             _ui.m_comListAd.m_listAd.itemRenderer = RenderListAdItem;
@@ -326,7 +326,7 @@ namespace GFGGame
                             , RedDotDataManager.Instance.GetActivityFYJYRed(), "", -15, -1);
                     }
                 }
-                
+
                 int activityId = ActivityDataManager.Instance.GetCurOpenActiveByType(ActivityType.BlindBoxType);
                 if (activityId > 0)
                 {
@@ -361,7 +361,7 @@ namespace GFGGame
                     ? false
                     : true;
         }
-        
+
         //限定盲盒按钮显示
         private void RefreshBtnXdmhActivity()
         {
@@ -1621,11 +1621,19 @@ namespace GFGGame
         private void CheckAutoShowViews()
         {
             if (GameConfig.tsStatus > 0) return; //提审时不显示弹窗
-            if (RoleDataManager.lvl < 5) return;
+
             if (GuideDataManager.currentGuideId > 0) return;
             if (GameGlobal.AutoShowCompleted) return;
             if (!GameGlobal.AfterDataInited) return;
             if (!ViewManager.CheckIsTopView(this.viewCom)) return;
+            int isRegisterRoleInfo = GameGlobal.myNumericComponent.GetAsInt(NumericType.IsRegisterRoleInfo);
+            if (isRegisterRoleInfo == 0)
+            {
+                ViewManager.Show<RoleInfoRegisterView>();
+                return;
+            }
+
+            if (RoleDataManager.lvl < 5) return;
             //if (!TimeUtil.CheckIsSameTime(lastTime * 1000, TimeHelper.ClientNow()))
             if (GameGlobal.AutoNewPlayersTips)
             {
@@ -1835,7 +1843,7 @@ namespace GFGGame
         {
             ViewManager.Show<ActivityHuaRongDaoEntryView>(5016);
         }
-        
+
         private void OnClickBtnXDMH()
         {
             ViewManager.Show<BlindBoxView>();

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Views/RoleInfoRegister.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 368516d0b12043249004e6efdd913a65
+timeCreated: 1733483725

+ 139 - 0
GameClient/Assets/Game/HotUpdate/Views/RoleInfoRegister/RoleInfoRegisterView.cs

@@ -0,0 +1,139 @@
+using UI.Login;
+using UnityEngine;
+using FairyGUI;
+
+namespace GFGGame
+{
+    public class RoleInfoRegisterView : BaseWindow
+    {
+        private UI_RoleInfoRegisterUI _ui;
+
+        public override void Dispose()
+        {
+            if (_ui != null)
+            {
+                _ui.Dispose();
+                _ui = null;
+            }
+
+            base.Dispose();
+        }
+
+        protected override void OnInit()
+        {
+            base.OnInit();
+            packageName = UI_RoleInfoRegisterUI.PACKAGE_NAME;
+            _ui = UI_RoleInfoRegisterUI.Create();
+            this.viewCom = _ui.target;
+            this.viewCom.Center();
+            this.modal = true;
+
+            _ui.m_btnSubmit.onClick.Add(OnClickBtnSubmit);
+            _ui.m_btnSendCode.onClick.Add(OnBtnGetCode);
+
+            //输入限制
+            _ui.m_inputAccount.restrict = "[0-9A-Za-z_]";
+            _ui.m_inputPassword2.restrict = _ui.m_inputPassword.restrict = "[0-9A-Za-z_]";
+            _ui.m_inputName.restrict = "[\u4e00-\u9fa5a-zA-Z]";
+            _ui.m_inputIDNumber.restrict = "[a-zA-Z0-9]";
+        }
+
+
+        protected override void OnShown()
+        {
+            base.OnShown();
+        }
+
+        protected override void OnHide()
+        {
+            base.OnHide();
+        }
+
+        private void OnClickBtnSubmit()
+        {
+            CheckToSubmit();
+        }
+
+        private async void OnBtnGetCode()
+        {
+            if (_ui.m_inputPhone.text == null || _ui.m_inputPhone.text == "")
+            {
+                PromptController.Instance.ShowFloatTextPrompt("麻烦输入手机号码!");
+                return;
+            }
+
+            bool result = await RoleInfoSProxy.GetMobileVerification(_ui.m_inputPhone.text);
+        }
+
+        private void CheckToSubmit()
+        {
+            //账号
+            string account = _ui.m_inputAccount.text.Trim();
+            //密码
+            string password = _ui.m_inputPassword.text;
+            //确认密码
+            string passwordSure = _ui.m_inputPassword2.text;
+            //玩家姓名
+            string realName = _ui.m_inputName.text;
+            //玩家身份证号码
+            string idNumberStr = _ui.m_inputIDNumber.text;
+            //手机号码
+            string phoneNumber = _ui.m_inputPhone.text;
+            //验证码
+            string code = _ui.m_inputCode.text;
+            if (string.IsNullOrEmpty(account))
+            {
+                PromptController.Instance.ShowFloatTextPrompt("请输入账号");
+                return;
+            }
+            
+            if (string.IsNullOrEmpty(code))
+            {
+                PromptController.Instance.ShowFloatTextPrompt("请输入验证码");
+                return;
+            }
+            
+            if (account.Length < 8) //最长输入在UI编辑器中做了限制
+            {
+                PromptController.Instance.ShowFloatTextPrompt("账号长度最少需要8位");
+                return;
+            }
+            
+            if (string.IsNullOrEmpty(password))
+            {
+                PromptController.Instance.ShowFloatTextPrompt("请输入密码");
+                return;
+            }
+            
+            if (password.Length < 8) //最长输入在UI编辑器中做了限制
+            {
+                PromptController.Instance.ShowFloatTextPrompt("密码长度最少需要8位");
+                return;
+            }
+            
+            if (passwordSure != password)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("确认密码不一致");
+                return;
+            }
+
+            GameController.CheckSpecialAccount(account);
+            if (GameGlobal.antiAddiction)
+            {
+                if (realName.Length <= 0)
+                {
+                    PromptController.Instance.ShowFloatTextPrompt("请输入真实姓名");
+                    return;
+                }
+            
+                if (idNumberStr.Length <= 0)
+                {
+                    PromptController.Instance.ShowFloatTextPrompt("请输入身份证号");
+                    return;
+                }
+            }
+
+            LoginController.RegisterRoleInfo(account, password, realName, idNumberStr, code, phoneNumber).Coroutine();
+        }
+    }
+}

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Views/RoleInfoRegister/RoleInfoRegisterView.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 727d44635fb845d0b6dcbfd14b2dd4ff
+timeCreated: 1733483740

BIN
GameClient/Assets/ResIn/UI/Login/Login_fui.bytes