2024-11-27 01:40:31 +08:00
|
|
|
|
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
|
2024-11-27 01:40:31 +08:00
|
|
|
|
{
|
|
|
|
|
public TMP_InputField exchangeInput;
|
|
|
|
|
public Button CancelBtn;
|
|
|
|
|
public Button ConfirmBtn;
|
|
|
|
|
// Start is called before the first frame update
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
2024-11-28 06:16:58 +08:00
|
|
|
|
//testLogo();
|
2024-11-27 01:40:31 +08:00
|
|
|
|
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);
|
2024-11-28 06:16:58 +08:00
|
|
|
|
response = await web.SendRequest(web.URL + "/snail/exchangeCode", "POST", body, Global.global.CreateHeaders());
|
2024-11-27 19:05:53 +08:00
|
|
|
|
Debug.Log(response);
|
2024-11-27 01:40:31 +08:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
|
void Update()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|