_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/AddressSystem8/updateAddress82.cs

56 lines
1.9 KiB
C#
Raw Normal View History

2024-11-27 15:54:29 +08:00
using Newtonsoft.Json;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
public class updateAddress82 : MonoBehaviour
{
//<2F><><EFBFBD>صģ<D8B5><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public updateAddressResponse updateAddressResponse;
//public async Task<KnightBetResult> queryKnightBetResult(int KnightId) // 5.2.2//<2F><EFBFBD><E8B4AB>KightId
public async Task<updateAddressResponse> updateAddress(int id,string receiveName, string receivePhone, string area, string address)
{
// ׼<><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> head81 = new Dictionary<string, string>
{
{ "Authorization", Global.global.serverResponse.data.token }
};
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
updateAddressBody updateAddressBody = new updateAddressBody
{
id = id,
receivePhone = receivePhone,
area = area,
address = address,
receiveName = receiveName,
};
Debug.Log("8.2=====<3D><><EFBFBD><EFBFBD>======" + JsonConvert.SerializeObject(updateAddressBody));
// <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 response82 = await web.SendRequest(web.URL + "/snail/area/update", "POST", JsonConvert.SerializeObject(updateAddressBody), head81);
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD>Ӧ
Debug.Log("8.2<EFBFBD>޸ĵ<EFBFBD>ַ:+++++++++++++ " + response82);
//<2F><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD>Ϊ KnightRoomList <20><><EFBFBD><EFBFBD>
try
{
updateAddressResponse = JsonConvert.DeserializeObject<updateAddressResponse>(response82);
Debug.Log(updateAddressResponse.data + "=======================================");
}
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 updateAddressResponse;
}
}