ashamed, ashamed, the same problem, slightly change the conditions, suffering, can always abuse me over and over again
Let"s start with the code, which is the processing in the parent request, where the parent request waits for the return result of the child request, and then executes the following
..then( async (response) => {
if (response.data.code === "200") {
console.log("ID:", response.data.msg);
const id = response.data.msg;
Notice.success({
title: ":",
desc: ""
});
router.push({path: "/ai/" + id + ""});
} else if (response.data.code === "402") {
//axios
const result = await AuthenticationApi.getToken();
console.log("write_article result:", result);
if (result) {
this.write_article(ArticleTitle, ArticleContent, ArticleLabel, origin_link)
} else {
console.log(" write_article ?????? what the fuck ???????")
}
} else {
console.log("write_article else info :", response)
}
})
the result I want is to wait for the AuthenticationApi.getToken () child request to return true, and then re-execute the parent request, but the result is