using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class AnniyncementPanel : Base { public GameObject Content; announcementPage31 page31 = new announcementPage31(); announcementPage announcementPage = new announcementPage(); // Start is called before the first frame update void Start() { testLogo(); Init(); } async void Init() { announcementPage = await page31.announcementPage(1,20); Debug.Log(announcementPage.data.totalCount); for (int i = 0; i < announcementPage.data.totalCount; i++) { GameObject Page = (GameObject)Instantiate(Resources.Load("LLPrefabs/Announcement_newitem"), Content.transform); Page.GetComponent().neirong.text = announcementPage.data.dataList[i].title; Page.GetComponent().creatTime.text = announcementPage.data.dataList[i].createTime; } } // Update is called once per frame void Update() { } }