34 lines
455 B
Vue
34 lines
455 B
Vue
<template>
|
|
<div>
|
|
<p>{{ msg }}</p>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import axios from 'axios';
|
|
|
|
export default {
|
|
name: 'HelloWolrd',
|
|
data() {
|
|
return {
|
|
msg: '',
|
|
};
|
|
},
|
|
methods: {
|
|
getMessage() {
|
|
axios.get('/months')
|
|
.then((res) => {
|
|
this.msg = res.data;
|
|
})
|
|
.catch((error) => {
|
|
console.error(error);
|
|
});
|
|
},
|
|
},
|
|
created() {
|
|
this.getMessage();
|
|
},
|
|
};
|
|
</script>
|
|
|