using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
namespace vnxbqy.UI
|
{
|
public class VourcherRechargeCell : MonoBehaviour
|
{
|
[SerializeField] Text title;
|
[SerializeField] Text price;
|
[SerializeField] Image icon;
|
[SerializeField] Button buyBtn;
|
|
VipModel vipModel { get { return ModelCenter.Instance.GetModelEx<VipModel>(); } }
|
|
public void Display(int index)
|
{
|
int ctgID = vipModel.voucherCTGList[index];
|
var config = CTGConfig.Get(ctgID);
|
title.text = config.Title;
|
price.text = Language.Get("PayMoneyNumEx", UIHelper.GetMoneyFormat(vipModel.GetPayRmb(config.RecordID)));
|
icon.SetSprite(config.Icon);
|
buyBtn.SetListener(() => {
|
vipModel.CTG(ctgID);
|
});
|
}
|
}
|
}
|