71 lines
1.7 KiB
C#
71 lines
1.7 KiB
C#
|
using Newtonsoft.Json;
|
|||
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
public class MyGlobal : MonoBehaviour
|
|||
|
{
|
|||
|
public static MyGlobal global;
|
|||
|
public loginResponse loginResponse =new loginResponse();
|
|||
|
|
|||
|
private void Awake()
|
|||
|
{
|
|||
|
|
|||
|
if (global != null)
|
|||
|
{
|
|||
|
return;
|
|||
|
}
|
|||
|
global = this;
|
|||
|
}
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7>ʹ<EFBFBD><CAB9><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD> token
|
|||
|
public Dictionary<string, string> CreateHeaders()
|
|||
|
{
|
|||
|
|
|||
|
return new Dictionary<string, string>
|
|||
|
{
|
|||
|
{"platform","ios" },
|
|||
|
{"phone_product","apple" },{"phone_model","iPhone_8" },{"system_version","12.0" },
|
|||
|
{ "screen_size","750*1334" },
|
|||
|
{"device_no","e3e277810fff9d955ebdd7037eff51a8" },
|
|||
|
{"version","1.0.0"}
|
|||
|
};
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
//===========================================================================================================
|
|||
|
public class myResponse//=========<3D><>============
|
|||
|
{
|
|||
|
public int code;
|
|||
|
public string message;
|
|||
|
}
|
|||
|
//===========================================================
|
|||
|
public class loginResponse : myResponse//<2F><>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>ֵ
|
|||
|
{
|
|||
|
public data Data =new data();
|
|||
|
}
|
|||
|
public class data
|
|||
|
{
|
|||
|
public string access_token;
|
|||
|
public string token_type;
|
|||
|
public int expires_in;
|
|||
|
public string scope;
|
|||
|
}
|
|||
|
public class RegisterResponse: myResponse//ע<>᷵<EFBFBD><E1B7B5>ֵ
|
|||
|
{
|
|||
|
|
|||
|
public registerData data;
|
|||
|
}
|
|||
|
public class registerData
|
|||
|
{
|
|||
|
public int auto_login;
|
|||
|
public registerToken token;
|
|||
|
}
|
|||
|
public class registerToken
|
|||
|
{
|
|||
|
public string access_token;
|
|||
|
public string token_type;
|
|||
|
public int expires_in;
|
|||
|
public string scope;
|
|||
|
}
|
|||
|
//============================================================
|