TestHttpMessage.cs 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. using Studio.Scripts.HttpMessage;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using TMPro;
  5. using UnityEngine;
  6. using UnityEngine.UI;
  7. using XRTool.Util;
  8. namespace Studio.Scripts
  9. {
  10. public class TestHttpMessage : MonoBehaviour
  11. {
  12. public TextMeshProUGUI aa;
  13. public Image bb;
  14. public int rectX;
  15. public int rectY;
  16. public Vector2 min;
  17. public Vector2 max;
  18. RectTransform r;
  19. Vector2 sizeDelta;
  20. Rect rect;
  21. // Start is called before the first frame update
  22. void Start()
  23. {
  24. // BuildConfigMgr buildConfigMgr = new BuildConfigMgr();
  25. //Debug.LogError(string.Format(LanguageMgr.Instance.GetMessage("1026").Message, 20));
  26. }
  27. // Update is called once per frame
  28. void Update()
  29. {
  30. #region 公共分类
  31. if (Input.GetKeyDown(KeyCode.F1))
  32. {
  33. NetWorkHeaders.Instance.CaptchaVerificationCode();
  34. }
  35. if (Input.GetKeyDown(KeyCode.F2))
  36. {
  37. NetWorkHeaders.Instance.PhoneVerificationCode("18317198446", HttpMessage.PhoneSMSCodeType.Register);
  38. }
  39. if (Input.GetKeyDown(KeyCode.F3))
  40. {
  41. NetWorkHeaders.Instance.PhoneVerificationCode("18317198446", HttpMessage.PhoneSMSCodeType.Login);
  42. }
  43. if (Input.GetKeyDown(KeyCode.F4))
  44. {
  45. NetWorkHeaders.Instance.PhoneVerificationCode("18317198446", HttpMessage.PhoneSMSCodeType.RetrievePassword);
  46. }
  47. if (Input.GetKeyDown(KeyCode.F5))
  48. {
  49. NetWorkHeaders.Instance.PhoneVerificationCode("18317198446", HttpMessage.PhoneSMSCodeType.ChangePassword);
  50. }
  51. if (Input.GetKeyDown(KeyCode.F6))
  52. {
  53. NetWorkHeaders.Instance.PhoneVerificationCode("18317198446", HttpMessage.PhoneSMSCodeType.ChangePhone);
  54. }
  55. if (Input.GetKeyDown(KeyCode.F7))
  56. {
  57. NetWorkHeaders.Instance.PhoneVerificationCode("18317198446", HttpMessage.PhoneSMSCodeType.Reserve);
  58. }
  59. #endregion
  60. //15821993590 123qweqwe
  61. #region 账户登录
  62. if (Input.GetKeyDown(KeyCode.Alpha1))
  63. {
  64. NetWorkHeaders.Instance.SNLogin();
  65. }
  66. if (Input.GetKeyDown(KeyCode.Alpha2))
  67. {
  68. NetWorkHeaders.Instance.PhoneNumLogin("17521596802", "861231");
  69. }
  70. if (Input.GetKeyDown(KeyCode.Alpha3))
  71. {
  72. //NetWorkHeaders.Instance.AccountLogin("17521596802", "123qweqwe");
  73. }
  74. if (Input.GetKeyDown(KeyCode.Alpha4))
  75. {
  76. NetWorkHeaders.Instance.AdvanceAccount("17521596802", "123qweqwe1");
  77. }
  78. if (Input.GetKeyDown(KeyCode.Alpha5))
  79. {
  80. // NetWorkHeaders.Instance.LogOut();
  81. }
  82. if (Input.GetKeyDown(KeyCode.Alpha6))
  83. {
  84. NetWorkHeaders.Instance.ModifyRole("262773181c66240b1529c3e2ebe076b1", "aa", "bb");
  85. }
  86. if (Input.GetKeyDown(KeyCode.Alpha7))
  87. {
  88. NetWorkHeaders.Instance.GetUserAvatar("923b47fabd6e06ae7bdeb0ede857e4ad");
  89. }
  90. if (Input.GetKeyDown(KeyCode.Alpha8))
  91. {
  92. // string a = "{\\\"code\\\":200,\\\"message\\\":\\\"请求成功\\\",\\\"data\\\":{\\\"avatar\\\":[{\\\"id\\\":1,\\\"url\\\":\\\"https://resources.shadowcreator.com/studio/avatar/1.png\\\"},{\\\"id\\\":2,\\\"url\\\":\\\"https://resources.shadowcreator.com/studio/avatar/2.png\\\"},{\\\"id\\\":3,\\\"url\\\":\\\"https://resources.shadowcreator.com/studio/avatar/3.png\\\"},{\\\"id\\\":4,\\\"url\\\":\\\"https://resources.shadowcreator.com/studio/avatar/4.png\\\"},{\\\"id\\\":5,\\\"url\\\":\\\"https://resources.shadowcreator.com/studio/avatar/5.png\\\"},{\\\"id\\\":6,\\\"url\\\":\\\"https://resources.shadowcreator.com/studio/avatar/6.png\\\"}]}}";
  93. // GetAvatarListCallBackMessage callBackMessage = JsonUtility.FromJson<GetAvatarListCallBackMessage>(a);
  94. // Debug.LogError(callBackMessage.data.avatar[0].id);
  95. }
  96. #endregion
  97. #region 房间管理
  98. if (Input.GetKeyDown(KeyCode.Q))
  99. {
  100. //NetWorkHeaders.Instance.CreateRoom(1);
  101. }
  102. if (Input.GetKeyDown(KeyCode.W))
  103. {
  104. //NetWorkHeaders.Instance.DeleteRoom(12345);
  105. }
  106. if (Input.GetKeyDown(KeyCode.E))
  107. {
  108. NetWorkHeaders.Instance.JoinedRoom(12345);
  109. }
  110. if (Input.GetKeyDown(KeyCode.R))
  111. {
  112. NetWorkHeaders.Instance.GetRoomList();
  113. }
  114. if (Input.GetKeyDown(KeyCode.T))
  115. {
  116. NetWorkHeaders.Instance.UpdateRoom(12345, 1);
  117. }
  118. if (Input.GetKeyDown(KeyCode.Y))
  119. {
  120. NetWorkHeaders.Instance.GetFileAddress("f42adb7441f8254069c9387187a7c20d");
  121. }
  122. if (Input.GetKeyDown(KeyCode.U))
  123. {
  124. // NetWorkHeaders.Instance.GetArtList("f42adb7441f8254069c9387187a7c20d", "");
  125. }
  126. if (Input.GetKeyDown(KeyCode.I))
  127. {
  128. NetWorkHeaders.Instance.GetDetailAir("f42adb7441f8254069c9387187a7c20d", "0");
  129. }
  130. #endregion
  131. #region 设置管理
  132. if (Input.GetKeyDown(KeyCode.Z))
  133. {
  134. NetWorkHeaders.Instance.UpdateSettings("62aee4f1270a377f05a815075b0f4b45", true, true, RatioType.High, FpsType.High);
  135. }
  136. if (Input.GetKeyDown(KeyCode.X))
  137. {
  138. NetWorkHeaders.Instance.GetSettings("62aee4f1270a377f05a815075b0f4b45");
  139. }
  140. #endregion
  141. if (Input.GetKeyDown(KeyCode.P))
  142. {
  143. }
  144. }
  145. }
  146. }