diff --git a/xiaofang/Assets/ProtoBuf/test.cs b/xiaofang/Assets/ProtoBuf/test.cs index e4eb3263..facaacba 100644 --- a/xiaofang/Assets/ProtoBuf/test.cs +++ b/xiaofang/Assets/ProtoBuf/test.cs @@ -36,11 +36,11 @@ public class test : MonoBehaviour //} //登录 - public void lodingWebSocket() + public void lodingWebSocket(string str) { LoginRequest data = new LoginRequest(); data.UserId = GlobalData.ServerData.data.userId ; - data.Account = GlobalData.ServerData.data.openId; + data.Account = str; WSMessage msg = new WSMessage(); msg.Module = "hall"; diff --git a/xiaofang/Assets/Script/loginScripts/LoginPanel.cs b/xiaofang/Assets/Script/loginScripts/LoginPanel.cs index d1c0a7a1..4199d7c2 100644 --- a/xiaofang/Assets/Script/loginScripts/LoginPanel.cs +++ b/xiaofang/Assets/Script/loginScripts/LoginPanel.cs @@ -45,7 +45,7 @@ public class LoginPanel : Base grantType = "password", clientId = "e5cd7e4891bf95d1d19206ce24a7b32e", userType = "company_user", - username = id.text,//"ZF16c788632",13699802230,13051628292 + username = v,//"ZF16c788632",13699802230,13051628292 password = pwd.text//"YYL5371!" }; image.gameObject.SetActive (true); @@ -59,7 +59,7 @@ public class LoginPanel : Base // 将登录响应数据保存到静态变量中 GlobalData.ServerData = serverData; - //test.lodingWebSocket(); + test.lodingWebSocket(id.text); // 打印 access_token Debug.Log(serverData.data.access_token);