Talk is cheap,Show me the code.
.cshtml
let pdata = { "weight": 50, "origin": originSel.value, "destination": destinationSel.value };
let r = await axios.post("/search?handler=list" , pdata).catch(() => null);
console.log(r);
.cs 注意参数要加【FromBody】,get的话 OnGetList
public ActionResult OnPostList([FromBody]Ly.Model.FromBody.SearchRequestInfo requestInfo)
{
var list = _priceService.Search(requestInfo.Origin,requestInfo.Destination,requestInfo.Weight);
return new JsonResult(list);
}