领奖提现的几口以及绑定UI的提交

This commit is contained in:
liuliang 2024-12-29 15:30:02 +08:00
parent 134a7e4bb4
commit 87a088ecdd
2 changed files with 1990 additions and 208 deletions

File diff suppressed because it is too large Load Diff

View File

@ -5,35 +5,57 @@ using UnityEngine.UI;
public class Lingjiang_Tanchuang : mount
{
public Button Kfbtn;
public Button Txbtn;
public Text title;
public Text balance;
public Text explained;
public Transform canvas;
private async void OnEnable()
{
Init();
}
// Start is called before the first frame update
void Start()
{
Kfbtn.onClick.AddListener(Display_pop_up_window);
Txbtn.onClick.AddListener(TxClick);
}
private void Display_pop_up_window()
private void Display_pop_up_window()//绑定支付宝或者银行卡
{
List<BoxType> boxTypes = new List<BoxType>();
boxTypes.Add(new BoxType { Name = "", prompt = "", Type = 13, content = "此功能未开通" });
boxTypes.Add(new BoxType { Name = "", prompt = "确认", Type = 11 });
GameObject gameObject = add_pop_up();
gameObject.transform.position = new Vector3(Screen.width / 2, Screen.height / 2, 0);
gameObject.transform.SetParent(canvas);
gameObject.GetComponent<input_box_pop_up_window>().minHeight = 300;//设置最低高度
gameObject.GetComponent<input_box_pop_up_window>().setScrollMode(0);//设置滚动模式为滚动
//gameObject.GetComponent<input_box_pop_up_window>().setScrollMode(0);//设置滚动模式为自动填充
List<GameObject> gameObjects = gameObject.GetComponent<input_box_pop_up_window>().updateUI(boxTypes, "绑定提示");//测试输入框回调处理
gameObjects[1].GetComponent<input_box_pop_up_window_item>().register_click(async (BoxType boxType, int type) =>//登录确定或取消
{
if (type == 1)
{
gameObject.GetComponent<input_box_pop_up_window>().destroy();
}
});
}
// Update is called once per frame
void TxClick()//提现支付宝或者银行卡
{
}
async void Init()
{
WithdrawConfigResponse response = await Scene_main_jiekou.instance.WithdrawConfigs();
title.text = response.data.config.title;
balance.text = response.data.config.balance;
explained.text = response.data.config.explained;
if (response.data.accounts.Count != 0)
{
Debug.Log(response.data.accounts);
Txbtn.gameObject.SetActive(true);
}
else
{
Kfbtn.gameObject.SetActive(true);
}
}
}