今天,我使用Axios写注册的AJAX提交JS,它可以正常的发送请求,但我发现后端完全无法正常接受前端传来的username和password信息,我应该如何修复这个BUG?谢谢。
部分JS代码(jQuery):
var captcha_res_ticket = $.cookie("captcha.res.ticket");var captcha_res_randstr = $.cookie("captcha.res.randstr");var username = $("#inputUsername").val();var email = $("#inputEmail").val();var password = $("#inputPassword").val();var repassword = $("#inputRepassword").val();var agree_user_agreement = $("#agree_user_agreement").is(":checked");var participate_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。
绝地无双
呼啦一阵风
相关分类