322
This commit is contained in:
parent
dfc3c48216
commit
963fba3cde
|
@ -52,9 +52,10 @@ public class View_Panel2 : XUIPanel
|
|||
public List<Button> buttonlist = new List<Button>();//克隆出来房间按钮
|
||||
|
||||
|
||||
|
||||
public string roomUrl = "http://111.229.30.246:48888/Handler/Practice.ashx?action=query&state=0,1,2";
|
||||
public string userUrl = "http://111.229.30.246:48888/Handler/User.ashx?action=all&role_code=04";
|
||||
|
||||
public RoomData roomdata = new RoomData();
|
||||
|
||||
public UserData userData = new UserData();
|
||||
public Dropdown roomModelDropdown;//房间模式
|
||||
public Dropdown thinkingDropdown;//选择想定
|
||||
|
@ -258,7 +259,8 @@ public class View_Panel2 : XUIPanel
|
|||
}
|
||||
public async void GetAllRoomData()
|
||||
{
|
||||
UIBootstrap.Instance. roomdata = await AsyncWebReq.Post<RoomData>(UIBootstrap.Instance.roomUrl, null);
|
||||
roomdata = await AsyncWebReq.Post<RoomData>(roomUrl, null);
|
||||
UIBootstrap.Instance.SetRoomdata(roomdata);
|
||||
if (place.childCount > 0)
|
||||
{
|
||||
for (int i = 0; i < place.childCount; i++)
|
||||
|
@ -513,11 +515,11 @@ public class View_Panel2 : XUIPanel
|
|||
|
||||
public void CreateRoom()
|
||||
{
|
||||
for (int i = 0; i < UIBootstrap.Instance.roomdata.data.Count; i++)
|
||||
for (int i = 0; i < roomdata.data.Count; i++)
|
||||
{
|
||||
if (UIBootstrap.Instance.roomdata.data[i].State != 2)
|
||||
if (roomdata.data[i].State != 2)
|
||||
{
|
||||
CreateRoomBase(UIBootstrap.Instance.roomdata.data[i].Id, UIBootstrap.Instance.roomdata.data[i].Name);
|
||||
CreateRoomBase(roomdata.data[i].Id, roomdata.data[i].Name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -16,9 +16,9 @@ public class UIBootstrap : MonoSingleton<UIBootstrap>
|
|||
public List<RSData.SubjectDataItem> subjectInfo = new List<RSData.SubjectDataItem>();
|
||||
public List<Traininginformation> traininginformations = new List<Traininginformation>();
|
||||
public AdamThinkDevicesData.DeviceData thinkDevicesData = new AdamThinkDevicesData.DeviceData();
|
||||
//public RSData.RoomSubjectData currentRoomData = new RSData.RoomSubjectData();
|
||||
public string roomUrl = "http://111.229.30.246:48888/Handler/Practice.ashx?action=query&state=0,1,2";
|
||||
public RoomData roomdata = new RoomData();
|
||||
//public RSData.RoomSubjectData currentRoomData = new RSData.RoomSubjectData();
|
||||
|
||||
// Start is called before the first frame update
|
||||
private async void Start()
|
||||
{
|
||||
|
@ -62,6 +62,10 @@ public class UIBootstrap : MonoSingleton<UIBootstrap>
|
|||
return detaIteml;
|
||||
}
|
||||
|
||||
public void SetRoomdata(RoomData _roomdata)
|
||||
{
|
||||
roomdata = _roomdata;
|
||||
}
|
||||
|
||||
public int GetRoomStateById(string Id)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue