using Studio.Scripts.HttpMessage; using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; using XRTool.Util; namespace Studio.Scripts { public class TestHttpMessage : MonoBehaviour { public TextMeshProUGUI aa; public Image bb; public int rectX; public int rectY; public Vector2 min; public Vector2 max; RectTransform r; Vector2 sizeDelta; Rect rect; // Start is called before the first frame update void Start() { // BuildConfigMgr buildConfigMgr = new BuildConfigMgr(); //Debug.LogError(string.Format(LanguageMgr.Instance.GetMessage("1026").Message, 20)); } // Update is called once per frame void Update() { #region 公共分类 if (Input.GetKeyDown(KeyCode.F1)) { NetWorkHeaders.Instance.CaptchaVerificationCode(); } if (Input.GetKeyDown(KeyCode.F2)) { NetWorkHeaders.Instance.PhoneVerificationCode("18317198446", HttpMessage.PhoneSMSCodeType.Register); } if (Input.GetKeyDown(KeyCode.F3)) { NetWorkHeaders.Instance.PhoneVerificationCode("18317198446", HttpMessage.PhoneSMSCodeType.Login); } if (Input.GetKeyDown(KeyCode.F4)) { NetWorkHeaders.Instance.PhoneVerificationCode("18317198446", HttpMessage.PhoneSMSCodeType.RetrievePassword); } if (Input.GetKeyDown(KeyCode.F5)) { NetWorkHeaders.Instance.PhoneVerificationCode("18317198446", HttpMessage.PhoneSMSCodeType.ChangePassword); } if (Input.GetKeyDown(KeyCode.F6)) { NetWorkHeaders.Instance.PhoneVerificationCode("18317198446", HttpMessage.PhoneSMSCodeType.ChangePhone); } if (Input.GetKeyDown(KeyCode.F7)) { NetWorkHeaders.Instance.PhoneVerificationCode("18317198446", HttpMessage.PhoneSMSCodeType.Reserve); } #endregion //15821993590 123qweqwe #region 账户登录 if (Input.GetKeyDown(KeyCode.Alpha1)) { NetWorkHeaders.Instance.SNLogin(); } if (Input.GetKeyDown(KeyCode.Alpha2)) { NetWorkHeaders.Instance.PhoneNumLogin("17521596802", "861231"); } if (Input.GetKeyDown(KeyCode.Alpha3)) { //NetWorkHeaders.Instance.AccountLogin("17521596802", "123qweqwe"); } if (Input.GetKeyDown(KeyCode.Alpha4)) { NetWorkHeaders.Instance.AdvanceAccount("17521596802", "123qweqwe1"); } if (Input.GetKeyDown(KeyCode.Alpha5)) { // NetWorkHeaders.Instance.LogOut(); } if (Input.GetKeyDown(KeyCode.Alpha6)) { NetWorkHeaders.Instance.ModifyRole("262773181c66240b1529c3e2ebe076b1", "aa", "bb"); } if (Input.GetKeyDown(KeyCode.Alpha7)) { NetWorkHeaders.Instance.GetUserAvatar("923b47fabd6e06ae7bdeb0ede857e4ad"); } if (Input.GetKeyDown(KeyCode.Alpha8)) { // 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\\\"}]}}"; // GetAvatarListCallBackMessage callBackMessage = JsonUtility.FromJson(a); // Debug.LogError(callBackMessage.data.avatar[0].id); } #endregion #region 房间管理 if (Input.GetKeyDown(KeyCode.Q)) { //NetWorkHeaders.Instance.CreateRoom(1); } if (Input.GetKeyDown(KeyCode.W)) { //NetWorkHeaders.Instance.DeleteRoom(12345); } if (Input.GetKeyDown(KeyCode.E)) { NetWorkHeaders.Instance.JoinedRoom(12345); } if (Input.GetKeyDown(KeyCode.R)) { NetWorkHeaders.Instance.GetRoomList(); } if (Input.GetKeyDown(KeyCode.T)) { NetWorkHeaders.Instance.UpdateRoom(12345, 1); } if (Input.GetKeyDown(KeyCode.Y)) { NetWorkHeaders.Instance.GetFileAddress("f42adb7441f8254069c9387187a7c20d"); } if (Input.GetKeyDown(KeyCode.U)) { // NetWorkHeaders.Instance.GetArtList("f42adb7441f8254069c9387187a7c20d", ""); } if (Input.GetKeyDown(KeyCode.I)) { NetWorkHeaders.Instance.GetDetailAir("f42adb7441f8254069c9387187a7c20d", "0"); } #endregion #region 设置管理 if (Input.GetKeyDown(KeyCode.Z)) { NetWorkHeaders.Instance.UpdateSettings("62aee4f1270a377f05a815075b0f4b45", true, true, RatioType.High, FpsType.High); } if (Input.GetKeyDown(KeyCode.X)) { NetWorkHeaders.Instance.GetSettings("62aee4f1270a377f05a815075b0f4b45"); } #endregion if (Input.GetKeyDown(KeyCode.P)) { } } } }