Cute_demon_attacks/meng_yao/Assets/script/TanChuang/Lingjiang_Tanchuang.cs
2024-12-30 12:49:29 +08:00

62 lines
1.4 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Lingjiang_Tanchuang : mount
{
public Button Kfbtn;
public Button Txbtn;
public Text title;
public Text balance;
public Text explained;
public Text BindingTips;
public Transform canvas;
public GameObject bendingprefab;
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()//绑定支付宝或者银行卡
{
GameObject obj= Instantiate(bendingprefab,canvas);
obj.GetComponent<BindingPanel>().lingjiang = this;
}
void TxClick()//提现支付宝或者银行卡
{
}
public 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[0].status != 0)
{
Debug.Log(response.data.accounts);
Txbtn.gameObject.SetActive(true);
BindingTips.text = "";
}
else
{
Kfbtn.gameObject.SetActive(true);
}
}
}