尝试在Ajax请求体中加入一下语句:
xhrFields: {withCredentials: true},
BTW:
顺带考虑一下后端是否解决跨域问题
对于SpringBoot的后端,可以对Controller加如下注解:
@CrossOrigin(originPatterns = "*", allowedHeaders = "*", allowCredentials = "true", methods = {})
尝试在Ajax请求体中加入一下语句:
xhrFields: {withCredentials: true},
BTW:
顺带考虑一下后端是否解决跨域问题
对于SpringBoot的后端,可以对Controller加如下注解:
@CrossOrigin(originPatterns = "*", allowedHeaders = "*", allowCredentials = "true", methods = {})