32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
using Newtonsoft.Json;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using UnityEngine;
|
|
//10.8,矿厂主页刷新蜗壳值
|
|
public class queryUserVoluteCoin108 : MonoBehaviour
|
|
{
|
|
public async Task<QueryUserVoluteCoinResponse> QueryUserVoluteCoin()
|
|
{
|
|
// 准备请求的头部信息,包含授权令牌
|
|
Dictionary<string, string> head = new Dictionary<string, string>
|
|
{
|
|
{ "Authorization", Global.global.serverResponse.data.token }
|
|
};
|
|
|
|
// 异步发送请求
|
|
string response0108 = await web.SendRequest(web.URL + "/snail/mining/queryUserVoluteCoin", "POST","{}", head);
|
|
|
|
// 调试输出接收到的响应
|
|
Debug.Log("10.8,矿厂主页刷新蜗壳值" + response0108);
|
|
|
|
QueryUserVoluteCoinResponse queryUserVoluteCoinResponse = JsonConvert.DeserializeObject<QueryUserVoluteCoinResponse>(response0108);
|
|
return queryUserVoluteCoinResponse;
|
|
|
|
}
|
|
}
|
|
//============返回值======================================
|
|
public class QueryUserVoluteCoinResponse:Response
|
|
{
|
|
public double data;
|
|
} |