|
@@ -136,10 +136,10 @@ namespace GFGGame
|
|
|
_ui.m_txtTime.visible = endTime > TimeHelper.ServerNow();
|
|
|
_ui.m_loaCard.url = iconUrl;
|
|
|
ShopCfg shopCfg = ShopCfgArray.Instance.GetCfg(monthCfg.shopId);
|
|
|
- if(shopCfg.onceShopId > 0)
|
|
|
+ if (shopCfg.onceShopId > 0)
|
|
|
{
|
|
|
//如果配置了首次购买物品,使用特殊id购买
|
|
|
- if(ShopDataManager.Instance.GetGoodsBuyNumById(shopCfg.onceShopId) <= 0)
|
|
|
+ if (ShopDataManager.Instance.GetGoodsBuyNumById(shopCfg.onceShopId) <= 0)
|
|
|
{
|
|
|
shopCfg = ShopCfgArray.Instance.GetCfg(shopCfg.onceShopId);
|
|
|
}
|
|
@@ -160,11 +160,26 @@ namespace GFGGame
|
|
|
_ui.m_btnGet.text = isGot ? "已领取" : "领取";
|
|
|
_ui.m_btnGet.data = monthCfg.type; ;
|
|
|
}
|
|
|
- private void OnBtnBuyCardClick(EventContext context)
|
|
|
+ private async void OnBtnBuyCardClick(EventContext context)
|
|
|
{
|
|
|
GObject obj = context.sender as GObject;
|
|
|
int goodsId = (int)obj.data;
|
|
|
- ShopSProxy.ReqShopBuy(goodsId).Coroutine();
|
|
|
+ bool result = await ShopSProxy.ReqShopBuy(goodsId);
|
|
|
+ if (result)
|
|
|
+ {
|
|
|
+ MonthlyCardPrivilegeCfg privilegeCfg = MonthlyCardPrivilegeCfgArray.Instance.GetCfg(MonthCardPrivilegeType.Privilege1);
|
|
|
+ int[][] itemData = null;
|
|
|
+
|
|
|
+ if (menu2 == ConstStoreSubId.STORE_MONTH_GOLD_CARD)
|
|
|
+ {
|
|
|
+ itemData = new int[][] { new int[] { privilegeCfg.paramsArr[0], privilegeCfg.value1Arr[0] } };
|
|
|
+ }
|
|
|
+ else if (menu2 == ConstStoreSubId.STORE_MONTH_GOLD_CARD)
|
|
|
+ {
|
|
|
+ itemData = new int[][] { new int[] { privilegeCfg.paramsArr[0], privilegeCfg.value2Arr[0] } };
|
|
|
+ }
|
|
|
+ BonusController.TryShowBonusList(itemData);
|
|
|
+ }
|
|
|
}
|
|
|
private async void OnBtnGetClick(EventContext context)
|
|
|
{
|