更新test.html

This commit is contained in:
binaryify 2020-07-03 11:52:27 +08:00
parent 91d997c6c6
commit 25e9206efb

View File

@ -22,6 +22,9 @@
} }
$.ajax({ $.ajax({
url: `http://localhost:${port}/login/cellphone?phone=${phone}&password=${password}`, url: `http://localhost:${port}/login/cellphone?phone=${phone}&password=${password}`,
xhrFields: {
withCredentials: true //关键
},
success: function(data) { success: function(data) {
console.log(data) console.log(data)
$.ajax({ $.ajax({
@ -43,7 +46,8 @@
}) })
axios({ axios({
url: `http://localhost:${port}/login/cellphone?phone=${phone}&password=${password}` url: `http://localhost:${port}/login/cellphone?phone=${phone}&password=${password}`,
withCredentials: true //关键
}).then(function(res) { }).then(function(res) {
console.log(res.data) console.log(res.data)
axios({ axios({