jiejrijrfr
jiejrijrfr
  • 发布:2020-03-26 13:40
  • 更新:2020-03-26 13:40
  • 阅读:742

mui通过ajax请求get方法时传参不成功

分类:MUI

js:mui.ajax(host + 'api/services/app/Equipment/GetEquipmentInfo', {
dataType: 'json',
contentType: 'application/json',
type: 'get',
headers: {
'Authorization': 'Bearer ' + plus.storage.getItem('Abp.AccessToken')
},
data: JSON.stringify({
'filter': $('#Filter').val(),
'status': status,
'workshop': workshop,
'equipmentGroup': equipmentGroup
}),
timeout: 10000,
success: function(data) {
debugger
if (data.result && data.result.length > 0) {
$('.equipment').empty();
var html = '';
}
},
error: function(data) {
/mui.alert("网络异常,请稍后再试", "提示");
}
})
接口:public List<GetEquipmentInfoOutputDto> GetEquipmentInfo(GetEquipmentInfoInputDto input)
{

    }  

GetEquipmentInfoInputDto:public class GetEquipmentInfoInputDto : PagedAndSortedInputDto, IShouldNormalize
{
public string Filter { get; set; }

    public string Status { get; set; }  

    public string Workshop { get; set; }  

    public string EquipmentGroup { get; set; }  

    public void Normalize()  
    {  

    }  
}  

现在这个接口可以调成功但是参数一直传不进去,不加JSON.stringify、大小写、放在数组里都试过了 都不行

2020-03-26 13:40 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复