2024-11-25 09:45:47 +08:00
using Newtonsoft.Json ;
2024-11-21 13:55:05 +08:00
using System.Collections ;
using System.Collections.Generic ;
using UnityEngine ;
public class Global : Singleton < Global >
{
public static Global global ;
2024-11-29 17:27:21 +08:00
public loginResponse loginResponse ;
2024-11-21 13:55:05 +08:00
2024-11-29 17:27:21 +08:00
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ͷ<EFBFBD> <CDB7> ʹ <EFBFBD> <CAB9> <EFBFBD> <EFBFBD> <EFBFBD> µ<EFBFBD> token
public Dictionary < string , string > CreateHeaders ( )
{
2024-11-21 13:55:05 +08:00
2024-11-29 17:27:21 +08:00
if ( string . IsNullOrEmpty ( Global . 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" , Global . global . loginResponse . data . access_token }
} ;
}
2024-11-25 09:45:47 +08:00
//// <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 }
// };
//}
2024-11-21 13:55:05 +08:00
}
2024-11-29 17:27:21 +08:00
public class loginResponse : Response
2024-11-21 13:55:05 +08:00
{
2024-11-29 17:27:21 +08:00
public loginData data ;
2024-11-21 13:55:05 +08:00
//public string access_token;
}
public class Response
{
public int code ;
public string msg ;
}
2024-11-29 17:27:21 +08:00
public class loginData
2024-11-21 13:55:05 +08:00
{
public string access_token ;
public string companyId ;
public string companyName ;
public string client_id ;
public int expire_in ; //tolingʣ<67> <CAA3> ʱ<EFBFBD> <CAB1>
2024-11-25 09:45:47 +08:00
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-11-29 17:27:21 +08:00
//public class TemplateListData: Response
//{
// public string[] data;
//}
//public class newTemplateData: Response
//{
// public string data;
//}
2024-11-25 09:45:47 +08:00
//=============================================================
// <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2024-11-29 17:27:21 +08:00
//public class QuerySceneData
//{
// public int code { get; set; }
// public string msg { get; set; }
// public List<Scene> data { get; set; }
//}
2024-11-25 09:45:47 +08:00
2024-11-29 17:27:21 +08:00
//// <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; }
//}
2024-11-21 13:55:05 +08:00
2024-11-29 17:27:21 +08:00
//// <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; }
//}
2024-11-25 09:45:47 +08:00
//=================================================================
2024-11-29 20:06:53 +08:00
//public class DrillSubject : Response
//{
// [JsonProperty("data")]
// public List<QueryDrillSubjectData> data; // ȷ<> <C8B7> <EFBFBD> ֶ<EFBFBD> <D6B6> <EFBFBD> <EFBFBD> <EFBFBD> JSON <20> е <EFBFBD> ƥ<EFBFBD> <C6A5>
//}
2024-11-25 09:45:47 +08:00
2024-11-29 20:06:53 +08:00
//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;
//}
2024-11-25 09:45:47 +08:00
//===============================================================
2024-11-29 20:06:53 +08:00
//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>
//}
2024-11-25 09:45:47 +08:00
2024-11-29 20:06:53 +08:00
//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> Ӧ
//}
2024-11-25 09:45:47 +08:00
//===================================================================
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 ; //++++++++++++++++++++++++++++++++++++
}