Пример #1
0
        public IHttpActionResult GetNotices()
        {
            var res = new ResponseBase();

            try
            {
                var service = new WxService();
                var data    = service.GetPromotions(2);

                res.resData = data;
            }
            catch (Exception ex)
            {
                res.code = "100";
                res.msg  = ex.Message;
            }
            return(Ok(res));
        }
Пример #2
0
        public IHttpActionResult GetPromotionsTop(int type = 0, int?top = null)
        {
            var res = new ResponseBase();

            try
            {
                var service = new WxService();
                var data    = service.GetPromotions(type, top);

                res.resData = data;
            }
            catch (Exception ex)
            {
                res.code = "100";
                res.msg  = ex.Message;
            }
            return(Ok(res));
        }