2024-11-26 00:40:56 +08:00
|
|
|
|
using Newtonsoft.Json;
|
2024-11-26 21:49:37 +08:00
|
|
|
|
using System;
|
2024-11-25 20:50:33 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
2024-11-26 00:40:56 +08:00
|
|
|
|
using System.Threading.Tasks;
|
2024-11-25 20:50:33 +08:00
|
|
|
|
using UnityEngine;
|
2024-11-25 22:18:57 +08:00
|
|
|
|
using UnityEngine.UI;
|
2024-11-25 20:50:33 +08:00
|
|
|
|
|
|
|
|
|
public class PerSonalCenterPanel : MonoBehaviour
|
|
|
|
|
{
|
2024-11-25 22:18:57 +08:00
|
|
|
|
public Button invitefriendsBtn;
|
|
|
|
|
public GameObject invitefriendsPanel;
|
|
|
|
|
public GameObject editPanel;
|
2024-11-26 00:40:56 +08:00
|
|
|
|
public UserInfomation14 userInfomation14;
|
|
|
|
|
public Text nickName;
|
2024-11-26 21:49:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//UI<55><EFBFBD><DFBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
public Transform trans;
|
|
|
|
|
public Button editBtn;//<2F>༭<EFBFBD><E0BCAD>ť
|
|
|
|
|
public Button myorderBtn;//<2F>ҵĶ<D2B5><C4B6><EFBFBD>
|
|
|
|
|
public Button realnameBtn;//ʵ<><CAB5><EFBFBD><EFBFBD>֤
|
|
|
|
|
public Button receivingaddressBtn;//<2F>ջ<EFBFBD><D5BB><EFBFBD>ַ
|
|
|
|
|
public Button conversionBtn;//ת<><D7AA>
|
|
|
|
|
public Button transformationBtn;//ת<><D7AA>
|
|
|
|
|
public Button exchangeBtn;//<2F>һ<EFBFBD>
|
|
|
|
|
public Button accountsecurityBtn;//<2F>˺Ű<CBBA>ȫ
|
2024-11-27 22:38:52 +08:00
|
|
|
|
//public Button customerserviceBtn;//<2F>ͻ<EFBFBD>
|
2024-11-26 21:49:37 +08:00
|
|
|
|
|
2024-11-26 23:14:11 +08:00
|
|
|
|
//Ԥ<><D4A4><EFBFBD><EFBFBD>
|
|
|
|
|
public GameObject editPrefabs;//<2F>༭<EFBFBD><E0BCAD><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD>
|
|
|
|
|
public GameObject myorderPrefabs;//<2F>ҵĶ<D2B5><C4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD>
|
|
|
|
|
public GameObject realnamePrefabs;//ʵ<><CAB5><EFBFBD><EFBFBD>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD>
|
|
|
|
|
public GameObject receivingaddressPrefabs;//<2F>ջ<EFBFBD><D5BB><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD>
|
|
|
|
|
public GameObject conversionPrefabs;//ת<><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD>
|
|
|
|
|
public GameObject transformationPrefabs;//ת<><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD>
|
|
|
|
|
public GameObject exchangePrefabs;//<2F>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD>
|
|
|
|
|
public GameObject accountsecurityPrefabs;//<2F>˺Ű<CBBA>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD>
|
2024-11-27 22:38:52 +08:00
|
|
|
|
//public GameObject customerservicePrefabs;//<2F>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD>
|
2024-11-26 23:14:11 +08:00
|
|
|
|
|
2024-11-26 21:49:37 +08:00
|
|
|
|
|
2024-11-25 20:50:33 +08:00
|
|
|
|
// Start is called before the first frame update
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
2024-11-26 00:40:56 +08:00
|
|
|
|
GetPlayerInfo();
|
2024-11-26 21:49:37 +08:00
|
|
|
|
|
|
|
|
|
editBtn.onClick.AddListener(EditBtn);
|
2024-11-26 23:14:11 +08:00
|
|
|
|
myorderBtn.onClick.AddListener(MyorderBtn);
|
|
|
|
|
realnameBtn.onClick.AddListener(RealnameBtn);
|
|
|
|
|
receivingaddressBtn.onClick.AddListener(ReceivingaddressBtn);
|
|
|
|
|
conversionBtn.onClick.AddListener(ConversionBtn);
|
|
|
|
|
transformationBtn.onClick.AddListener(TransformationBtn);
|
|
|
|
|
exchangeBtn.onClick.AddListener(ExchangeBtn);
|
|
|
|
|
accountsecurityBtn.onClick.AddListener(AccountsecurityBtn);
|
2024-11-27 22:38:52 +08:00
|
|
|
|
//customerserviceBtn.onClick.AddListener(CustomerserviceBtn);
|
2024-11-26 23:14:11 +08:00
|
|
|
|
|
2024-11-26 21:49:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void EditBtn()
|
2024-11-26 23:14:11 +08:00
|
|
|
|
{
|
|
|
|
|
GameObject.Instantiate(editPrefabs, trans);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void MyorderBtn()
|
|
|
|
|
{
|
2024-11-27 22:38:52 +08:00
|
|
|
|
GameObject.Instantiate(myorderPrefabs, trans);
|
2024-11-26 23:14:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void RealnameBtn()
|
|
|
|
|
{
|
2024-11-27 22:38:52 +08:00
|
|
|
|
GameObject.Instantiate(realnamePrefabs, trans);
|
2024-11-26 23:14:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ReceivingaddressBtn()
|
|
|
|
|
{
|
2024-11-27 22:38:52 +08:00
|
|
|
|
GameObject.Instantiate(receivingaddressPrefabs, trans);
|
2024-11-26 23:14:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ConversionBtn()
|
|
|
|
|
{
|
2024-11-27 22:38:52 +08:00
|
|
|
|
GameObject.Instantiate(conversionPrefabs, trans);
|
2024-11-26 23:14:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void TransformationBtn()
|
|
|
|
|
{
|
2024-11-27 22:38:52 +08:00
|
|
|
|
GameObject.Instantiate(transformationPrefabs, trans);
|
2024-11-26 23:14:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ExchangeBtn()
|
|
|
|
|
{
|
2024-11-27 22:38:52 +08:00
|
|
|
|
GameObject.Instantiate(exchangePrefabs, trans);
|
2024-11-26 23:14:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void AccountsecurityBtn()
|
|
|
|
|
{
|
2024-11-27 22:38:52 +08:00
|
|
|
|
GameObject.Instantiate(accountsecurityPrefabs, trans);
|
2024-11-25 20:50:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-27 22:38:52 +08:00
|
|
|
|
|
|
|
|
|
|
2024-11-25 20:50:33 +08:00
|
|
|
|
// Update is called once per frame
|
|
|
|
|
void Update()
|
|
|
|
|
{
|
2024-11-27 22:38:52 +08:00
|
|
|
|
|
2024-11-26 00:40:56 +08:00
|
|
|
|
}
|
2024-11-26 23:14:11 +08:00
|
|
|
|
|
2024-11-26 00:40:56 +08:00
|
|
|
|
void SetPlayerName()
|
|
|
|
|
{
|
2024-11-27 22:38:52 +08:00
|
|
|
|
|
2024-11-25 20:50:33 +08:00
|
|
|
|
}
|
2024-11-26 23:14:11 +08:00
|
|
|
|
|
2024-11-25 22:18:57 +08:00
|
|
|
|
public void SetInviteFriendsPanel()
|
|
|
|
|
{
|
|
|
|
|
invitefriendsPanel.gameObject.SetActive(true);
|
|
|
|
|
transform.gameObject.SetActive(false);
|
|
|
|
|
}
|
2024-11-26 23:14:11 +08:00
|
|
|
|
|
2024-11-25 22:18:57 +08:00
|
|
|
|
public void SetEditPanel()
|
|
|
|
|
{
|
|
|
|
|
editPanel.gameObject.SetActive(true);
|
|
|
|
|
}
|
2024-11-26 23:14:11 +08:00
|
|
|
|
|
2024-11-25 22:18:57 +08:00
|
|
|
|
public void SetPerSonalCenterPanel()
|
|
|
|
|
{
|
|
|
|
|
transform.gameObject.SetActive(false);
|
|
|
|
|
}
|
2024-11-26 23:14:11 +08:00
|
|
|
|
|
2024-11-27 22:38:52 +08:00
|
|
|
|
|
|
|
|
|
|
2024-11-26 23:14:11 +08:00
|
|
|
|
|
2024-11-26 21:49:37 +08:00
|
|
|
|
public async void GetPlayerInfo() // 1.4
|
2024-11-26 00:40:56 +08:00
|
|
|
|
{
|
|
|
|
|
// <><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>
|
|
|
|
|
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);
|
|
|
|
|
Debug.Log("<22><><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD>" + userInfomation14.data.beansCoin);
|
|
|
|
|
//Money = userInfomation14.beansCoin;
|
|
|
|
|
Debug.Log("&&&&&&&&&&&&&&&&&&&&7" + userInfomation14.data.nickName);
|
|
|
|
|
nickName.text = userInfomation14.data.nickName;
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
Global.global.response = JsonConvert.DeserializeObject<ServerResponse>(response14);
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD>ʾ<EFBFBD>첽<EFBFBD><ECB2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2024-11-26 21:49:37 +08:00
|
|
|
|
//await Task.CompletedTask; // <20><><EFBFBD><EFBFBD>ֱ<EFBFBD>ӷ<EFBFBD><D3B7>أ<EFBFBD><D8A3><EFBFBD>ʹ<EFBFBD><CAB9> await
|
2024-11-26 00:40:56 +08:00
|
|
|
|
}
|
2024-11-25 20:50:33 +08:00
|
|
|
|
}
|