using System.Collections; using System.Collections.Generic; using UnityEngine; public class TradeUnion : MonoBehaviour { public GameObject gonghuiPrefab; public Transform content; public int count; public List dataList = new List(); // Start is called before the first frame update void Start() { ReadData(); //testLogo(); } public async void ReadData() { UnionPage unionPage = new UnionPage(); UnionPage16 unionPage16 = new UnionPage16(); unionPage = await unionPage16.queryUnionPage(1); Debug.Log(unionPage.Data.TotalCount); count = unionPage.Data.TotalCount; dataList = unionPage.Data.DataList; for(int i = 0; i < dataList.Count; i++) { GameObject union = GameObject.Instantiate(gonghuiPrefab, content); union.name = "union_" + i; TradeDes tradeDes = union.GetComponent(); tradeDes.SetInfo(unionPage.Data.DataList[i],transform); } } // Update is called once per frame void Update() { //testhead //string response511 = await web.SendRequest(web.URL + "/snail/gameEscape/queryLatest", "POST", body, testhead); //string response511 = await web.SendRequest(web.URL + "/snail/gameEscape/queryLatest", "POST", body, Global.global.CreateHeaders()); } }