_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/GoodId/BuyGoodId42.cs

39 lines
1.2 KiB
C#
Raw Normal View History

2024-11-26 21:16:12 +08:00
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
public class BuyGoodId42 : MonoBehaviour
{
public async Task<BuyGoodIdResponse> buyGoodId(int cutePoolId) // 4.2
{
// ׼<><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>
Dictionary<string, string> head41 = new Dictionary<string, string>
{
{ "Authorization", Global.global.serverResponse.data.token }
};
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
BuyGoodIdBody buyGoodIdBody = new BuyGoodIdBody
{
userId = Global.global.serverResponse.data.userId,
cutePoolId = cutePoolId
};
// <20><EFBFBD><ECB2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Debug.Log("======<3D><><EFBFBD><EFBFBD>======" + JsonConvert.SerializeObject(buyGoodIdBody));
string response42 = await web.SendRequest(web.URL + "/snail/cutePool/buy", "POST", JsonConvert.SerializeObject(buyGoodIdBody), head41);
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD>Ӧ
Debug.Log("4.2<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>==" + response42);
// <20><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>
BuyGoodIdResponse buyGoodIdResponse = JsonConvert.DeserializeObject<BuyGoodIdResponse>(response42);
Debug.Log("8==================================D" + buyGoodIdResponse.Data.TotalCount);
return buyGoodIdResponse;
}
}