修改bug

This commit is contained in:
CaiYanPeng 2022-02-11 13:46:38 +08:00
parent c12df53c18
commit 17aee7a740

View File

@ -16,6 +16,7 @@ public class UserInfoController : PFUIPanel
{ {
this.transform.localPosition = new Vector3(0, 0, 0); this.transform.localPosition = new Vector3(0, 0, 0);
Button exitBtn = this.transform.Find("InfoPanel").Find("Button").GetComponent<Button>(); Button exitBtn = this.transform.Find("InfoPanel").Find("Button").GetComponent<Button>();
#if UNITY_ANDROID || UNITY_IOS
UIManager.AddEvent(transform.Find("InfoButton").gameObject, EventTriggerType.PointerClick, b => UIManager.AddEvent(transform.Find("InfoButton").gameObject, EventTriggerType.PointerClick, b =>
{ {
UIManager.ShowAppleInfoModal(() => UIManager.ShowAppleInfoModal(() =>
@ -23,6 +24,7 @@ public class UserInfoController : PFUIPanel
Load(); Load();
}); });
}); });
#endif
UIManager.AddEvent(exitBtn.gameObject, EventTriggerType.PointerClick, (b) => UIManager.AddEvent(exitBtn.gameObject, EventTriggerType.PointerClick, (b) =>
{ {
UIManager.ShowPrePanel(); UIManager.ShowPrePanel();
@ -105,9 +107,12 @@ public class UserInfoController : PFUIPanel
var summary = r.data; var summary = r.data;
var user = App.CurrentUser; var user = App.CurrentUser;
Debug.Log(user.CanCreateRace); Debug.Log(user.CanCreateRace);
if(infoPanel == null) infoPanel = transform.Find("InfoPanel").Find("P");
if(summaryPanel == null) summaryPanel = transform.Find("SummaryPanel");
Utils.DisplayHead(infoPanel.Find("Avatar").GetComponent<RawImage>(), user.WxHeadImg); Utils.DisplayHead(infoPanel.Find("Avatar").GetComponent<RawImage>(), user.WxHeadImg);
#if UNITY_ANDROID || UNITY_IOS
transform.Find("InfoButton").gameObject.SetActive(string.IsNullOrEmpty(user.Phone)); transform.Find("InfoButton").gameObject.SetActive(string.IsNullOrEmpty(user.Phone));
#endif
infoPanel.Find("Status").Find("Country").GetComponent<RawImage>().texture infoPanel.Find("Status").Find("Country").GetComponent<RawImage>().texture
= UIManager.Instance.loginRegOptions.GetCountryImageByName(user.Country); = UIManager.Instance.loginRegOptions.GetCountryImageByName(user.Country);
//infoPanel.Find("Status").Find("Wx").gameObject.SetActive( //infoPanel.Find("Status").Find("Wx").gameObject.SetActive(