123456789101112131415161718192021 |
- import axios from 'axios'
- const getCat = () => {
- return axios.get('https://aws.random.cat/meow').then(res => {
- return { imageSrc: res.data.file }
- })
- }
- const getDog = () => {
- return { data: 'dog' }
- }
- const getGoat = () => {
- return Promise.resolve({ data: 'goat' })
- }
- export default {
- getDog,
- getCat,
- getGoat
- }
|