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