2
4

1 回答 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 回答