Vue的項(xiàng)目里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.
Promise調(diào)用then()出錯(cuò)
慕尼黑8549860
2019-03-13 13:15:52