[問題] Vue axios post 時參數問題

看板Ajax作者 (煉)時間4年前 (2019/08/25 14:24), 編輯推噓0(002)
留言2則, 2人參與, 4年前最新討論串1/1
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://www.ptt.cc/bbs/Ajax/M.1566714295.A.DAF.html

08/25 14:54, 4年前 , 1F
沒parse成json吧
08/25 14:54, 1F

08/25 22:22, 4年前 , 2F
你後端的code呢
08/25 22:22, 2F
文章代碼(AID): #1TOYctsl (Ajax)