<template>
<div>
<v-btn class="red-button next-btn" @click="getData("homepage")">
Continue
</v-btn>
</div>
</template>
<script>
export default {
data: function() {
return {
series: []
}
},
methods: {
getData: function (type) {
var that = this;
let url;
let data;
data = { current_page: type, is_worker: true }
url = 'myprofile/user.json'
this.$axios.get(url, { company: data })
.then(response => {
that.series = response.data.series
});
}
}
};
</script>
我正在尝试通过axios get请求传递数据对象,但是参数没有传递给控制器。请帮助我找出问题所在。