console.log(ren.result.list)//[{xingming: "SS",…}, {xingming: "XX"…}, {…}]这种形式的数组
for (var i = 0; i < 2; i++) {
for (var j = i; j < Math.floor(ren.result.list.length); j=j+2) {
console.log(i,j)//首次打印 0 0
this.data.numl[0] = ren.result.list[j].renyuan[0]
console.log(ren.result.list[j].renyuan[0])//{xingming: "SS", gw: 0, rw: "0"}数组中第一项
console.log(this.data.numl)//[{…}]0: {xingming: "XX", gw: 0, rw: "0"}数组中第二项,被赋值和赋值项不同,
}
this.data.num[i] = this.data.numl
}
在循环外直接写,不会出错
this.data.numl[0] = ren.result.list[0].renyuan[0]