55 lines
2.0 KiB
C#
55 lines
2.0 KiB
C#
|
using Newtonsoft.Json;
|
|||
|
using System;
|
|||
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
//5.2.4<EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
public class queryKnightBetResult525 : MonoBehaviour
|
|||
|
{
|
|||
|
//<2F><><EFBFBD>صģ<D8B5><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
public KnightBetResult knightBetResult;//===========================================================================================
|
|||
|
|
|||
|
|
|||
|
|
|||
|
public async Task<KnightBetResult> queryKnightBetResult(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> head525 = new Dictionary<string, string>
|
|||
|
{
|
|||
|
{ "Authorization", Global.global.serverResponse.data.token }
|
|||
|
};
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
QueryKnightRoomListBody queryKnightRoomListBody = new QueryKnightRoomListBody
|
|||
|
{
|
|||
|
userId = Global.global.serverResponse.data.userId,
|
|||
|
knightId = KnightId
|
|||
|
};
|
|||
|
Debug.Log("524<32><34><EFBFBD>յ<EFBFBD>=========================" + KnightId);
|
|||
|
// <20>첽<EFBFBD><ECB2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
//string response525 = await web.SendRequest(web.URL + "/snail/gameKnight/queryUserBetResult", "POST", JsonUtility.ToJson(queryKnightRoomListBody), head525);
|
|||
|
string response525 = await web.SendRequest(web.URL + "/snail/gameKnight/queryKill", "POST", JsonConvert.SerializeObject(queryKnightRoomListBody), head525);
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD>Ӧ
|
|||
|
Debug.Log("5.2.5<EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD>ʿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:======== " + response525);
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD>Ϊ KnightRoomList <20><><EFBFBD><EFBFBD>
|
|||
|
try
|
|||
|
{
|
|||
|
knightBetResult = JsonConvert.DeserializeObject<KnightBetResult>(response525);
|
|||
|
if (knightBetResult != null && knightBetResult.data != null)//==================================================<3D><><EFBFBD><EFBFBD>֮ǰ<D6AE><C7B0><EFBFBD>пգ<D0BF>δ<EFBFBD><CEB4><EFBFBD><EFBFBD><EFBFBD>ѹ<EFBFBD>ʱ<EFBFBD>䣬data[]Ϊ<><CEAA>
|
|||
|
{
|
|||
|
Debug.Log(knightBetResult.data.beansCoinFee + "=525========");
|
|||
|
}
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
Debug.LogError("<22><><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><D0BB><EFBFBD>Ӧʧ<D3A6><CAA7>: " + ex.Message);
|
|||
|
}
|
|||
|
|
|||
|
// <20><><EFBFBD>ؽ<EFBFBD><D8BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
return knightBetResult;
|
|||
|
}
|
|||
|
}
|