|
@@ -115,14 +115,14 @@ namespace GFGGame
|
|
|
UI_StoreListItem item = UI_StoreListItem.Proxy(obj);
|
|
|
item.m_btnBuy.m_c1.selectedIndex = 1;
|
|
|
item.m_btnBuy.m_txtTitle.text = itemData.price.ToString();
|
|
|
- if (item.m_btnBuy.target.data == null)
|
|
|
+ if (item.target.data == null)
|
|
|
{
|
|
|
- item.m_btnBuy.target.onClick.Add(() =>
|
|
|
+ item.target.onClick.Add(() =>
|
|
|
{
|
|
|
RechargeSProxy.ReqRecharge(itemData.id).Coroutine();
|
|
|
});
|
|
|
}
|
|
|
- item.m_btnBuy.target.data = index;
|
|
|
+ item.target.data = index;
|
|
|
item.m_txtName.text = string.Format("{0}{1}", itemData.itemNum, itemData.name);
|
|
|
item.m_txtDesc.text = string.Format("首充赠送+{0}{1}", itemData.itemNum, itemData.name);
|
|
|
bool isDouble = RechargeDataManager.Instance.GetRechargeBuyNumById(itemData.id) < itemData.doubleTimes;
|
|
@@ -221,24 +221,20 @@ namespace GFGGame
|
|
|
item.m_btnBuy.m_txtTitle.text = cfg.costNum.ToString();
|
|
|
bool isSellOut = cfg.maxLimit > 0 && cfg.maxLimit - RechargeDataManager.Instance.GetExchangeBuyNumById(cfg.id) <= 0;
|
|
|
item.m_c1.selectedIndex = isSellOut ? 1 : 0;
|
|
|
- if (item.m_btnBuy.target.data == null)
|
|
|
+ if (item.target.data == null)
|
|
|
{
|
|
|
- item.m_loaBuy.onClick.Add(() =>
|
|
|
+ item.target.onClick.Add(() =>
|
|
|
{
|
|
|
if (isSellOut)
|
|
|
{
|
|
|
PromptController.Instance.ShowFloatTextPrompt("已售罄");
|
|
|
return;
|
|
|
}
|
|
|
- });
|
|
|
- item.m_btnBuy.target.onClick.Add(() =>
|
|
|
- {
|
|
|
- if (isSellOut) return;
|
|
|
ViewManager.Show<ItemExchangeView>(cfg.id);
|
|
|
});
|
|
|
}
|
|
|
ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(cfg.itemId);
|
|
|
- item.m_btnBuy.target.data = cfg.id;
|
|
|
+ item.target.data = cfg.id;
|
|
|
item.m_btnBuy.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(cfg.costId).res);
|
|
|
item.m_txtName.text = itemCfg.name;
|
|
|
item.m_txtDesc.text = string.Format("剩余:{0}", cfg.maxLimit - RechargeDataManager.Instance.GetExchangeBuyNumById(cfg.id));
|