problem description
data problems of using ajax to request data in vue
the environmental background of the problems and what methods you have tried
related codes
/ / Please paste the code text below (do not replace the code with a picture)
/ / send a request to a third party after success
for(var i in listIn){
var arr = listIn[i].key;
console.log(arr)
$.ajax({
type:"post",
url: listIn[i].url,
async: false,
data:{ arr : res.data.content.token},
dataType:"jsonp",
success:function(result){
console.log(result);
keep();
},
error: function(err){
console.log(err)
keep();
}
});
}
var listIn = [
{
url: shimingPersonIn,
key: "cookieValue"
},
{
url: shimingUnitIn,
key: "cookieValue"
},
{
url: coprApplyLogin,
key: "copyRighCookie"
}
]
what result do you expect? What is the error message actually seen?
the arr in this data cannot get the value assigned above, so try to solve
.