//参数
const parms = {
"electricPowerParameter":"1,2,3",
"deviceId":[1560005524,1560005525],
"begin":"2022-06-27 00:00:00",
"end":"2022-06-28 00:00:00",
"dataBreakId":2
}
//请求
getDataQuery(qs.stringify(parms))
//接口
export function getDataQuery(params) { //渗透率明细
return request({
url: '/pv/url',
method: 'post',
params //解决0:参数值
})
请求结果:如图
解决办法:
//参数不变
。。。
//请求
getDataQuery(parms)
.then((res) => { })
//接口
export function getDataQuery(params) {
return request({
url: '/pv/url',
method: 'post',
headers: {
"content-type": "application/json" //解决json字符串
},
data:params //解决0:参数值
})
}