49 lines
1.4 KiB
C#
49 lines
1.4 KiB
C#
|
using Newtonsoft.Json;
|
|||
|
using System;
|
|||
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using UnityEngine;
|
|||
|
//2.1<EFBFBD><EFBFBD>ȡ<EFBFBD>̳<EFBFBD><EFBFBD>б<EFBFBD>
|
|||
|
public class getMallList21 : MonoBehaviour
|
|||
|
{
|
|||
|
public async Task<MallResponsePro> getMallList(int productType, int pageNo, int pageSize)
|
|||
|
{
|
|||
|
// <><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> head21 = new Dictionary<string, string>
|
|||
|
{
|
|||
|
{ "Authorization", Global.global.serverResponse.data.token }
|
|||
|
};
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
getMallListBody getMallListBody = new getMallListBody
|
|||
|
{
|
|||
|
productType = productType,
|
|||
|
pageNo = pageNo,
|
|||
|
pageSize = pageSize
|
|||
|
};
|
|||
|
|
|||
|
Debug.Log("====<3D><><EFBFBD><EFBFBD>====" + JsonConvert.SerializeObject(getMallListBody));
|
|||
|
// <20>첽<EFBFBD><ECB2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
string response21 = await web.SendRequest(web.URL + "/snail/product/page", "POST", JsonConvert.SerializeObject(getMallListBody), head21);
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD>Ӧ
|
|||
|
Debug.Log("2.1<EFBFBD>̳<EFBFBD><EFBFBD>б<EFBFBD>:=============== " + response21);
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6> JSON <20><><EFBFBD><EFBFBD>
|
|||
|
MallResponsePro mallResponse = JsonConvert.DeserializeObject<MallResponsePro>(response21);
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>Ƿ<EFBFBD><C7B7>ɹ<EFBFBD>
|
|||
|
if (mallResponse.code == 200)
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
Debug.LogError("<22><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>: " + mallResponse.message);
|
|||
|
}
|
|||
|
return mallResponse;
|
|||
|
}
|
|||
|
}
|