“errMsg“:“navigateTo:fail page \“pages/realTime/\“ is not found“

Problem : WeChat applet uses bindtap click event to report error "errMsg": "navigateTo:fail page "pages/realTime/" is not found", and the parameter is used to
solve : it is because the click event and parameters are in the parent label, which is used e.target.datasetGet the parameters, accidentally click the child label,

When the click event is set on the parent component and data- is used to pass parameters, the parameters can be obtained by normal clicking on the parent component target and currentTarget, but the click event will also occur when the child label is clicked. The target gets the data- on the child. Parameters; currentTarget gets the parameters passed by the parent tag data-.
target:currentTarget:
Official website explanation: Connect

Guess you like

Origin blog.csdn.net/men_gqi/article/details/114288020