I want to use this in asyncData () in the Nuxt.js project
it is officially said that this
cannot be used in asyncData (), but my business requirement is to send a variable managed by vuex to the server when the page is loaded. The data code is as follows:
asyncData () {
return axios.get("http://lpsdaikuan.com/vloan.php", {params: { address: this.$store.state.ArticleID }})
.then(res => {
return {Articlelist: res.data} //
})
}
this.$store.state.ArticleID