get请求
return fetch('https://xxx.xxx.com/xxx.json')
.then(response => response.json())
.then(responseJson => {
this.carList = responseJson.data
console.log(this.carList)
// console.log(this.carList[1].id)
}).catch(error => {
console.log(error)
})
get请求
return fetch('https://xxx.xxx.com/xxx.json')
.then(response => response.json())
.then(responseJson => {
this.carList = responseJson.data
console.log(this.carList)
// console.log(this.carList[1].id)
}).catch(error => {
console.log(error)
})