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().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); } } }