예제 #1
0
        public void SetData(ShopModel shopModel, int jumppage = 0)
        {
            _shopModel = shopModel;
            vipTran.SetActive(AppConfig.Instance.SwitchControl.Recharge);
            _giftpackMallList =
                shopModel.GetTargetRmbMallList(MallLabelPB.LabelBestSellers);    //(int)ShopModel.PageIndex.GiftPage
            _vipMallList = shopModel.GetTargetRmbMallList(MallLabelPB.LabelVip); //(int)ShopModel.PageIndex.VipPage
            _gemMallList =
                shopModel.GetTargetGameMallList(MallLabelPB.LabelResources);     //(int)ShopModel.PageIndex.GemPage
            _newPlayerMallList = shopModel.GetTargetRmbMallList(MallLabelPB.LabelNovice);
            _cardShopMallList  = shopModel.GetTargetRmbMallList(MallLabelPB.LabelStar);
            //_goldGameMalllist = shopModel.GetTargetGameMallList(MallLabelPB.LabelGold);//(int)ShopModel.PageIndex.GoldPage
            _buyGemMalllist = shopModel.GetBuyGemRmbMallList;
//            Debug.LogError(_giftpackMallList.Count + " " + _vipMallList.Count + " " + _newPlayerMallList.Count + " " +
//                           _cardShopMallList.Count);
            _costGem          = shopModel.GetMallRefreshGoldCost(shopModel.UserBuyMallInfoPb.GoldRefreshNum + 1);
            _refreshcost.text = _costGem.ToString(); //I18NManager.Get("Shop_CostGem",_costGem);
            if (jumppage != 0)
            {
                _curpage = jumppage;
                RefreshPageData(jumppage);
                SetToggleShow(jumppage);
            }
            else
            {
                RefreshPageData(_curpage != 0 ? _curpage : 0);
            }

            _reddot.SetActive(shopModel.HasFreeGemMall());
            SetVIPState();
        }