2024-11-26 15:50:37 +08:00
|
|
|
|
using System;
|
2024-11-25 23:54:53 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
2024-11-26 00:44:22 +08:00
|
|
|
|
using TMPro;
|
2024-11-25 23:54:53 +08:00
|
|
|
|
using UnityEngine;
|
2024-11-26 00:44:22 +08:00
|
|
|
|
using UnityEngine.UI;
|
2024-11-25 23:54:53 +08:00
|
|
|
|
|
|
|
|
|
//public class Union
|
|
|
|
|
//{
|
|
|
|
|
// public int id;
|
|
|
|
|
// public string name;
|
|
|
|
|
// public string iconName;
|
|
|
|
|
// public string counts;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
public class TradeDes : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
public int id;
|
|
|
|
|
public string name;
|
|
|
|
|
public string cover;
|
|
|
|
|
public string counts;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
public int level;
|
|
|
|
|
public string slogan;
|
|
|
|
|
public int leaderId;
|
|
|
|
|
public string leaderUserName;
|
|
|
|
|
public string createTime;
|
|
|
|
|
public string updateTime;
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2024-11-26 00:44:22 +08:00
|
|
|
|
public Button sqBtn;//<2F><><EFBFBD>밴ť
|
2024-11-26 15:50:37 +08:00
|
|
|
|
public Button panelBtn;//<2F><><EFBFBD>밴ť
|
2024-11-26 00:44:22 +08:00
|
|
|
|
public TextMeshProUGUI nameTxt;//<2F><><EFBFBD><EFBFBD>text
|
|
|
|
|
//public TextMeshPro countTxt;//<2F><><EFBFBD><EFBFBD>Text
|
2024-11-25 23:54:53 +08:00
|
|
|
|
|
2024-11-26 15:50:37 +08:00
|
|
|
|
public GameObject detailPrefab;
|
|
|
|
|
|
|
|
|
|
public Transform canvasTrans;
|
2024-11-25 23:54:53 +08:00
|
|
|
|
|
|
|
|
|
// Start is called before the first frame update
|
2024-11-26 00:44:22 +08:00
|
|
|
|
void Awake()
|
2024-11-25 23:54:53 +08:00
|
|
|
|
{
|
2024-11-26 15:50:37 +08:00
|
|
|
|
|
|
|
|
|
|
2024-11-26 00:44:22 +08:00
|
|
|
|
|
|
|
|
|
if (sqBtn == null)
|
|
|
|
|
Debug.LogError("<22><><EFBFBD>밴ťδ<C5A5>ҵ<EFBFBD><D2B5><EFBFBD>");
|
|
|
|
|
if (nameTxt == null)
|
|
|
|
|
Debug.LogError("<22><><EFBFBD><EFBFBD> TextMeshPro <20><><EFBFBD><EFBFBD>δ<EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD>");
|
2024-11-26 15:50:37 +08:00
|
|
|
|
sqBtn.onClick.AddListener(ShowDetail);
|
|
|
|
|
panelBtn.onClick.AddListener(ShowDetail);
|
2024-11-25 23:54:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-11-26 15:50:37 +08:00
|
|
|
|
|
|
|
|
|
|
2024-11-25 23:54:53 +08:00
|
|
|
|
// Update is called once per frame
|
|
|
|
|
void Update()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
2024-11-26 15:50:37 +08:00
|
|
|
|
|
|
|
|
|
public void ShowDetail()
|
|
|
|
|
{
|
|
|
|
|
GameObject.Instantiate(detailPrefab, canvasTrans);
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-25 23:54:53 +08:00
|
|
|
|
public void SetInfo(UnionDataInPage body)
|
|
|
|
|
{
|
|
|
|
|
id = body.Id;
|
|
|
|
|
name = body.Name;
|
|
|
|
|
cover = body.Cover;
|
|
|
|
|
level = body.Level;
|
|
|
|
|
slogan = body.Slogan;
|
|
|
|
|
leaderId = body.LeaderId;
|
|
|
|
|
leaderUserName = body.LeaderUserName;
|
|
|
|
|
createTime = body.CreateTime;
|
|
|
|
|
updateTime = body.UpdateTime;
|
2024-11-26 00:44:22 +08:00
|
|
|
|
nameTxt.text = name;
|
2024-11-26 15:50:37 +08:00
|
|
|
|
|
2024-11-25 23:54:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|