账号登录界面显示问题修改
This commit is contained in:
parent
f47ad2fe2e
commit
ba4fa596c4
@ -18,12 +18,13 @@ public class Drill : MonoBehaviour
|
|||||||
|
|
||||||
// 记录上一次的 isadministrator 状态,用于减少重复执行逻辑
|
// 记录上一次的 isadministrator 状态,用于减少重复执行逻辑
|
||||||
private bool lastIsAdministratorState;
|
private bool lastIsAdministratorState;
|
||||||
|
public getPlayerList userInfo;
|
||||||
|
private string nickname;
|
||||||
|
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
ScheduledBtn = transform.Find("down/ScheduledBtn").GetComponent<Button>();
|
ScheduledBtn = transform.Find("down/ScheduledBtn").GetComponent<Button>();
|
||||||
ScheduledBtn.gameObject.SetActive(false); // 初始隐藏按钮
|
ScheduledBtn.gameObject.SetActive(false); // 初始隐藏按钮
|
||||||
|
|
||||||
@ -31,14 +32,26 @@ public class Drill : MonoBehaviour
|
|||||||
noRoomText.gameObject.SetActive(false); // 初始隐藏文本
|
noRoomText.gameObject.SetActive(false); // 初始隐藏文本
|
||||||
|
|
||||||
content = transform.Find("Mid/Scroll View/Viewport/Content");
|
content = transform.Find("Mid/Scroll View/Viewport/Content");
|
||||||
if(GlobalData.ServerData.data.isCreater=="Y")
|
GetObjectList(GlobalData.ServerData.data.userId);
|
||||||
{
|
companyName.text = "ËùÊô»ú¹¹£º" + GlobalData.ServerData.data.companyName +"";
|
||||||
username.text = $"[{GlobalData.ServerData.data.userId}](管理员)";
|
|
||||||
}
|
|
||||||
else username.text = $"[{GlobalData.ServerData.data.userId}]";
|
|
||||||
companyName.text = "所属机构:[" + GlobalData.ServerData.data.companyName +"]";
|
|
||||||
}
|
}
|
||||||
|
public async void GetObjectList(string id)
|
||||||
|
{
|
||||||
|
PlayerListResponse playerListResponse = await userInfo.GetPlayerList();
|
||||||
|
foreach (var VARIABLE in playerListResponse.data)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (id == VARIABLE.UserId)
|
||||||
|
{
|
||||||
|
nickname = VARIABLE.NickName;
|
||||||
|
if (GlobalData.ServerData.data.isCreater == "Y")
|
||||||
|
{
|
||||||
|
username.text = $"{nickname}£¨¹ÜÀíÔ±£©";
|
||||||
|
}
|
||||||
|
else username.text = $"{nickname}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ public class ReadRoom : MonoBehaviour
|
|||||||
public loginData playerdetail;
|
public loginData playerdetail;
|
||||||
public test test;
|
public test test;
|
||||||
public string ID;
|
public string ID;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
@ -40,6 +41,9 @@ public class ReadRoom : MonoBehaviour
|
|||||||
// 取消订阅事件
|
// 取消订阅事件
|
||||||
Starthost.OnBoolStart -= HandleRoomControl;
|
Starthost.OnBoolStart -= HandleRoomControl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public async void adHead()
|
public async void adHead()
|
||||||
{
|
{
|
||||||
var response = await gameRoomListInstance.getGameRoomList();
|
var response = await gameRoomListInstance.getGameRoomList();
|
||||||
|
@ -89,7 +89,7 @@ public class RoomManager : MonoBehaviour
|
|||||||
}
|
}
|
||||||
// 添加 RoomDataHolder 脚本并存储数据
|
// 添加 RoomDataHolder 脚本并存储数据
|
||||||
Status dataHolder = roomItem.GetComponent<Status>();
|
Status dataHolder = roomItem.GetComponent<Status>();
|
||||||
dataHolder.text.text = $"{js.SetUIText(room.SceneId)} {js.SetUIText(room.SubjectId)}";
|
dataHolder.text.text = $"{js.SetUIText(js.GetSceneById(int.Parse(room.SceneId)).Name)} {js.SetUIText(room.SubjectId)}";
|
||||||
Debug.Log(js.SetUIText(room.SceneId));
|
Debug.Log(js.SetUIText(room.SceneId));
|
||||||
Debug.Log(dataHolder.text.text);
|
Debug.Log(dataHolder.text.text);
|
||||||
dataHolder.SetRoomData(room.RoomId, room.SceneId, room.SubjectId, room.TemplateId, room.Status, room.ReserveDate);
|
dataHolder.SetRoomData(room.RoomId, room.SceneId, room.SubjectId, room.TemplateId, room.Status, room.ReserveDate);
|
||||||
|
@ -27549,8 +27549,8 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 44720823678ca7c42a08f4409ab025ff, type: 3}
|
m_Script: {fileID: 11500000, guid: 44720823678ca7c42a08f4409ab025ff, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
serverIP: ws://192.168.3.110
|
serverIP: ws://222.212.9.114
|
||||||
serverPort: 8445
|
serverPort: 45487
|
||||||
type:
|
type:
|
||||||
--- !u!114 &1526740606
|
--- !u!114 &1526740606
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
@ -870,6 +870,7 @@ MonoBehaviour:
|
|||||||
RoleId: 0
|
RoleId: 0
|
||||||
roomid:
|
roomid:
|
||||||
test: {fileID: 7695717545649794846}
|
test: {fileID: 7695717545649794846}
|
||||||
|
ID:
|
||||||
--- !u!114 &252707977
|
--- !u!114 &252707977
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -4894,8 +4895,8 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 44720823678ca7c42a08f4409ab025ff, type: 3}
|
m_Script: {fileID: 11500000, guid: 44720823678ca7c42a08f4409ab025ff, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
serverIP: ws://192.168.3.110
|
serverIP: ws://222.212.9.114
|
||||||
serverPort: 8445
|
serverPort: 45487
|
||||||
type:
|
type:
|
||||||
--- !u!114 &7695717545649794846
|
--- !u!114 &7695717545649794846
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
@ -1026,6 +1026,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
username: {fileID: 1776157176}
|
username: {fileID: 1776157176}
|
||||||
companyName: {fileID: 2086101897}
|
companyName: {fileID: 2086101897}
|
||||||
|
userInfo: {fileID: 3977981761658744022}
|
||||||
--- !u!1 &423928793
|
--- !u!1 &423928793
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -7051,6 +7052,7 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 3977981761658744020}
|
- component: {fileID: 3977981761658744020}
|
||||||
- component: {fileID: 3977981761658744021}
|
- component: {fileID: 3977981761658744021}
|
||||||
|
- component: {fileID: 3977981761658744022}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: JSON
|
m_Name: JSON
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -7097,6 +7099,18 @@ MonoBehaviour:
|
|||||||
TaskJsonFile: {fileID: 4900000, guid: 4dec25769ed4ed3469693b1c881248af, type: 3}
|
TaskJsonFile: {fileID: 4900000, guid: 4dec25769ed4ed3469693b1c881248af, type: 3}
|
||||||
GlobalJsonFile: {fileID: 4900000, guid: 27ecc4e37cb448e45a2611c086cdfb90, type: 3}
|
GlobalJsonFile: {fileID: 4900000, guid: 27ecc4e37cb448e45a2611c086cdfb90, type: 3}
|
||||||
SelectsJsonFile: {fileID: 4900000, guid: 3efd15f4195557144a45659d2baa1ba3, type: 3}
|
SelectsJsonFile: {fileID: 4900000, guid: 3efd15f4195557144a45659d2baa1ba3, type: 3}
|
||||||
|
--- !u!114 &3977981761658744022
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3977981761658744018}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4571963e0ee11474b9f600297378bc02, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
--- !u!1 &4424113164951678449
|
--- !u!1 &4424113164951678449
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
Loading…
Reference in New Issue
Block a user