From 04e2a5a210974cc27b3461d8b4276f0e90b10c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=8F=B7=E6=95=AC?= <153802103@qq.com> Date: Mon, 9 Dec 2024 19:52:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=83=8C=E5=8C=85bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TheStrongestSnail/Assets/Scripts/lianghaoLL/BagPanel.cs | 9 +++++---- TheStrongestSnail/Assets/Scripts/lianghaoLL/DonateTc.cs | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/TheStrongestSnail/Assets/Scripts/lianghaoLL/BagPanel.cs b/TheStrongestSnail/Assets/Scripts/lianghaoLL/BagPanel.cs index 8ca8464..f042fa3 100644 --- a/TheStrongestSnail/Assets/Scripts/lianghaoLL/BagPanel.cs +++ b/TheStrongestSnail/Assets/Scripts/lianghaoLL/BagPanel.cs @@ -29,13 +29,14 @@ public class BagPanel : MonoBehaviour string response = "";//²âÊÔ response = await web.SendRequest(web.URL + "/snail/user/queryUserBag", "POST","{}", Global.global.CreateHeaders()); Debug.Log(response); - ServerRespon111 serverRespon111 = JsonConvert.DeserializeObject(response); - for (int i = 0; i < serverRespon111.snailCount; i++) + bag111 serverRespon111 = JsonConvert.DeserializeObject(response); + Debug.Log("±³°ü================================"+serverRespon111.data.slotCount); + for (int i = 0; i < serverRespon111.data.snailCount; i++) { GameObject woniuitem = (GameObject)Instantiate(Resources.Load("LLPrefabs/items"),woniuConnect.transform); - + Debug.Log(1); } - for (int i = 0; i < serverRespon111.slotCount; i++) + for (int i = 0; i < serverRespon111.data.slotCount; i++) { GameObject wokeitem = (GameObject)Instantiate(Resources.Load("LLPrefabs/items"),wokeConnect.transform); } diff --git a/TheStrongestSnail/Assets/Scripts/lianghaoLL/DonateTc.cs b/TheStrongestSnail/Assets/Scripts/lianghaoLL/DonateTc.cs index d76d2ed..cb749f2 100644 --- a/TheStrongestSnail/Assets/Scripts/lianghaoLL/DonateTc.cs +++ b/TheStrongestSnail/Assets/Scripts/lianghaoLL/DonateTc.cs @@ -27,17 +27,18 @@ public class DonateTc : BaseUIPanel string response = "";//²âÊÔ if (donatePanelItem.mymode == DonatePanelItem.mode.voluteCoin) { - string body = "{\"toCuteNo\":\"" + (int.Parse(donatePanelItem.Recipient.text)).ToString() + "\",\"voluteCoin\":" + int.Parse(donatePanelItem.GiftQuantity.text) + "}"; + string body = "{\"toCuteNo\":\"" + (long.Parse(donatePanelItem.Recipient.text)).ToString() + "\",\"voluteCoin\":" + int.Parse(donatePanelItem.GiftQuantity.text) + "}"; Debug.Log(body); response = await web.SendRequest(web.URL + "/snail/transfer/voluteCoin", "POST", body, Global.global.CreateHeaders()); } else { - string body = "{\"toCuteNo\":\"" + (int.Parse(donatePanelItem.Recipient.text)).ToString() + "\",\"slotCount\":" + int.Parse(donatePanelItem.GiftQuantity.text) + "}"; + string body = "{\"toCuteNo\":\"" + (long.Parse(donatePanelItem.Recipient.text)).ToString() + "\",\"slotCount\":" + int.Parse(donatePanelItem.GiftQuantity.text) + "}"; Debug.Log(body); response = await web.SendRequest(web.URL + "/snail/transfer/slot", "POST", body, Global.global.CreateHeaders()); } ServerResponse18 serverResponse = JsonConvert.DeserializeObject(response); + Debug.Log(serverResponse.message); if (serverResponse.code != 200) { addEventPopUp(serverResponse.message);