var jsonStr = JSON.stringify(that.data.memberApplyVO)
console.log(jsonStr)
wx.request({
url: 'http://192.168.3.153:8899/health/member/saveMember',
method:"POST",
data:{
memberApplyVO:JSON.stringify(that.data.memberApplyVO)
},
header:{
"Content-Type": "application/json"
// "content-type": "application/json"
// "Content-Type": "application/x-www-form-urlencoded"
// "content-type": "application/x-www-form-urlencoded"
},
success(res){
console.log(res.data)
wx.showToast({
title: '提交成功',
icon: 'success',
duration: 2000
})
},
为什么要JSON.stringify?为什么还要写memberApplyVO?
上图4种header都试过了,就是传不过去,醉了,哈哈
data:{
memberApply:data.memberApplyVO
},
是这样写的data,是个对象