under the guidance of others, modified the problem, before sent the wrong question and did not express clearly, the code is as follows. The left side of the colon can be written like this [ result$ {I} AV
]. The number is obtained by the index, but the one to the right of the colon does not know how to write it, so it is not a variable after splicing. The one on the left side of the colon is in the data initialization data of the page function, and on the right side of the colon is let result1A = [1Magazine 3], which is written in the onload function. You need to pass the value to the corresponding data in the initialization data data of the page function after calculation, and V (view) is added at the end. At present, I"d like to know how to use traversal to write more concise code, because the right side of the colon is not concatenated.
this.setData({
labelAV: labelA,
result1AV: result1A,
result2AV: result2A,
result3AV: result3A,
result4AV: result4A,
result5AV: result5A,
result6AV: result6A,
result7AV: result7A,
result8AV: result8A,
result9AV: result9A
})