From 2791991b562b9617eb590f2b382648ba6b96cb7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=88=92=E8=8D=A3=E6=A3=AE?= <7716842+shurongsen@user.noreply.gitee.com> Date: Tue, 26 Nov 2024 16:54:06 +0800 Subject: [PATCH] add --- .../Assets/Scripts/Conversion/DonatePanelItem.cs | 14 ++++++++++++-- TheStrongestSnail/Assets/common/base/base.cs | 9 +++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/TheStrongestSnail/Assets/Scripts/Conversion/DonatePanelItem.cs b/TheStrongestSnail/Assets/Scripts/Conversion/DonatePanelItem.cs index a60fac8..d608e52 100644 --- a/TheStrongestSnail/Assets/Scripts/Conversion/DonatePanelItem.cs +++ b/TheStrongestSnail/Assets/Scripts/Conversion/DonatePanelItem.cs @@ -19,9 +19,19 @@ public class DonatePanelItem : BaseUIPanel testLogo(); } - void buttonOnClick() + public class voluteCoinItem { - + public string toCuteNo; + public int voluteCoin; + } + async void buttonOnClick() + { + + voluteCoinItem body = new voluteCoinItem(); + body.toCuteNo = Recipient.text; + body.voluteCoin = int.Parse(GiftQuantity.text); + string response = await web.SendRequest(web.URL + "/snail/transfer/voluteCoin", "POST", JsonUtility.ToJson(body), testhead);//²âÊÔ + Debug.Log(response); } async void GiftQuantityData(string userInput) { diff --git a/TheStrongestSnail/Assets/common/base/base.cs b/TheStrongestSnail/Assets/common/base/base.cs index 25f8310..4d0a80e 100644 --- a/TheStrongestSnail/Assets/common/base/base.cs +++ b/TheStrongestSnail/Assets/common/base/base.cs @@ -57,11 +57,12 @@ public class Base : MonoBehaviour addEventPopUp("²âÊԵǼ³É¹¦"); testhead = new Dictionary - { - { "Authorization", TestserverResponse.data.token } - }; + { + { "Authorization", TestserverResponse.data.token } + }; + return; } - addEventPopUp("²âÊԵǼʧ°Ü"); + addEventPopUp(response.message); testhead = new Dictionary(); }