_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/lianghaoLL/ExchangePanel.cs
2024-11-28 06:16:58 +08:00

42 lines
948 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using UnityEngine.UI;
public class ExchangePanel : Base
{
public TMP_InputField exchangeInput;
public Button CancelBtn;
public Button ConfirmBtn;
// Start is called before the first frame update
void Start()
{
//testLogo();
ConfirmBtn.onClick.AddListener(ConfrimPanel);
CancelBtn.onClick.AddListener(CancelPanel);
}
void CancelPanel()
{
Destroy(this.gameObject);
}
async void ConfrimPanel()
{
string response = "";//²âÊÔ
string body = "{\"exchangeCode\":\"" + exchangeInput.text + "}";
Debug.Log(body);
response = await web.SendRequest(web.URL + "/snail/exchangeCode", "POST", body, Global.global.CreateHeaders());
Debug.Log(response);
}
// Update is called once per frame
void Update()
{
}
}