無法獲取Session中的短信,為null
httpServletRequest.getSession().setAttribute(telphone,otpCode);//保存 String?sessionOtpCode?=?(String)?this.httpServletRequest.getSession().getAttribute(telphone);獲取 號碼是對的
httpServletRequest.getSession().setAttribute(telphone,otpCode);//保存 String?sessionOtpCode?=?(String)?this.httpServletRequest.getSession().getAttribute(telphone);獲取 號碼是對的
2019-04-19
舉報
2019-05-02
$.ajax({
type:"POST",
contentType:"application/x-www-form-urlencoded",
url:"http://localhost:8090/user/login",
data:{
"telphone":$("#telphone").val(),
"password":password,
},
xhrFields: {withCredentials: true},
前端頁面加上?xhrFields: {withCredentials: true},