Thank You For Your Time!我想將接口都模塊化出來(lái)index-page.vueimport {
getCarList
} from 'api/car.js';
created: function () {
getCarList();
},car.jsexport function getCarList() { let url = domain + '/api/webOldCar/initNominate.action'; this.$http.get(url).then((res) => { console.log(res);
})
}報(bào)錯(cuò)說(shuō)this沒(méi)有定義。我不知道在car.js中,this指向的是什么?也許是vue-resource?
添加回答
舉報(bào)
0/150
提交
取消