Exemple #1
0
    /// <summary>
    /// 获取服务器限购信息
    /// </summary>
    private void GetBuyLimitByServer()
    {
        if (preGetLimitDay == TimeHelper.GetDateTime(0, 0, 0, 0).Day)
        {
            return;
        }
        preGetLimitDay = TimeHelper.GetDateTime(0, 0, 0, 0).Day;
        listGoodsInfoStruct.Clear();
        CSEmptyPromotionsGoodsInfo csEmptyPromotionsGoodsInfo = new CSEmptyPromotionsGoodsInfo();

        ProtocalManager.Instance().SendCSEmptyPromotionsGoodsInfo(csEmptyPromotionsGoodsInfo, (scPromotionsGoodsInfo) =>
        {
            if (scPromotionsGoodsInfo == null)
            {
                return;
            }
            for (int i = 0; i < scPromotionsGoodsInfo.PromotionsGoods.Count; i++)
            {
                listGoodsInfoStruct.Add(scPromotionsGoodsInfo.PromotionsGoods[i]);
            }
        }, (error) => {});
    }
Exemple #2
0
        public void SendCSEmptyPromotionsGoodsInfo(CSEmptyPromotionsGoodsInfo csemptypromotionsgoodsinfo, Action <SCPromotionsGoodsInfo> ResponseSCPromotionsGoodsInfoCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSEmptyPromotionsGoodsInfo> ();

            ProtoSendMethod.BusinessRequest <SCPromotionsGoodsInfo>(csemptypromotionsgoodsinfo, opCodeType, ResponseSCPromotionsGoodsInfoCallBack, errorCallBack, isShowDefaultTip);
        }