No data for foreach loop

Abnormal: The background can confirm that data can be returned, and the number of data can be seen on the front page, but the data content cannot be displayed normally (as shown in the following figure), and neither the browser nor the console reports error information.


From the code of the circular display data, we can know that the cause of the problem is that the value of var is not consistent with the variable name of the circular data, as shown in the red and yellow labels in the following figure

PS: var represents the variable name of the current entry, which is the alias of the collection to be looped

Solution: Just unify the variable names .

Published 77 original articles · 100 likes · 70,000+ views

Guess you like

Origin blog.csdn.net/super_DuoLa/article/details/103619484