作者kiey (炼)
看板Ajax
标题[问题] Vue axios post 时参数问题
时间Sun Aug 25 14:24:52 2019
Vue :
let oParams = {
sTest : this.sTest //test test
aTest: this.aTest //[1,2,3,4]
};
this.axios.post('/user/postUser', oParams, oResponse => {
...
});
Server :
sTest = 'test test' 没问题
可是後端收到的
aTest 却是 string "1,2,3,4"
想请问各位先进大大们知道原因吗??
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 218.173.235.198 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Ajax/M.1566714295.A.DAF.html
1F:→ pkro12345: 没parse成json吧 08/25 14:54
2F:→ satanbaby: 你後端的code呢 08/25 22:22