(Added in: v7.8.0)
"devDependencies": {
"@babel/core": "^7.14.3",
methods: {
async getProductData() {
await this.axios
.get('http://church/wp-json/wp/v2/news?slug=' + this.$route.params.slug)
.then(response => this.currentProductData = response.data);
},
getMediaUrls() {
this.currentProductData[0].acf.photos.forEach(el => {
this.media.readyURLs.push(el.photo);
})
}
},
async created() {
await this.getProductData();
},
mounted() {
this.getMediaUrls();
},