let data = new FormData();
data.append("mid", json.id);
data.append("account", json.email);
data.append("pwd", $.md5('234567'));
$.ajax({
type: "post",
url: requestS2BSso() + "SupplierLogin",
data: data,
dataType: "json",
xhrFields: {
withCredentials: true,
},
crossDomain: true,
async: false,
processData: false, // 使数据不做处理
contentType: false,
success(json) {
if (json.state) {
console.log('SupplierLogin',json)
that.menuBarShow('supply',index)
that.$forceUpdate()
} else {
$(".spin-container").hide();
}
},
结果:
set-cookie的值可以拿到。并放在req的cookie上。