javascript - for loop traversal assignment fails
某草草
某草草 2017-05-16 13:18:40
0
1
664

The desired effect is to select a specific location in the table to display data. Originally, there were only two places with data, but as a result, the entire column was assigned values

Loop body

$scope.dateList data structure

Background incoming data structure

Front desk style display

What I want to ask is which step of the assignment in the for loop went wrong, thank you

某草草
某草草

reply all(1)
小葫芦

你在第三层循环的时候,J的值一直没变,shopID的值是固定的,所以取到的都是第二层循环中满足if条件的dispachesList中一个固定的shopid;循环写的有问题,你就是整个赋值了,你可以debug一步步调试一下试试

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template