ajax中的put请求和post请求传data值的区别

put请求可以传对象

let amount= {
expenseAccountId:this.id,
dressBaseList:[{
purchasePrice:this.changeReimbursement,
sampleDressId:params.row.sampleDressId
}]

post或get请求必须转换为字符串类型

let amount= {
expenseAccountId:this.id,
dressBaseList:[{
purchasePrice:this.changeReimbursement,
sampleDressId:params.row.sampleDressId
}]
 
let data=JSON.stringify(amount)
 
posted @ 2019-07-17 17:35  苏小白啊  阅读(2970)  评论(0编辑  收藏  举报