56 lines
1.6 KiB
C#
56 lines
1.6 KiB
C#
|
using Newtonsoft.Json;
|
|||
|
using System;
|
|||
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using UnityEngine;
|
|||
|
//5.2.3<EFBFBD><EFBFBD>ע
|
|||
|
public class SnailKnightBet523 : MonoBehaviour
|
|||
|
{
|
|||
|
//<2F><><EFBFBD>صģ<D8B5><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>====================
|
|||
|
//public KnightRoomBetList knightRoomBetList;
|
|||
|
|
|||
|
//async void Start()
|
|||
|
//{
|
|||
|
// await SnailKnightBet(39592, 1, 3); // =============================== ʾ<><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
//}
|
|||
|
|
|||
|
public async Task<KnightRoomBetList> SnailKnightBet(int KnightId,float bet,int horseNo)
|
|||
|
{
|
|||
|
// <><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> head523 = new Dictionary<string, string>
|
|||
|
{
|
|||
|
{ "Authorization", Global.global.serverResponse.data.token }
|
|||
|
};
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
KnightBetBody knightBetBody = new KnightBetBody
|
|||
|
{
|
|||
|
userId = Global.global.serverResponse.data.userId,
|
|||
|
knightId = KnightId,
|
|||
|
bet = bet,
|
|||
|
horseNo = horseNo
|
|||
|
};
|
|||
|
|
|||
|
// <20>첽<EFBFBD><ECB2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
string response523 = await web.SendRequest(web.URL + "/snail/gameKnight/userBet", "POST", JsonConvert.SerializeObject(knightBetBody), head523);
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD>Ӧ
|
|||
|
Debug.Log("<22><><EFBFBD><EFBFBD>"+ JsonConvert.SerializeObject(knightBetBody) + "5.2.3<EFBFBD><EFBFBD>ע: " + response523);
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>
|
|||
|
try
|
|||
|
{
|
|||
|
// knightRoomBetList = JsonConvert.DeserializeObject<KnightRoomBetList>(response522);
|
|||
|
|
|||
|
}
|
|||
|
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> KnightRoomBetList <20><><EFBFBD><EFBFBD>
|
|||
|
return null;
|
|||
|
}
|
|||
|
}
|