_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/lianghaoLL/ShimingPanel.cs
2024-12-12 14:34:59 +08:00

68 lines
2.1 KiB
C#

using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ShimingPanel : Base
{
public Text phonenumber;
public Button changePdBtn;
public Button Deregister_accountBtn;
public Button User_AgreementBtn;
public Button Privacy_PolicyBtn;
public Button checkBtn;
public UserInfomation14 userInfomation14;
// Start is called before the first frame update
async void Start()
{
Dictionary<string, string> head14 = new Dictionary<string, string>
{
{ "Authorization", Global.global.serverResponse.data.token }
};
// 异步查询玩家信息
string response14 = await web.SendRequest(web.URL + "/snail/user/queryUserInfo", "POST", "{}", head14);
Debug.Log("1.4查询玩家信息" + response14);
userInfomation14 = JsonConvert.DeserializeObject<UserInfomation14>(response14);
phonenumber.text = ""+userInfomation14.data.userName;
changePdBtn.onClick.AddListener(ChangeClick);
Deregister_accountBtn.onClick.AddListener(Deregisterclick);
User_AgreementBtn.onClick.AddListener(User_AgreementClick);
Privacy_PolicyBtn.onClick.AddListener(PrivacyClick);
checkBtn.onClick.AddListener(CheckClick);
}
void ChangeClick()
{
GameObject change = (GameObject)Instantiate(Resources.Load("LLPrefabs/Change_Password"),this.transform.parent);
change.GetComponent<Change_Password>().shimingPanel = this;
}
void Deregisterclick()
{
GameObject cancel = (GameObject)Instantiate(Resources.Load("LLPrefabs/Cancelaccount"), this.transform.parent);
}
void User_AgreementClick()
{
GameObject agree = (GameObject)Instantiate(Resources.Load("LLPrefabs/UserAgreeMent"), this.transform.parent);
}
void PrivacyClick()
{
GameObject agree = (GameObject)Instantiate(Resources.Load("LLPrefabs/PrivacyPolicy"), this.transform.parent);
}
void CheckClick()
{
}
// Update is called once per frame
void Update()
{
}
}