created: function() {
this.getCustomers();//调用方法;
},
watch: {
'$route': 'getCustomers'
},
methods: {
getCustomers: function(){
/*this.$http.get(this.apiUrl)
.then((response) =>{
this.$set('tasks',response.body.data)
})
.catch(function(response){
//console.log(response)
})*/
var that = this;
that.$http.get('/static/api/detail.json', {
params:{
this.title:'10',
}
}).then(function(response){
this.tasks = response.data.shop;
},function(response){
//error
})
}
}