_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/InviteSystem6/getInviteList62.cs

37 lines
1.1 KiB
C#

using Newtonsoft.Json;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
//6.2取我的邀请列表:
public class getInviteList62 : MonoBehaviour
{
public InviteInfoList inviteInfoList;
public async Task<InviteInfoList> queryInviteHigherInfo()
{
Dictionary<string, string> head62 = new Dictionary<string, string>
{
{ "Authorization", Global.global.serverResponse.data.token }
};
// 异步发送请求
string response62 = await web.SendRequest(web.URL + "/snail/invite/queryMyInvitePage", "POST", "{}", head62);
Debug.Log("6.2获取我的邀请列表:=============== " + response62);
try
{
inviteInfoList = JsonConvert.DeserializeObject<InviteInfoList>(response62);
Debug.Log("+++++++++++++++"+ inviteInfoList.data.dataList[0].bindTime);
}
catch (Exception ex)
{
Debug.LogError("反序列化响应失败: " + ex.Message);
}
return inviteInfoList;
}
}