我正在为我的应用程序使用 angular 4.2.6。我有这样的服务
checkStaff(email: any) {
return this._http.post(this.url + "/Impsapi/getStaff", JSON.stringify(email)).map(
(resp) => resp
)
}
checkStaff(email:any){ return this._http.post(this.url+"/Impsapi/getStaff",JSON.stringify(email)).map( (resp)=> resp )
}
this.loginServ.checkStaff(this.user)
.subscribe(
userData => {
this._return = userData;
console.log(this._return);
}
);
服务器返回 JSON 作为响应。但是当我记录输出时,我得到以下 记录的响应
请我需要使用响应正文中的数据。我无法将 ._body 转换为正确的 json 并用于应用程序。请帮忙