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)[代码][代码] [代码][代码]}[代码][代码] [代码] [代码] [代码][代码]}[代码] [代码]},[代码]