今天,我使用Axios寫注冊的AJAX提交JS,它可以正常的發送請求,但我發現后端完全無法正常接受前端傳來的username和password信息,我應該如何修復這個BUG?謝謝。部分JS代碼(jQuery):varcaptcha_res_ticket=$.cookie("captcha.res.ticket");varcaptcha_res_randstr=$.cookie("captcha.res.randstr");varusername=$("#inputUsername").val();varemail=$("#inputEmail").val();varpassword=$("#inputPassword").val();varrepassword=$("#inputRepassword").val();varagree_user_agreement=$("#agree_user_agreement").is(":checked");varparticipate_in_the_user_experience_program=$("#participate_in_the_user_experience_program").is(":checked");Axios部分代碼:axios({url:'/user/user_registration/php/registration.php',method:'post',timeout:3000,data:{captcha_res_ticket:captcha_res_ticket,captcha_res_randstr:captcha_res_randstr,username:username,email:email,password:password}})Captcha來自我的驗證碼API。
關于Axios的使用問題
UYOU
2019-08-21 13:42:47