登录界面的修改

This commit is contained in:
wulongxiao 2024-12-12 23:16:37 +08:00
parent 64ad0b32ab
commit 18a806eccc
6 changed files with 329 additions and 234 deletions

View File

@ -194,28 +194,35 @@ MonoBehaviour:
Name: Name:
textName: textName:
prompt: prompt:
prompt2:
is_required: 0 is_required: 0
content: content:
Type: 0 Type: 0
icon: {fileID: 0} icon: {fileID: 0}
icon2: {fileID: 0} icon2: {fileID: 0}
goldNumerobj:
nametext1: nametext1:
numbertext1: numbertext1:
nametext2: nametext2:
numbertext2: numbertext2:
widthnum: -1
WidthHeight: -1
Num: 0 Num: 0
details: details:
button_0_text: button_0_text:
button_1_text: button_1_text:
textobj: {fileID: 4246764786122325446} textobj: {fileID: 4246764786122325446}
promptobj: {fileID: 4246764787755305687} promptobj: {fileID: 4246764787755305687}
promptobj2: {fileID: 0}
contentobj: {fileID: 4246764786287869010} contentobj: {fileID: 4246764786287869010}
iconobj: {fileID: 0} iconobj: {fileID: 0}
iconobj2: {fileID: 0} iconobj2: {fileID: 0}
goldNumerobj: {fileID: 0}
nametextobj1: {fileID: 0} nametextobj1: {fileID: 0}
numbertextobj1: {fileID: 0} numbertextobj1: {fileID: 0}
nametextobj2: {fileID: 0} nametextobj2: {fileID: 3277920784230603192}
numbertextobj2: {fileID: 0} numbertextobj2: {fileID: 0}
WidthObj: {fileID: 0}
--- !u!1 &4246764786122325446 --- !u!1 &4246764786122325446
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -38,7 +38,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 169, y: -151} m_AnchoredPosition: {x: 169, y: -151}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 174, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &666004760195649049 --- !u!114 &666004760195649049
MonoBehaviour: MonoBehaviour:

View File

@ -343,16 +343,35 @@ MonoBehaviour:
Name: Name:
textName: textName:
prompt: prompt:
prompt2:
is_required: 0 is_required: 0
content: content:
Type: 0 Type: 0
icon: {fileID: 0} icon: {fileID: 0}
icon2: {fileID: 0}
goldNumerobj:
nametext1:
numbertext1:
nametext2:
numbertext2:
widthnum: -1
WidthHeight: -1
Num: 0
details: details:
button_0_text: button_0_text:
button_1_text: button_1_text:
textobj: {fileID: 0} textobj: {fileID: 0}
promptobj: {fileID: 0} promptobj: {fileID: 8244130570441878883}
promptobj2: {fileID: 0}
contentobj: {fileID: 0} contentobj: {fileID: 0}
iconobj: {fileID: 0}
iconobj2: {fileID: 0}
goldNumerobj: {fileID: 0}
nametextobj1: {fileID: 0}
numbertextobj1: {fileID: 0}
nametextobj2: {fileID: 0}
numbertextobj2: {fileID: 0}
WidthObj: {fileID: 0}
--- !u!1 &8244130570877256807 --- !u!1 &8244130570877256807
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -344,7 +344,7 @@ MonoBehaviour:
button_0_text: button_0_text:
button_1_text: button_1_text:
textobj: {fileID: 0} textobj: {fileID: 0}
promptobj: {fileID: 0} promptobj: {fileID: 1102998763492845764}
promptobj2: {fileID: 0} promptobj2: {fileID: 0}
contentobj: {fileID: 0} contentobj: {fileID: 0}
iconobj: {fileID: 0} iconobj: {fileID: 0}

File diff suppressed because it is too large Load Diff

View File

@ -40,7 +40,7 @@ public class Logo_in : mount
} }
public void Privacy_Policy_screen() public void Privacy_Policy_screen()//隐私界面
{ {
List<BoxType> boxTypes = new List<BoxType>(); List<BoxType> boxTypes = new List<BoxType>();
boxTypes.Add(new BoxType { Name = "", prompt = "", Type = 9, widthnum = 700, WidthHeight = 650, content = "在您使用我们(萌妖)服务前,请您务必审慎阅读、充分理解腾讯游戏用户协议隐私保护指引和儿童隐私保护指引的各条款,了解我们对您个人信息的处理规则。同时,您应特别注意前述协议中免除或者限制我们责任的条款、对您权利进行限制的条款、约定争议解决方式和司法管辖的条款。如您已详细阅读并同意 萌妖出击游戏用户协议、隐私保护指引和儿童隐私保护指引,请点击“同意”开始使用我们的服务。" }); boxTypes.Add(new BoxType { Name = "", prompt = "", Type = 9, widthnum = 700, WidthHeight = 650, content = "在您使用我们(萌妖)服务前,请您务必审慎阅读、充分理解腾讯游戏用户协议隐私保护指引和儿童隐私保护指引的各条款,了解我们对您个人信息的处理规则。同时,您应特别注意前述协议中免除或者限制我们责任的条款、对您权利进行限制的条款、约定争议解决方式和司法管辖的条款。如您已详细阅读并同意 萌妖出击游戏用户协议、隐私保护指引和儿童隐私保护指引,请点击“同意”开始使用我们的服务。" });
@ -51,17 +51,17 @@ public class Logo_in : mount
{ {
if (type == 0) if (type == 0)
{ {
Application.Quit();
} }
else if (type == 1) else if (type == 1)
{ {
Real_name_screen(); login_in_screen();//跳转到登录界面
gameObject.GetComponent<input_box_pop_up_window>().destroy(); gameObject.GetComponent<input_box_pop_up_window>().destroy();
} }
}); });
} }
public void Real_name_screen() public void Real_name_screen()//实名认证界面
{ {
List<BoxType> boxTypes = new List<BoxType>(); List<BoxType> boxTypes = new List<BoxType>();
boxTypes.Add(new BoxType { Name = "", prompt = "", Type = 13, content = "根据有关部门的规定,网络游戏用户需要使用有效身份信息进行实名注册,为享受健康游戏生活,请玩家尽快实名注册。我们承诺将严格保护您的个人信息,不会对外泄露。" }); boxTypes.Add(new BoxType { Name = "", prompt = "", Type = 13, content = "根据有关部门的规定,网络游戏用户需要使用有效身份信息进行实名注册,为享受健康游戏生活,请玩家尽快实名注册。我们承诺将严格保护您的个人信息,不会对外泄露。" });
@ -78,19 +78,73 @@ public class Logo_in : mount
} }
else if (type == 1)//提交 else if (type == 1)//提交
{ {
login_in_screen();
gameObject.GetComponent<input_box_pop_up_window>().destroy(); gameObject.GetComponent<input_box_pop_up_window>().destroy();
} }
}); });
} }
public void login_in_screen()//登录界面
public void Register_screen()//注册界面
{
List<BoxType> boxTypes = new List<BoxType>();
boxTypes.Add(new BoxType { Name = "account_number", textName = " 手机号", prompt = "请输入手机号", Type = 0, is_required = true });
boxTypes.Add(new BoxType { Name = "account_number", textName = " 密码", prompt = "请输入密码", Type = 0, is_required = false });
boxTypes.Add(new BoxType { Name = "account_number", textName = " 邀请码", prompt = "请输入邀请码", Type = 0, is_required = false });
boxTypes.Add(new BoxType { Name = "verification_code", textName = " 验证码", prompt = "请输入验证码", Type = 1, nametext2 = "发送", is_required = true });
boxTypes.Add(new BoxType { Name = "submit", textName = " 取消确定 ", prompt = "取消",Type = 5 });
GameObject gameObject = add_pop_up(true);//生成弹窗母体
List<GameObject> gameObjects = gameObject.GetComponent<input_box_pop_up_window>().updateUI(boxTypes, "注册");//测试输入框回调处理
gameObjects[4].GetComponent<input_box_pop_up_window_item>().register_click(
async (BoxType boxType, int type) => //注册确定或取消
{
if (type == 0) //返回登录
{
login_in_screen();
gameObject.GetComponent<input_box_pop_up_window>().destroy();
}
else if (type == 1) //确认注册并登录并进行实名认证
{
Real_name_screen();
gameObject.GetComponent<input_box_pop_up_window>().destroy();
}
});
}
public void login_Password_screen() //密码登录界面
{ {
List<BoxType> boxTypes = new List<BoxType>(); List<BoxType> boxTypes = new List<BoxType>();
boxTypes.Add(new BoxType { Name = "account_number", textName = " 手机号", prompt = "请输入手机号", Type = 1, is_required = true }); boxTypes.Add(new BoxType { Name = "account_number", textName = " 手机号", prompt = "请输入手机号", Type = 0, is_required = true });
boxTypes.Add(new BoxType { Name = "verification_code", textName = " 验证码", prompt = "请输入验证码", Type = 0, is_required = true }); boxTypes.Add(new BoxType { Name = "verification_code", textName = " 密码", prompt = "密码", Type = 0,is_required = true });
boxTypes.Add(new BoxType { Name = "submit", textName = " 取消确定 ", Type = 5 }); boxTypes.Add(new BoxType { Name = "submit", textName = " 取消确定 ",prompt = "取消",Type = 5 });
GameObject gameObject = add_pop_up(true); //生成弹窗母体
List<GameObject> gameObjects = gameObject.GetComponent<input_box_pop_up_window>().updateUI(boxTypes, "登录"); //测试输入框回调处理
gameObjects[2].GetComponent<input_box_pop_up_window_item>().register_click(async (BoxType boxType, int type) =>//登录确定或取消
{
if (type == 0)
{
login_in_screen();
gameObject.GetComponent<input_box_pop_up_window>().destroy();
}
else if (type == 1)
{
//这里调用登录方法
}
});
}
public void login_in_screen()//验证码登录界面
{
List<BoxType> boxTypes = new List<BoxType>();
boxTypes.Add(new BoxType { Name = "account_number", textName = " 手机号", prompt = "请输入手机号", Type = 0, is_required = true });
boxTypes.Add(new BoxType { Name = "verification_code", textName = " 验证码", prompt = "请输入验证码", Type = 1,nametext2 = "发送",is_required = true });
boxTypes.Add(new BoxType { Name = "sumbit", prompt = "密码登录", Type = 11,is_required = true });
boxTypes.Add(new BoxType { Name = "submit", textName = " 取消确定 ",prompt = "取消", Type = 5 });
GameObject gameObject = add_pop_up(true);//生成弹窗母体 GameObject gameObject = add_pop_up(true);//生成弹窗母体
List<GameObject> gameObjects = gameObject.GetComponent<input_box_pop_up_window>().updateUI(boxTypes, "登录");//测试输入框回调处理 List<GameObject> gameObjects = gameObject.GetComponent<input_box_pop_up_window>().updateUI(boxTypes, "登录");//测试输入框回调处理
@ -103,16 +157,31 @@ public class Logo_in : mount
// } // }
// Debug.Log("获取验证码"); // Debug.Log("获取验证码");
//}); //});
gameObjects[1].GetComponent<input_box_pop_up_window_item>().register_click(async (BoxType boxType, int type) =>//登录确定或取消
{
if (type == 0)
{
//这里调用发送验证码的接口
Debug.Log("发送验证码");
}
});
gameObjects[2].GetComponent<input_box_pop_up_window_item>().register_click(async (BoxType boxType, int type) =>//登录确定或取消 gameObjects[2].GetComponent<input_box_pop_up_window_item>().register_click(async (BoxType boxType, int type) =>//登录确定或取消
{
if (type == 1)
{
login_Password_screen();
gameObject.GetComponent<input_box_pop_up_window>().destroy();
}
});
gameObjects[3].GetComponent<input_box_pop_up_window_item>().register_click(async (BoxType boxType, int type) =>//登录确定或取消
{ {
if (type == 0)//注册 if (type == 0)//注册
{ {
//Login login = new Login();
//login.Phone = boxTypes[0].content; Register_screen();
////register.Code = boxTypes[0].content; gameObject.GetComponent<input_box_pop_up_window>().destroy();
//string jsonString = JsonUtility.ToJson(login);
//string response = await web.SendRequest(web.URL+"/Player/Register", "POST", jsonString);
//Debug.Log(response);
} }
else if (type == 1)//登录 else if (type == 1)//登录
{ {
@ -140,10 +209,10 @@ public class Logo_in : mount
// Promptmgr.Instance.PromptBubble("登录失败,请先注册"); // Promptmgr.Instance.PromptBubble("登录失败,请先注册");
//} //}
gameObject.SetActive(false);
Promptmgr.Instance.PromptBubble("登录成功");
sceneslider.gameObject.SetActive(true);
gameObject.SetActive(false);
Promptmgr.Instance.PromptBubble("登录成功");
sceneslider.gameObject.SetActive(true);
StartCoroutine(jiaLoading()); StartCoroutine(jiaLoading());
} }