100 lines
3.1 KiB
C#
100 lines
3.1 KiB
C#
|
using Newtonsoft.Json;
|
|||
|
using System;
|
|||
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using UnityEngine;
|
|||
|
//10.4<EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD>۷<EFBFBD>ҳ
|
|||
|
public class queryUserMiningSlot104 : MonoBehaviour
|
|||
|
{
|
|||
|
public async Task<UserMiningSlotResponse> QueryUserMiningSlot()
|
|||
|
{
|
|||
|
// <><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> head = new Dictionary<string, string>
|
|||
|
{
|
|||
|
{ "Authorization", Global.global.serverResponse.data.token }
|
|||
|
};
|
|||
|
|
|||
|
queryPlayerInfo queryPlayerInfo = new queryPlayerInfo();
|
|||
|
RealPlayerInfo realPlayerInfo = await queryPlayerInfo.QueryPlayerInfoPro();
|
|||
|
UserMiningSlotBody body = new UserMiningSlotBody();
|
|||
|
body.userId = realPlayerInfo.data.userId;
|
|||
|
|
|||
|
|
|||
|
// <20>첽<EFBFBD><ECB2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ի<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD>µ<EFBFBD><C2B5><EFBFBD>ţ<EFBFBD><C5A3>ʿ<EFBFBD><CABF>Ϣ
|
|||
|
string response0104 = await web.SendRequest(web.URL + "/snail/mining/queryUserMiningSlot", "POST", JsonConvert.SerializeObject(body), head);
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD>Ӧ
|
|||
|
Debug.Log("10.4<EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD>۷<EFBFBD>ҳ" + response0104);
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>
|
|||
|
UserMiningSlotResponse userMiningSlotResponse = JsonConvert.DeserializeObject<UserMiningSlotResponse>(response0104);
|
|||
|
//Debug.Log("===========88============="+ userMiningSlotResponse.data.dataList[0].userId);
|
|||
|
|
|||
|
// <20><><EFBFBD>ؽ<EFBFBD><D8BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD>
|
|||
|
return userMiningSlotResponse;
|
|||
|
}
|
|||
|
}
|
|||
|
//======<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>==================================
|
|||
|
public class UserMiningSlotBody
|
|||
|
{
|
|||
|
public long userId;
|
|||
|
}
|
|||
|
//===========<3D><><EFBFBD><EFBFBD>ֵ==============================
|
|||
|
public class UserMiningSlotResponse:Response
|
|||
|
{
|
|||
|
public UserMiningSlotData data { get; set; }
|
|||
|
}
|
|||
|
|
|||
|
public class UserMiningSlotData
|
|||
|
{
|
|||
|
public int pageNo { get; set; }
|
|||
|
public int pageSize { get; set; }
|
|||
|
public int totalCount { get; set; }
|
|||
|
public List<UserMiningSlot> dataList { get; set; }
|
|||
|
}
|
|||
|
|
|||
|
public class UserMiningSlot
|
|||
|
{
|
|||
|
public long id { get; set; }
|
|||
|
public long userId { get; set; }
|
|||
|
public long snailId { get; set; }
|
|||
|
public long contractId { get; set; }
|
|||
|
public long contractUserId { get; set; }
|
|||
|
public string bindTime { get; set; }
|
|||
|
public int source { get; set; }
|
|||
|
public int useType { get; set; }
|
|||
|
public int status { get; set; }
|
|||
|
public string createTime { get; set; }
|
|||
|
public string miningBegin { get; set; }
|
|||
|
public string miningEnd { get; set; }
|
|||
|
public int carry { get; set; }
|
|||
|
public string contractName { get; set; }
|
|||
|
}
|
|||
|
//{
|
|||
|
// "code": 200,
|
|||
|
// "message": "<22><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>",
|
|||
|
// "data": {
|
|||
|
// "pageNo": 1,
|
|||
|
// "pageSize": 20,
|
|||
|
// "totalCount": 1,
|
|||
|
// "dataList": [
|
|||
|
// {
|
|||
|
// "id": 13,
|
|||
|
// "userId": 106,
|
|||
|
// "snailId": 0,
|
|||
|
// "contractId": 0,
|
|||
|
// "contractUserId": 0,
|
|||
|
// "bindTime": null,
|
|||
|
// "source": 0,
|
|||
|
// "useType": 2,
|
|||
|
// "status": 0,
|
|||
|
// "createTime": null,
|
|||
|
// "miningBegin": null,
|
|||
|
// "miningEnd": null,
|
|||
|
// "carry": 0,
|
|||
|
// "contractName": null
|
|||
|
// }
|
|||
|
// ]
|
|||
|
// }
|
|||
|
//}
|