_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/lianghaoLL/ShimingPanel.cs

68 lines
2.1 KiB
C#
Raw Normal View History

2024-12-10 12:01:29 +08:00
using Newtonsoft.Json;
2024-11-27 16:15:31 +08:00
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;
2024-12-10 12:01:29 +08:00
public UserInfomation14 userInfomation14;
2024-11-27 16:15:31 +08:00
// Start is called before the first frame update
2024-12-10 12:01:29 +08:00
async void Start()
2024-11-27 16:15:31 +08:00
{
2024-12-10 12:01:29 +08:00
Dictionary<string, string> head14 = new Dictionary<string, string>
{
{ "Authorization", Global.global.serverResponse.data.token }
};
// <20><EFBFBD><ECB2BD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
string response14 = await web.SendRequest(web.URL + "/snail/user/queryUserInfo", "POST", "{}", head14);
Debug.Log("1.4<EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ" + response14);
userInfomation14 = JsonConvert.DeserializeObject<UserInfomation14>(response14);
phonenumber.text = ""+userInfomation14.data.userName;
2024-11-27 16:15:31 +08:00
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()
2024-12-10 00:51:37 +08:00
{
GameObject cancel = (GameObject)Instantiate(Resources.Load("LLPrefabs/Cancelaccount"), this.transform.parent);
2024-11-27 16:15:31 +08:00
}
void User_AgreementClick()
2024-12-12 14:34:59 +08:00
{
GameObject agree = (GameObject)Instantiate(Resources.Load("LLPrefabs/UserAgreeMent"), this.transform.parent);
2024-11-27 16:15:31 +08:00
}
void PrivacyClick()
2024-12-12 14:34:59 +08:00
{
GameObject agree = (GameObject)Instantiate(Resources.Load("LLPrefabs/PrivacyPolicy"), this.transform.parent);
2024-11-27 16:15:31 +08:00
}
void CheckClick()
{
}
// Update is called once per frame
void Update()
{
}
}