CountPrice:function(){
// GET /someUrl
this.$http.get('CardboardPrice.json').then((response) => {
alert(1);
}, (response) => {
// error callback
});
}
浏览器支持本地ajax。可以弹出1。
问:获取的json的如何进行处理,response 只显示对象。
CountPrice:function(){
// GET /someUrl
this.$http.get('CardboardPrice.json').then((response) => {
alert(1);
}, (response) => {
// error callback
});
}
浏览器支持本地ajax。可以弹出1。
问:获取的json的如何进行处理,response 只显示对象。
10 回答11.1k 阅读
6 回答3k 阅读
5 回答4.8k 阅读✓ 已解决
4 回答3.1k 阅读✓ 已解决
2 回答2.6k 阅读✓ 已解决
2 回答4.7k 阅读✓ 已解决
4 回答4.3k 阅读✓ 已解决
官方有比较详细的对
response
的介绍,https://github.com/vuejs/vue-...你的问题我不太明白,猜测应该是如何获取响应的
data
吧,取response.body
就行。