上图4种header都试过了,就是传不过去,醉了,哈哈
post请求后台,@RequestBody接收,对象不是null,但是对象字段全是null,求解?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 }) },
2021-02-22求教大家,帮帮忙,感谢感谢!有没有会的兄弟,。。。
微信小程序cell组件(prop)+form表单的对象嵌套校验如何写呢?{companyName: "1", memberDetailVO: {…}, name: "1", sex: "1", position: "1", …}companyName: "1"email: "1"level: 3memberDetailVO: {address: "1", creationDate: "2021-02-07", staffNumber: "1", listingStatus: 1, postalCode: "1", …}mobile: "1"name: "1"position: "1"sex: "1"wechat: "1"__proto__: Object这是表单的数据,校验时,memberDetailVO 中的字段的rules该如何写呢? 目前的rules是这样的: rules:[ { name:'companyName', rules:{required:true,message:'请填写单位名称'} }, 。。。。。。 现在报这个错误 [form-validator] rule name memberDetailVO not exists. 求教大神!感谢感谢!
2021-02-07