接口
This commit is contained in:
parent
3f8f429755
commit
98539732b6
@ -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
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit d266869186aa276f68fec88b78b6e0dc15d74881
|
||||
Subproject commit 5dbbd278a665a35ea4b2a604629259eee39601f7
|
24
meng_yao/Assets/script/scene_Main/Scene_main_jiekou.cs
Normal file
24
meng_yao/Assets/script/scene_Main/Scene_main_jiekou.cs
Normal file
@ -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<PlayerInfoData> PlayerInfos()
|
||||
{
|
||||
playerInfo playerInfo=new playerInfo();
|
||||
PlayerIndfo _PlayerIndfo = await playerInfo.PalyerInfo();
|
||||
return _PlayerIndfo.Data;
|
||||
}
|
||||
}
|
11
meng_yao/Assets/script/scene_Main/Scene_main_jiekou.cs.meta
Normal file
11
meng_yao/Assets/script/scene_Main/Scene_main_jiekou.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 768ed40e69788184b804035df928dc51
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -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,8 +72,6 @@ public class loading_jiekou : MonoBehaviour
|
||||
|
||||
return await register.Register(registerBody);
|
||||
}
|
||||
|
||||
|
||||
public async Task<PlayerIndfo> PalyerInfos()
|
||||
{
|
||||
playerInfo = new playerInfo();
|
||||
@ -84,4 +83,5 @@ public class loading_jiekou : MonoBehaviour
|
||||
|
||||
return await logout.Logout();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -23,9 +23,9 @@ public class login : MonoBehaviour
|
||||
//=======怬=========================================================================================================================
|
||||
public async Task<string> 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<string> 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<loginResponse>(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;
|
||||
}
|
||||
}
|
||||
//====================
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user