_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/Union16/UnionDetail17.cs
2024-12-05 16:59:31 +08:00

30 lines
1008 B
C#

using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
//1.7查询工会详情
public class UnionDetail17 : Base
{
// UnionDetail unionDetail = new UnionDetail();
public async Task<UnionDetalResponse> queryUnionDetail(int id) // 1.7
{
// 准备请求的头部信息,包含授权令牌
Dictionary<string, string> head17 = new Dictionary<string, string>
{
{ "Authorization", Global.global.serverResponse.data.token }
};
// 异步发送请求
string response17 = await web.SendRequest(web.URL + "/snail/union/queryInfo?unionId="+id.ToString(), "GET","{}", head17);
// 调试输出接收到的响应
Debug.Log("1.7查询工会详情========================================" + response17);
// 将响应反序列化为对象
UnionDetalResponse unionDetailResponse = JsonConvert.DeserializeObject<UnionDetalResponse>(response17);
return unionDetailResponse;
}
}