/// <summary> /// 获取店铺详情页面 /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult Detail(int id) { var model = StoresAccess.GetStoresDetail(id); ViewBag.store = model; ViewBag.BrandModel = BrandList.GetModel(model.brand); ViewBag.brand = ViewBag.BrandModel.Py; var request = new StoreSearchRequest { City = model.city, Brand = ViewBag.BrandModel.Py, PageSize = 4, }; var list = new List <StoreSearchModel>(); var data = StoresAccess.GetStoreList(request); if (data != null && data.Any()) { data = data.Where(x => x.Id != id).Take(request.PageSize).ToList(); list = StoresAccess.ConvertList(data); } ViewBag.List = list; return(View()); }