二次登录

This commit is contained in:
huyulong 2024-12-31 01:30:45 +08:00
parent 60a25efba0
commit f1373939a8
4 changed files with 4 additions and 2 deletions

View File

@ -603,7 +603,7 @@ public class test : MonoBehaviour
wEBScriptListener.OnCallback += callback; wEBScriptListener.OnCallback += callback;
if (wEBScriptListener != null) if (wEBScriptListener != null)
{ {
//lodingWebSocket(); //lodingWebSocket(ReadRoom.instance.ID);
//JoinRoom(); //JoinRoom();
Heartbeat(); Heartbeat();
//BroadcastMessage(); //BroadcastMessage();

View File

@ -22,6 +22,7 @@ public class ReadRoom : MonoBehaviour
public string roomid; public string roomid;
public loginData playerdetail; public loginData playerdetail;
public test test; public test test;
public string ID;
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {

View File

@ -104,6 +104,7 @@ public class Starthost : MonoBehaviour
posiBtn.gameObject.SetActive(true); posiBtn.gameObject.SetActive(true);
start.gameObject.SetActive(true); start.gameObject.SetActive(true);
} }
test.lodingWebSocket(ReadRoom.instance.ID);
} }
void OnEnable() void OnEnable()
{ {

View File

@ -59,7 +59,7 @@ public class LoginPanel : Base
// 将登录响应数据保存到静态变量中 // 将登录响应数据保存到静态变量中
GlobalData.ServerData = serverData; GlobalData.ServerData = serverData;
ReadRoom.instance.ID = id.text;
test.lodingWebSocket(id.text); test.lodingWebSocket(id.text);
// 打印 access_token // 打印 access_token
Debug.Log(serverData.data.access_token); Debug.Log(serverData.data.access_token);