I want to modularize all the interfaces
index-page.vue
import {
getCarList
} from "api/car.js";
created: function () {
getCarList();
},
car.js
export function getCarList() {
let url = domain + "/api/webOldCar/initNominate.action";
this.$http.get(url).then((res) => {
console.log(res);
})
}
error report that this is not defined. I don"t know what this points to in car.js. Maybe it"s vue-resource?.
< hr >Thanks for your help!