axios({
method: 'post',
url: 'http://localhost:3000/verify',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'text/json'
},
data: {
buyParam: JSON.stringify([{ "goodsId": 5977, "amount": 1 }, { "goodsId": 5978, "amount": 1 }])
}
}).then((res) => {
console.log(res)
})
router.post('/verify', cors(), function(req, res, next) {
console.log(req)
console.log(req.body)
console.log(req.body.buyParam)
res.json(req.body.buyParam);
// res.json({
// code: 0,
// msg: ''
// });
});
req.body.buyParam // undefined
交互式爱情
相关分类