diff --git a/meng_yao/Assets/Scenes/scene_Main.unity b/meng_yao/Assets/Scenes/scene_Main.unity index 49f9e8a13..e3f25aed9 100644 --- a/meng_yao/Assets/Scenes/scene_Main.unity +++ b/meng_yao/Assets/Scenes/scene_Main.unity @@ -13490,6 +13490,50 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 162567085} m_CullTransparentMesh: 1 +--- !u!1 &163049995 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 163049996} + - component: {fileID: 163049997} + m_Layer: 0 + m_Name: jiekou + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &163049996 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 163049995} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 767.6751, y: 583.8409, z: -6.8612137} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 16 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &163049997 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 163049995} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 768ed40e69788184b804035df928dc51, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &163450907 GameObject: m_ObjectHideFlags: 0 diff --git a/meng_yao/Assets/common b/meng_yao/Assets/common index d26686918..5dbbd278a 160000 --- a/meng_yao/Assets/common +++ b/meng_yao/Assets/common @@ -1 +1 @@ -Subproject commit d266869186aa276f68fec88b78b6e0dc15d74881 +Subproject commit 5dbbd278a665a35ea4b2a604629259eee39601f7 diff --git a/meng_yao/Assets/script/scene_Main/Scene_main_jiekou.cs b/meng_yao/Assets/script/scene_Main/Scene_main_jiekou.cs new file mode 100644 index 000000000..95fd5aff4 --- /dev/null +++ b/meng_yao/Assets/script/scene_Main/Scene_main_jiekou.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Threading.Tasks; +using UnityEngine; + +public class Scene_main_jiekou :MonoBehaviour +{ + login _Login = new login(); + public async void Start() + { + await _Login.TastLogin(); + await PlayerInfos(); + } + + + + public async Task PlayerInfos() + { + playerInfo playerInfo=new playerInfo(); + PlayerIndfo _PlayerIndfo = await playerInfo.PalyerInfo(); + return _PlayerIndfo.Data; + } +} diff --git a/meng_yao/Assets/script/scene_Main/Scene_main_jiekou.cs.meta b/meng_yao/Assets/script/scene_Main/Scene_main_jiekou.cs.meta new file mode 100644 index 000000000..d7ddc087c --- /dev/null +++ b/meng_yao/Assets/script/scene_Main/Scene_main_jiekou.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 768ed40e69788184b804035df928dc51 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/meng_yao/Assets/script/scene_loading/loading_jiekou.cs b/meng_yao/Assets/script/scene_loading/loading_jiekou.cs index a5fceb1fa..6ad8bc69b 100644 --- a/meng_yao/Assets/script/scene_loading/loading_jiekou.cs +++ b/meng_yao/Assets/script/scene_loading/loading_jiekou.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Threading.Tasks; using UnityEngine; +using UnityEngine.SocialPlatforms; public class loading_jiekou : MonoBehaviour { @@ -71,17 +72,16 @@ public class loading_jiekou : MonoBehaviour return await register.Register(registerBody); } - - - public async Task PalyerInfos() + public async Task PalyerInfos() { playerInfo = new playerInfo(); return await playerInfo.PalyerInfo(); } - public async Task Logout()//登录退出 + public async Task Logout()//登录退出 { logout = new logout(); return await logout.Logout(); } - } + +} diff --git a/meng_yao/Assets/script/serveTestScript/loginModule/login.cs b/meng_yao/Assets/script/serveTestScript/loginModule/login.cs index 2c930a211..9749455f2 100644 --- a/meng_yao/Assets/script/serveTestScript/loginModule/login.cs +++ b/meng_yao/Assets/script/serveTestScript/loginModule/login.cs @@ -23,9 +23,9 @@ public class login : MonoBehaviour //=======登录========================================================================================================================= public async Task Login(loginBody body) { - //loginBody body = new loginBody(); + //loginBody _body = new loginBody(); //body.client_id = "app"; - //body.username = "15478549624"; + //body.username = "17015306950"; //body.password = "9527123"; //body.type = "code"; //Debug.Log(JsonConvert.SerializeObject(body) + "入参========="); @@ -37,6 +37,23 @@ public class login : MonoBehaviour //Debug.Log(MyGlobal.global.loginResponse.Data.access_token); return response; } + + public async Task TastLogin() + { + loginBody body = new loginBody(); + body.client_id = "app"; + body.username = "17015306950"; + body.password = "9527123"; + body.type = "code"; + Debug.Log(JsonConvert.SerializeObject(body) + "入参========="); + string response = await myWeb.SendRequest(myWeb.URL + "/api/oauth/login", "POST", JsonConvert.SerializeObject(body), CreateHeadersTologin()); + Debug.Log("登录" + response); + loginResponse apifox = JsonConvert.DeserializeObject(response); + //Debug.Log(MyGlobal.global.loginResponse.Data); + MyGlobal.global.loginResponse.Data.access_token = apifox.Data.access_token; + //Debug.Log(MyGlobal.global.loginResponse.Data.access_token); + return response; + } } //====================