_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/SnailKnight52/queryKnightRoomList522.cs

55 lines
2.0 KiB
C#
Raw Normal View History

using Newtonsoft.Json;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
//<2F><>ѯ<EFBFBD><D1AF>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD>5.2.2
public class queryKnightRoomList522 : MonoBehaviour
{
//<2F><><EFBFBD>صģ<D8B5><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public KnightRoomBetList knightRoomBetList;
public async Task<KnightRoomBetList> queryKnightRoomLis(int KnightId) // 5.2.2//<2F><EFBFBD><E8B4AB>KightId
{
// ׼<><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> head522 = new Dictionary<string, string>
{
{ "Authorization", Global.global.serverResponse.data.token }
};
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
QueryKnightRoomListBody queryKnightRoomListBody = new QueryKnightRoomListBody
{
knightId = KnightId,
userId = Global.global.serverResponse.data.userId
};
// <20><EFBFBD><ECB2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
string response522 = await web.SendRequest(web.URL + "/snail/gameKnight/queryKnightRoomList", "POST", JsonConvert.SerializeObject(queryKnightRoomListBody), head522);
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD>Ӧ
Debug.Log("5.2.2<EFBFBD><EFBFBD>ƥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><EFBFBD><EFBFBD><EFBFBD>: " + response522);
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD> JSON <20>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD>Ϊ KnightRoomBetList <20><><EFBFBD><EFBFBD>
KnightRoomBetList knightRoomBetList = JsonConvert.DeserializeObject<KnightRoomBetList>(response522);
//if (knightRoomBetList != null && knightRoomBetList.Data != null)
//{
// Debug.Log("<22><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD>: " + knightRoomBetList.Code);
// Debug.Log("Я<><D0AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: " + knightRoomBetList.Data.CarrySeconds);
// foreach (var room in knightRoomBetList.Data.GameKnightRoomResponseVoList)
// {
// Debug.Log("<22><>ʿID: " + room.KnightId);
// Debug.Log("<22><>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>: " + room.HorseNo);
// Debug.Log("<22><>ƥ<EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>: " + room.HorseUserNo);
// Debug.Log("<22><>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD>: " + room.HorseBeansCoin);
// }
//}
// <20><><EFBFBD>ؽ<EFBFBD><D8BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> KnightRoomBetList <20><><EFBFBD><EFBFBD>
return knightRoomBetList;
}
}