mpvue is the same as routing page jump back

Today, the mpvue applet encountered a problem

The same route returns the previous page and always refreshes the data as the pageB data id

First of all, the page is refreshed because the method to obtain data should be placed in the mounted life cycle after mounting.
Secondly, the answer is found below,
insert image description hereinsert image description herebut clearing the data here will cause problems.

  1. Image loading problem, this Baidu to the solution img plus v-if
    2... forgot
    , but I use this method to invalid return when the ID is still pageB id

Correct answer here
Insert image description hereinsert image description here
insert image description here

Link: https://github.com/Meituan-Dianping/mpvue/issues/140#issuecomment-403737819

Guess you like

Origin blog.csdn.net/qq_43148113/article/details/90522592