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.
添加回答
举报
0/150
提交
取消