Created
May 14, 2018 15:16
-
-
Save thefln/18f7cbe10440fab0f6ffac96f4634014 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import butter from '@/buttercms'; | |
import BuyButton from './BuyButton'; | |
export default { | |
name: 'ProductList', | |
components: { | |
BuyButton, | |
}, | |
data() { | |
return { | |
products: [], | |
}; | |
}, | |
methods: { | |
getProducts() { | |
butter.page.list('product') | |
.then((res) => { | |
this.products = res.data.data; | |
}); | |
}, | |
}, | |
created() { | |
this.getProducts(); | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment