コード例 #1
0
        public ActionResult GetCommodityInfoMain(string id)
        {
            string key          = HotelCloud.Common.HCRequest.GetString("key");//"酒店微信id@用户微信id"
            string weixinid     = HotelCloud.Common.HCRequest.GetString("weixinID");
            string userweixinid = HotelCloud.Common.HCRequest.GetString("userweixinID");
            string MallSearch   = HotelCloud.Common.HCRequest.GetString("MallSearch");
            string type         = HotelCloud.Common.HCRequest.GetString("type");
            string sort         = HotelCloud.Common.HCRequest.GetString("sort");
            string price        = HotelCloud.Common.HCRequest.GetString("price");
            string selectCity   = HotelCloud.Common.HCRequest.GetString("selectCity");
            string cityName     = HotelCloud.Common.HCRequest.GetString("cityName");
            string subitem      = HotelCloud.Common.HCRequest.GetString("subitem");
            int    curpage      = HotelCloud.Common.HCRequest.getInt("curpage");
            int    pagesize     = HotelCloud.Common.HCRequest.getInt("pagesize");
            int    dataCount    = HotelCloud.Common.HCRequest.getInt("dataCount");

            if (pagesize < 1)
            {
                pagesize = 6;
            }
            if (!key.Equals("") && key.Contains("@"))
            {
                weixinid     = key.Split('@')[0];//酒店微信id
                userweixinid = key.Split('@')[1];
            }
            DataTable commodityDataTable = CommodityService.GetCommodityListMain(sort, MallSearch, type, price, subitem, selectCity, cityName, curpage, weixinid, id, false, ref dataCount, pagesize);

            return(Json(new
            {
                dataCount = dataCount,
                data = SerializeDataTable(commodityDataTable)
            }, JsonRequestBehavior.AllowGet));
        }