axios的post方法接收返回的数据是json数据,所以重定向是不成功的,后端应该响应给axios一个json数据,然后axios来接收执行重定向!
前端代码
后端代码
// 增加页面
@PostMapping("/add")
// 重定向
public ResponseEntity<String> add(Custom custom, String id, String cusName, String cusSex, String cusMobile, String cusAddress,
String rentCarType, String rentCarTime, String returnCarTime,
String payMoney<