1. json型
request({url: '/msg/message/batch/read',data,method: 'post','content-Type': 'application/json'
})
2. formData数组型
- Content-Type: application/x-www-form-urlencoded
request({url: '/msg/message/batch/read',data,method: 'post',})
3.formData字段重复传型
- 把data换成parmas,再转换一下(和get请求传数组一样)
export const updateReadStatus = params => {return request({url: '/msg/message/batch/read',params,method: 'post',paramsSerializer : function(params) {return qs.stringify(params, { arrayFormat: 'repeat' })}})
}