using Newtonsoft.Json; using System; using System.Collections; using System.Collections.Generic; using System.Threading.Tasks; using UnityEngine; //查询邀请的上级详情 public class queryInviteHigherInfo61 : MonoBehaviour { public InviteHigherInfo inviteHigherInfo; public async Task queryInviteHigherInfo() { Dictionary head61 = new Dictionary { { "Authorization", Global.global.serverResponse.data.token } }; // 异步发送请求 string response61 = await web.SendRequest(web.URL + "/snail/invite/queryInviteHigherInfo", "POST", "{}", head61); Debug.Log("6.1获取邀请的上级详情:=============== " + response61); try { inviteHigherInfo = JsonConvert.DeserializeObject(response61); //if (inviteHigherInfo != null && inviteHigherInfo.data != null) //{ // // 获取各个字段 // int userId = inviteHigherInfo.data.userId; // string userName = inviteHigherInfo.data.userName; // string token = inviteHigherInfo.data.token; // string nickName = inviteHigherInfo.data.nickName; // string headImg = inviteHigherInfo.data.headImg; // int gender = inviteHigherInfo.data.gender; // string birthday = inviteHigherInfo.data.birthday; // string voluteCoin = inviteHigherInfo.data.voluteCoin; // string beansCoin = inviteHigherInfo.data.beansCoin; // string ichorCoin = inviteHigherInfo.data.ichorCoin; // string idCard = inviteHigherInfo.data.idCard; // string bank = inviteHigherInfo.data.bank; // string realName = inviteHigherInfo.data.realName; // bool? isCert = inviteHigherInfo.data.isCert; // string inviteCodeMy = inviteHigherInfo.data.inviteCodeMy; // string inviteCodeBind = inviteHigherInfo.data.inviteCodeBind; // string bindTime = inviteHigherInfo.data.bindTime; // string station = inviteHigherInfo.data.station; // string cuteNo = inviteHigherInfo.data.cuteNo; // string memberTime = inviteHigherInfo.data.memberTime; // bool? isMember = inviteHigherInfo.data.isMember; // string unionId = inviteHigherInfo.data.unionId; // // 调试输出字段的值 // Debug.Log($"UserId: {userId}"); // Debug.Log($"UserName: {userName}"); // Debug.Log($"Token: {token}"); // Debug.Log($"NickName: {nickName}"); // Debug.Log($"HeadImg: {headImg}"); // Debug.Log($"Gender: {gender}"); // Debug.Log($"Birthday: {birthday}"); // Debug.Log($"VoluteCoin: {voluteCoin}"); // Debug.Log($"BeansCoin: {beansCoin}"); // Debug.Log($"IchorCoin: {ichorCoin}"); // Debug.Log($"IdCard: {idCard}"); // Debug.Log($"Bank: {bank}"); // Debug.Log($"RealName: {realName}"); // Debug.Log($"IsCert: {isCert}"); // Debug.Log($"InviteCodeMy: {inviteCodeMy}"); // Debug.Log($"InviteCodeBind: {inviteCodeBind}"); // Debug.Log($"BindTime: {bindTime}"); // Debug.Log($"Station: {station}"); // Debug.Log($"CuteNo: {cuteNo}"); // Debug.Log($"MemberTime: {memberTime}"); // Debug.Log($"IsMember: {isMember}"); // Debug.Log($"UnionId: {unionId}"); //} } catch (Exception ex) { Debug.LogError("反序列化响应失败: " + ex.Message); } return inviteHigherInfo; } }