this.$http.get("data/cartData.json").then()獲取json數據出錯
cartView: function() {
var _this = this;
this.$http.get("data/cartData.json").then(function(res) {
_this.productList = res.body.result.list;
}).catch(function(res) {
console.log(res);
})
}
|
免責聲明:本內容僅代表回答會員見解不代表天盟觀點,請謹慎對待。
版權聲明:作者保留權利,不代表天盟立場。
|
|
|
|
協議,你的文件是用file協議打開的, 需要用http協議。一般編輯器都會支持創建一個http服務的。 |
|
|
|
|