using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; using System.Threading.Tasks; using UnityEngine; //查询靓号分页 public class GoodIdPage41 : MonoBehaviour { public async Task queryUnionPage() // 4.1 { // 准备请求的头部信息,包含授权令牌 Dictionary head41 = new Dictionary { { "Authorization", Global.global.serverResponse.data.token } }; // 请求体 GoodIdPageBody goodIdPageBody = new GoodIdPageBody { //userId = Global.global.serverResponse.data.userId, orderByDesc = 1 }; // 异步发送请求 string response41 = await web.SendRequest(web.URL + "/snail/cutePool/page", "POST", JsonUtility.ToJson(goodIdPageBody), head41); // 调试输出接收到的响应 Debug.Log("4.1查询靓号分页" + response41); // 将响应反序列化为对象 GoodIdResponse goodIdResponse = JsonConvert.DeserializeObject(response41); Debug.Log("8==================================D"+goodIdResponse.Data.TotalCount); return goodIdResponse; } }