我正在尝试的代码
让建议
suggestions = href.indexOf('/register/company/step-two/internship') > -1) {
console.log('here')
cities = axios.get('/get/cities')
.then((response) => {
return response.data.cities
// suggestions.map(city => city.text)
})
.catch(error => console.log(error))
这会返回一个Promise,但我想要数据
我也试过
axios.get('/get/cities')
.then((response) => {
suggestions = response.data.cities
})
.catch(error => console.log(error))
但是没有去,所以对此有任何帮助将不胜感激..