天天看點

html接口參數傳遞,web api中get參數傳遞

1.一個參數

html接口參數傳遞,web api中get參數傳遞
html接口參數傳遞,web api中get參數傳遞

2.多個參數

html接口參數傳遞,web api中get參數傳遞
html接口參數傳遞,web api中get參數傳遞

3.一個實體對象

var url = ServerIp + ‘/api/food/foodsupply‘;

var ajaxTimeoutTest=$.ajax({

type: "Get",

timeout: 10000,

url: url,

data: {

page: thepage,

order_number: $(‘#search‘).val(),

create_user:dept_name,

beginDate: begin_date,

endDate: end_date,

user_id: localStorage.getItem("userId"),

user_name: localStorage.getItem("realName")

},

[HttpGet]

[Route("foodsupply")]

public IHttpActionResult GetRoomItemList(int? page, int? pageSize, [FromUri]MarkingItemModel model)

原文:https://www.cnblogs.com/yyjspace/p/11653846.html