问问题
38 次
1 回答
2
You need to wait for response, try:
async getStory() {
await axios
.get('https://api.coindesk.com/v1/myApi')
.then((response) => (this.reqData = response.data.content))
.catch((error) => console.log('error SMS', error));},
},
async mounted() {
await this.getStory();
},
于 2021-10-25T08:58:34.127 回答