for循环请求为什么打印的i一直为3
callback: function (items) { for (var i = 0; i < items.length; i++) { var tonken = wx.getStorageSync('token'); wx.request({ url: 'http://api.hnlzqs.com/list_structure_img_position', // 仅为示例,并非真实的接口地址 method: 'POST', data: { structureImgId: items[i].id }, header: { appId: 'RAw2ahP5lCGUEDv', VERSION: '1.0', token: tonken, 'Content-type': 'application/json;charset=utf-8' // 默认值 }, success(res) { dw(res.data.items); } }) function dw(res){ console.log(i) } } }, |