This time I will show you how to implement the function of returning to the homepage after sharing a page in the WeChat applet. What are the things to note of how to implement the function of returning to the homepage after sharing a page in the WeChat applet, as follows. This is a practical case, let’s take a look at it.
When developing small programs, I found that after a page is shared, it is difficult for users to find the way back to the homepage through the shared page. (The official operation of WeChat is to click the three dots in the upper right corner, which will be displayed below the phone to return to the homepage). Many private solutions are to add a floating Home mark to the page yourself. Today I will share another method. Please look at the .gif below; Have you noticed that there is a return button in the upper left corner? The principle is simple. On the page you want to share, configure your homepage when sharing the configuration, and bring the corresponding parameters, which can be obtained in the onLoad method of the homepage. The code is as follows:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
How to use Vue data monitoring method watch
How to use JS time-sharing function for performance optimization
The above is the detailed content of How to implement the function of returning to the homepage after sharing a page in WeChat mini program. For more information, please follow other related articles on the PHP Chinese website!