57 lines
1.7 KiB
C#
57 lines
1.7 KiB
C#
|
using Newtonsoft.Json;
|
|||
|
using System;
|
|||
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
public class AdressList83 : MonoBehaviour
|
|||
|
{
|
|||
|
public AdressResponse adressResponse;
|
|||
|
public async Task<AdressResponse> AdressList()
|
|||
|
{
|
|||
|
// <><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> head83 = new Dictionary<string, string>
|
|||
|
{
|
|||
|
{ "Authorization", Global.global.serverResponse.data.token }
|
|||
|
};
|
|||
|
|
|||
|
// <20>첽<EFBFBD><ECB2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
string response83 = await web.SendRequest(web.URL + "/snail/area/list", "POST", "{}", head83);
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD>Ӧ
|
|||
|
Debug.Log("8.3<EFBFBD><EFBFBD>ַ<EFBFBD>б<EFBFBD>: " + response83);
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD>Ϊ AdressResponse <20><><EFBFBD><EFBFBD>
|
|||
|
try
|
|||
|
{
|
|||
|
adressResponse = JsonConvert.DeserializeObject<AdressResponse>(response83);
|
|||
|
Debug.Log(adressResponse.data + "=======================================");
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD> data <20>б<EFBFBD><D0B1>е<EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD>ַ
|
|||
|
if (adressResponse.data != null)
|
|||
|
{
|
|||
|
foreach (var address in adressResponse.data)
|
|||
|
{
|
|||
|
Debug.Log($"<22><>ַID: {address.id}");
|
|||
|
Debug.Log($"<22>ռ<EFBFBD><D5BC><EFBFBD>: {address.receiveName}");
|
|||
|
Debug.Log($"<22>绰<EFBFBD><E7BBB0><EFBFBD><EFBFBD>: {address.receivePhone}");
|
|||
|
Debug.Log($"<22><><EFBFBD><EFBFBD>: {address.area}");
|
|||
|
Debug.Log($"<22><>ϸ<EFBFBD><CFB8>ַ: {address.address}");
|
|||
|
Debug.Log($"״̬: {address.status}");
|
|||
|
Debug.Log($"<22><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>: {address.createTime}");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
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><C4B6><EFBFBD>
|
|||
|
return adressResponse;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|