axios用post发送多条数据(添加模块) let params = new URLSearchParams(); params.append("hotel_Name",values.hotel_Name) params.append("hotel_Star",values.hotel_Star) params.append("hotel_Room",values.hotel_Room) params.append("hotel_Type",values.hotel_Type) params.append("hotel_People",values.hotel_People) params.append("people_Card",values.people_Card) params.append("hotel_Phone",values.hotel_Phone) params.append("hotel_Address",values.hotel_Address) params.append("hotel_Time",values.hotel_Time) params.append("hotel_Ps",values.hotel_Ps) axios({ url:"/api/addhotel", method: "post", data:params }) .then((res)=>{ console.log(res) }) })