Example #1
0
        /// <summary>
        /// 解析出当前值
        /// </summary>
        /// <returns>IResut[].</returns>
        /// <exception cref="System.NotImplementedException"></exception>
        protected override IResut[] ParseCurrentItems()
        {
            var resultList   = new List <IResut>();
            var itemList     = GetItemList(CurrentUrl);
            var activityType = _acvivityEnum.GetType();



            foreach (var item in itemList)
            {
                var dic = GetInformationByJson(item);



                IResut resut = new Resut()
                {
                    { "itemId", dic["itemId"] },
                    { "title", dic["title"] },
                    { "reservePrice", dic["reservePrice"] },
                    { "discountPrice", dic["discountPrice"] },
                    { "discount", dic["discount"] },
                    { "currentSellOut", dic["currentSellOut"] },
                    { "quantity", dic["quantity"] },
                    { "currentQuantity", dic["currentQuantity"] },
                    { "activityStartTime", dic["activityStartTime"] },
                    { "activityEndTime", dic["activityEndTime"] },
                    { "shopId", dic["shopId"] },
                    { "shopName", dic["shopName"] },
                    { "type", _acvivityEnum.ToString() }
                };



                resultList.Add(resut);
            }

            return(resultList.ToArray());
        }
Example #2
0
        /// <summary>
        /// ParseCurrentItems
        /// </summary>
        /// <returns></returns>
        protected override IResut[] ParseCurrentItems()
        {
            var resultList   = new List <IResut>();
            var itemList     = GetItemList(CurrentUrl);
            var activityType = _acvivityEnum.GetType();



            foreach (var item in itemList)
            {
                var dic = GetInformationByJson(item);


                IResut resut = new Resut()
                {
                    { "title", dic["title"] },
                    { "description", dic["description"] },
                    { "itemId", dic["itemId"] },
                    { "ostimeText", dic["ostimeText"] },
                    { "leftTime", dic["leftTime"] },
                    { "totalStock", dic["totalStock"] },
                    { "soldAmount", dic["soldAmount"] },
                    { "itemUrl", dic["itemUrl"] },
                    { "actPrice", dic["actPrice"] },
                    { "origPrice", dic["origPrice"] },
                    { "discount", dic["discount"] },
                    { "type", _acvivityEnum.ToString() }
                };



                resultList.Add(resut);
            }

            return(resultList.ToArray());
        }