wrote such a method:
//
for(let i=0;i<this.logData.length;iPP){
let address=this.logData[i].id;
this.$http(api_member_ship_department,address)
.then(res => {
//
this.logData[i].apr=res;
})
.catch(code => {
this.$message({ type: "error", message: code.message || code });
});
};
roughly means to request everyone"s department information from the background and add it as an apr attribute to the existing object logData,. The added logData output looks like this:
then I loop out the attribute value of each apr:
for(let i=0;i<this.logData.length;iPP){console.log(this.logData[i].apr)}
the result is all undefined, which makes me puzzled. I ask God for advice