177 lines
5.1 KiB
C#
177 lines
5.1 KiB
C#
![]() |
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
public class MyGlobal : Global
|
|||
|
{
|
|||
|
public static MyGlobal global;
|
|||
|
public loginResponse loginResponse;
|
|||
|
|
|||
|
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
|
|||
|
{
|
|||
|
public string access_token;
|
|||
|
public string companyId;
|
|||
|
public string companyName;
|
|||
|
public string client_id;
|
|||
|
public int expire_in;//tolingʣ<67><CAA3>ʱ<EFBFBD><CAB1>
|
|||
|
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>
|
|||
|
}
|
|||
|
//====================================================
|
|||
|
//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;//++++++++++++++++++++++++++++++++++++
|
|||
|
//}
|