没有报错
//这只前端 的
<script type="text/javascript">
function getCartList() {
debugger
var token=localStorage.getItem("login-user");
location.href="http://localhost/shop-car/carController/getUserCarList?token="+token;
}
这是前端接口返回的数据
只是返回这个
这是后端java代码
@RequestMapping("/getUserCarList")
@LoginUser
public String getUserCarList(@CookieValue(name = ShopConstants.ANON_ID,required = false) String anonId, User user, Car car, HttpServletResponse response, Model model){
List<Car> carList=null;
EntityWrapper entityWrapper=new EntityWrapper();
entityWrapper.eq("uid",user.getId());
carList=carService.selectList(entityWrapper);//查当前用户的
System.out.println(carList+"x22xxxxxxx");
BigDecimal totalPrice=findCarGoodsInfo(carList);
model.addAttribute("carList",carList);
model.addAttribute("totalPrice", totalPrice);
System.out.println("3333333333333333333333333333333");
// return "redirect:/carList.html";
return "carList";//没有跳转页面
// return new ModelAndView("carList.html");
}
页面没有跳转哪里错了呢 试了好几种就是没有成功