WeChat Mini Programs production: different view, sharing an array, resulting in repeated data output traversal, what should I do?

this is the first view

view

view0


what I want to make is that when the button is clicked, the content is displayed corresponding to the button.


if there are several view, just store several variables. By default, all of these variables are 0

.
Menu