methods: { getData() { if(!this.token) { console.log('token is null') return } let tokenBody = { "Content-Type": "application/json", } let itemsArr = [] this.bymbolArr.forEach(async item => { console.log(item) let tokenBody = { 'Content-Type': 'application/json', } let data = await post(Config.getSharesUrl, tokenBody); if (data.RetrieveItem_Response_3) { let dataArr = data.RetrieveItem_Response_3.ItemResponse[0].Item[0].Fields.Field; if(dataArr.length > 0) { var obj = {} let arr = dataArr.forEach( item => { if(item.Double) { obj[item.Name] = item.Double } }) } } let itemObj = {} itemObj[item] = obj console.log('itemibj='itemObj) itemsArr.push(itemObj) }) console.log('itemsArr=' + itemsArr) this.items = itemsArr }
慕沐林林
www说