43 lines
1.0 KiB
C#
43 lines
1.0 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class TradeUnion : MonoBehaviour
|
|
{
|
|
public GameObject gonghuiPrefab;
|
|
public Transform content;
|
|
public int count;
|
|
public List<UnionDataInPage> dataList = new List<UnionDataInPage>();
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
ReadData();
|
|
|
|
}
|
|
|
|
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;
|
|
//ÕâÀﶯ̬¹ÒÔع«»á½Å±¾
|
|
}
|
|
|
|
}
|
|
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|