problem description
there are a lot of TypeEroor errors, which feels like an error in front-end vue rendering, but I am a vue rookie and don"t know how to handle it.
the environmental background of the problems and what methods you have tried
the front end requests all the categories and the information in the shopping cart. You can see the classified data allMenuLabel and shopping cart product information good_lists.
TypeError:
- TypeError: response.data.forEach is not a function
- TypeError: Cannot read property "id" of null.
- vue.common.js:1743 TypeError: Cannot read property "id" of undefined
TypeError
8:
allMenuLabel2property "id" of null:
TypeError3(property "id" of undefined)
in the vue plug-in (vue Devtools).
what result do you expect? What is the error message actually seen?
at the beginning of development (local environment), the data can still be displayed, but I don"t know if I switched to the remote server and found that it was wrong, changed to the local environment, or could not be displayed. I was worried about the impact of the original data, so I emptied the data of the shopping cart and added some data. It still didn"t work. I began to wonder if my vue version was wrong.
I have done tests on other pages, all due to rendering errors or assignment reasons. The back-end data has been brought in, but it is not possible to parse. I hope the experienced seniors will give me some advice! I"m much obliged!