Authored by Rock Zhang

修复变量定义引发的gulp任务警告

@@ -56,21 +56,21 @@ class Inventory extends Base { @@ -56,21 +56,21 @@ class Inventory extends Base {
56 if (data[1] !== '2') { 56 if (data[1] !== '2') {
57 var newdata = _.chunk(data, 17); 57 var newdata = _.chunk(data, 17);
58 for(let l = 0; l < newdata.length; l++) { 58 for(let l = 0; l < newdata.length; l++) {
59 - let data = newdata[l];  
60 - for (let i = 0; i < data.length; i++) {  
61 - if (data[i].length < 2 && i > 2) {  
62 - data[i] = '0' + data[i]; 59 + let item = newdata[l];
  60 + for (let i = 0; i < item.length; i++) {
  61 + if (item[i].length < 2 && i > 2) {
  62 + item[i] = '0' + item[i];
63 } 63 }
64 } 64 }
65 65
66 - retEpc = _.slice(data, 5); 66 + retEpc = _.slice(item, 5);
67 67
68 retData.push({ 68 retData.push({
69 - ant: Number(data[2]),  
70 - rssi: hexToTen(data[3] + data[4], true) / 10, 69 + ant: Number(item[2]),
  70 + rssi: hexToTen(item[3] + item[4], true) / 10,
71 epc: retEpc.join('') 71 epc: retEpc.join('')
72 }); 72 });
73 - retKey = _.slice(data, 0, 1); 73 + retKey = _.slice(item, 0, 1);
74 } 74 }
75 } else { 75 } else {
76 retKey = data; 76 retKey = data;