_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/lianghaoLL/ExchangePanel.cs

42 lines
925 B
C#
Raw Normal View History

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using UnityEngine.UI;
2024-11-27 19:05:53 +08:00
public class ExchangePanel : Base
{
public TMP_InputField exchangeInput;
public Button CancelBtn;
public Button ConfirmBtn;
// Start is called before the first frame update
void Start()
{
2024-11-27 19:05:53 +08:00
testLogo();
ConfirmBtn.onClick.AddListener(ConfrimPanel);
CancelBtn.onClick.AddListener(CancelPanel);
}
void CancelPanel()
{
Destroy(this.gameObject);
}
async void ConfrimPanel()
{
2024-11-27 19:05:53 +08:00
string response = "";//<2F><><EFBFBD><EFBFBD>
string body = "{\"exchangeCode\":\"" + exchangeInput.text + "}";
Debug.Log(body);
response = await web.SendRequest(web.URL + "/snail/exchangeCode", "POST", body, testhead);
Debug.Log(response);
}
// Update is called once per frame
void Update()
{
}
}