Vue的项目里
let __this = this;
let pro = function () {
return new Promise((resolve, reject) => {
let urlGetCarList = domain + '/app/carStatusList.action';
__this.$http.get(urlGetCarList, {
params: {
'dealerId': 'de590792498f11e7ae8200163e003dce',
'beginRow': '0',
'status': '0',
'isShelves': '1'
}
}).then(response => {
let listArr = response.body.object;
resolve(listArr.dataList[1].oldCarId);
});
});
}
pro.then((id) => {
console.log(id);
})
listArr.dataList[1].oldCarId打印的确是获取到的,打印Promise也是有的。
could you please help me, thank you.
UYOU
LEATH
相关分类