_TheStrongestSnail/TheStrongestSnail/Assets/HZB/UnionDetail17.cs
2024-11-25 22:57:46 +08:00

34 lines
1.3 KiB
C#

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