catch不到多個(gè)報(bào)錯(cuò)信息兩個(gè)請(qǐng)求都返回了報(bào)錯(cuò)狀態(tài)axios.all([this.getFormData(),this.getFormHead()]).then(axios.spread((fromDataResp,formHeadResp)=>{console.log("成功")})).catch(error=>{console.log(error,'只能打印第二條報(bào)錯(cuò)')})試過這樣也不行axios.all([this.getFormData(),this.getFormHead()]).then(axios.spread((fromDataResp,formHeadResp)=>{console.log("成功")})).catch(axios.spread((fromDataerr,formHeaderr)=>{console.log(fromDataerr)//underfindconsole.log(formHeaderr)//underfind}))有大佬能指點(diǎn)一下嗎???
有沒有人遇到過這個(gè)問題哈!axios.all 多個(gè)請(qǐng)求同時(shí)報(bào)錯(cuò) catch不到求指導(dǎo)!
哆啦的時(shí)光機(jī)
2019-10-16 09:27:14