when the item function is selected in the check box in WeChat Mini Programs"s shopping cart, you need to get the index of the adjacent element and the parent element
now the console.log is undefined
how can I get the index of adjacent elements and parent elements?
the figure is as follows: