this.axios.all([this.submitPro(),this.InvitationPro()]).then(this.axios.spread((res1,res2)=>{
console.log(res1)
console.log(res2)
}))
InvitationPro() {
this.axios.post("/api/app/json", {
"header": {
"bizCode": "staff009"
},
"body": {
"beInvitedCode": "100139" //:String :
}
})
},
submitPro() {
this.axios.post("/api/app/json", {
"header": {
"bizCode": "staff003"
},
"body": {
"staffCode": this.info.buyName,
"phoneCode": this.info.verCode,
"captchaCode": this.info.randomCode,
"staffPassword": this.info.lognPsd,
"provinceCode": this.temp.addressCode__province,
"cityCode": this.temp.addressCode__city,
"countyCode": this.temp.addressCode__dist,
"beInvitedCode": this.info.inviteCode
}
})
},
I want the request this.InvitationPro () to be executed first and then this.submitPro (), and then I found that await is not very good at using
.