2024-12-04 15:26:46 +08:00
using System.Collections ;
using System.Collections.Generic ;
using UnityEngine ;
public class MyGlobal : Global
{
public static MyGlobal global ;
public loginResponse loginResponse ;
2024-12-25 17:24:22 +08:00
//public ScheduledDrillResponse scheduledDrillResponse;
2024-12-04 15:26:46 +08:00
private void Start ( )
{
global = this ;
}
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ͷ<EFBFBD> <CDB7> ʹ <EFBFBD> <CAB9> <EFBFBD> <EFBFBD> <EFBFBD> µ<EFBFBD> token
public Dictionary < string , string > CreateHeaders ( )
{
if ( string . IsNullOrEmpty ( MyGlobal . global . loginResponse . data . access_token ) )
{
Debug . LogWarning ( "<22> <> <EFBFBD> Դ<EFBFBD> <D4B4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ͷʱ<CDB7> <CAB1> token δ<> <CEB4> <EFBFBD> á<EFBFBD> " ) ;
return new Dictionary < string , string > ( ) ;
}
return new Dictionary < string , string >
{
{ "Authorization" , MyGlobal . global . loginResponse . data . access_token }
} ;
}
//// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ͷ<EFBFBD> <CDB7> ʹ <EFBFBD> <CAB9> <EFBFBD> <EFBFBD> <EFBFBD> µ<EFBFBD> token
//public Dictionary<string, string> CreateHeaders()
//{
// if (string.IsNullOrEmpty(response.data.access_token))
// {
// Debug.LogWarning("<22> <> <EFBFBD> Դ<EFBFBD> <D4B4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ͷʱ<CDB7> <CAB1> token δ<> <CEB4> <EFBFBD> á<EFBFBD> ");
// return new Dictionary<string, string>();
// }
// return new Dictionary<string, string>
// {
// { "Authorization", response.data.access_token }
// };
//}
}
public class loginResponse : Response
{
public loginData data ;
//public string access_token;
}
public class Response
{
public int code ;
public string msg ;
}
public class loginData
{
2024-12-25 22:10:20 +08:00
public string userId ;
public string scope ;
public string openId ;
2024-12-04 15:26:46 +08:00
public string companyId ;
public string companyName ;
public string isCreater ; //<2F> Ƿ<EFBFBD> <C7B7> <EFBFBD> ģ<EFBFBD> 崴<EFBFBD> <E5B4B4> <EFBFBD> ߣ<EFBFBD> Y<EFBFBD> <59> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ԥ<EFBFBD> <D4A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 01ҳ<31> 濪ʼ <E6BFAA> <CABC> <EFBFBD> <EFBFBD> ģ<EFBFBD> 壬N<E5A3AC> <4E> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ط<EFBFBD> 1ҳ<31> <D2B3>
2024-12-25 22:10:20 +08:00
public string access_token ;
public string refresh_token ;
public int expire_in ;
public string refresh_expire_in ;
public string client_id ;
//public int expire_in;//tolingʣ<67> <CAA3> ʱ<EFBFBD> <CAB1>
2024-12-04 15:26:46 +08:00
}
2024-12-11 11:01:36 +08:00
public static class GlobalData
{
// <20> <> ̬<EFBFBD> <CCAC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ڴ洢<DAB4> <E6B4A2> ¼<EFBFBD> <C2BC> Ӧ<EFBFBD> <D3A6> <EFBFBD> <EFBFBD>
public static loginResponse ServerData ;
2024-12-25 17:24:22 +08:00
public static ScheduledDrillResponse scheduledDrillResponse ;
2024-12-11 11:01:36 +08:00
}
2024-12-04 15:26:46 +08:00
//====================================================
//public class TemplateListData: Response
//{
// public string[] data;
//}
//public class newTemplateData: Response
//{
// public string data;
//}
//=================================================================
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
//public class QuerySceneData
//{
// public int code { get; set; }
// public string msg { get; set; }
// public List<Scene> data { get; set; }
//}
//// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ϣ<EFBFBD> <CFA2>
//public class Scene
//{
// public string id { get; set; }
// public string name { get; set; }
// public string type { get; set; }
// public string description { get; set; }
// public int suitIndustry { get; set; }
// public string price { get; set; }
// public int companyId { get; set; }
// public string status { get; set; }
// public string delFlag { get; set; }
// public string remark { get; set; }
// public string gameName { get; set; }
// public string gameType { get; set; }
// public string ossId { get; set; }
// public List<File> fileList { get; set; }
// public string gameStoreroom { get; set; }
// public string industryName { get; set; }
// public string companyName { get; set; }
//}
//// <20> ļ<EFBFBD> <C4BC> <EFBFBD> Ϣ<EFBFBD> <CFA2>
//public class File
//{
// public string ossId { get; set; }
// public string name { get; set; }
// public string url { get; set; }
// public string originalName { get; set; }
// public string fileSuffix { get; set; }
//}
//=================================================================
//public class DrillSubject : Response
//{
// [JsonProperty("data")]
// public List<QueryDrillSubjectData> data; // ȷ<> <C8B7> <EFBFBD> ֶ<EFBFBD> <D6B6> <EFBFBD> <EFBFBD> <EFBFBD> JSON <20> е <EFBFBD> ƥ<EFBFBD> <C6A5>
//}
//public class QueryDrillSubjectData
//{
// public string id;
// public string[] sceneIds;
// public string sceneNames;
// public string name;
// public string suitVersion;
// public string type;
// public string description;
// public string price;
// public string companyId;
// public string status;
// public string delFlag;
// public string remark;
// public string gameName;
// public string ossId;
// public string fileList;
//}
//===============================================================
//public class RoleList
//{
// public int code; // <20> <> JSON <20> е <EFBFBD> "code" <20> ֶζ<D6B6> Ӧ
// public string msg; // <20> <> JSON <20> е <EFBFBD> "msg" <20> ֶζ<D6B6> Ӧ
// public List<RoleData> data; // <20> <> JSON <20> е <EFBFBD> "data" <20> ֶζ<D6B6> Ӧ<EFBFBD> <D3A6> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ɫ<EFBFBD> <C9AB> <EFBFBD> б <EFBFBD>
//}
//public class RoleData
//{
// public string id; // <20> <> JSON <20> е <EFBFBD> "id" <20> ֶζ<D6B6> Ӧ
// public string roleName; // <20> <> JSON <20> е <EFBFBD> "roleName" <20> ֶζ<D6B6> Ӧ
// public string sceneId; // <20> <> JSON <20> е <EFBFBD> "sceneId" <20> ֶζ<D6B6> Ӧ
// public int gameName; // <20> <> JSON <20> е <EFBFBD> "gameName" <20> ֶζ<D6B6> Ӧ<EFBFBD> <D3A6> ע<EFBFBD> <D7A2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> int <20> <> <EFBFBD> <EFBFBD>
// public string roleAttributions; // <20> <> JSON <20> е <EFBFBD> "roleAttributions" <20> ֶζ<D6B6> Ӧ
//}
//===================================================================
//public class BindPlayer:Response
//{
// public string data;
//}
//=============================================================
//public class BindNPC : Response
//{
// public string data;//++++++++++++++++++++++++++++++++++++
//}
//====================================================
//public class BindMaterial : Response
//{
// public string data;//++++++++++++++++++++++++++++++++++++
//}
//===================================================
//public class SubmitTemplate : Response
//{
// public string data;//++++++++++++++++++++++++++++++++++++
//}