//点击商品 private void commonItemOnClick(GameObject go) { ItemContainer currentClickGoodsItem = go.GetComponent <ItemContainer>(); uint clickType = clickNavigationType; SysVipMallVo currentClickGoodsVo = BaseDataMgr.instance.GetSysVipMallVo(currentClickGoodsItem.Id, clickType); clickOpenTips(clickType, currentClickGoodsItem.Id, currentClickGoodsVo); }
//点击限购 private void limitTimeItemOnClick(GameObject go) { ItemContainer currentClickGoodsItem = go.GetComponent <ItemContainer>(); uint clickType = (uint)StoreShopConst.GoodType.Limit; SysVipMallVo currentClickGoodsVo = BaseDataMgr.instance.GetSysVipMallVo(currentClickGoodsItem.Id, clickType); clickOpenTips(clickType, currentClickGoodsItem.Id, currentClickGoodsVo); }
//更新每个限购物品 private void updateLimitGoods(Transform item, SysVipMallVo mallVo, LimitGoods limitInfo) { SysItemVo itemVo = BaseDataMgr.instance.GetDataById <SysItemVo>((uint)mallVo.id); Singleton <ItemManager> .Instance.InitItem(item.gameObject, (uint)itemVo.id, ItemType.BaseGoods); item.FindChild("nameLabel").GetComponent <UILabel>().text = itemVo.name; item.FindChild("goldLabel").GetComponent <UILabel>().text = string.Empty + mallVo.curr_price; item.FindChild("limitValueLabel").GetComponent <UILabel>().text = string.Empty + limitInfo.count; }
//更新每个普通物品 private void updateCommonGoods(Transform item, SysVipMallVo mallVo) { SysItemVo itemVo = BaseDataMgr.instance.GetDataById <SysItemVo>((uint)mallVo.id); Singleton <ItemManager> .Instance.InitItem(item.gameObject, (uint)itemVo.id, ItemType.BaseGoods); item.FindChild("nameLabel").GetComponent <UILabel>().text = itemVo.name; item.FindChild("goldValueLabel").GetComponent <UILabel>().text = string.Empty + mallVo.curr_price; setGoodsLimitNumber(mallVo.buy_max, item); setGoodsCostIcon(item); }
//设置当前选中物品 public void setCurrentGoods(uint type, SysVipMallVo vipmallVo, SysItemVo itemVo) { clickType = type; currentGoodsVo = vipmallVo; currentItemVo = itemVo; currentSelectGoods = new SelectedGoods(); currentSelectGoods.id = (uint)vipmallVo.id; currentSelectGoods.type = (ushort)vipmallVo.type; currentSelectGoods.subType = (ushort)vipmallVo.small_type; currentSelectGoods.num = 1; isOpen = true; alertViewGameObject.SetActive(true); alertPlayReverse(); setCurrentGoodsInfo(); setCurretnCostIcon(); Singleton <StoreShopInputView> .Instance.LimitBuyMax = vipmallVo.buy_max; }
private void clickOpenTips(uint clickType, uint id, SysVipMallVo currentClickGoodsVo) { SysItemVo currentClickItemVo = BaseDataMgr.instance.GetDataById <SysItemVo>(id); Singleton <StoreShopAlertView> .Instance.setCurrentGoods(clickType, currentClickGoodsVo, currentClickItemVo); }