Traditional Culture Encyclopedia - Travel guide - UniApp development app guide page

UniApp development app guide page

the guide page of an App is 3-5 beautiful pictures displayed when users open an app for the first time, which is used to inform users of the functions and features of the product. A good guide page will make users more interested in products, which of course reflects the ability of UI design, although many people will quickly slide through it. For developers, how to add these pictures can only be shown when users open the app for the first time.

take the project developed by uniapp as an example: in the onLaunch function, check whether the flag is false. If it is false, jump to the guidance page, where you can set the jump to the home page. Note that it is best to use reLaunch to avoid the user's physical key return; If true, the flag is stored locally. This is the principle; However, in actual development, it will be found that there is a splashscreen phenomenon, so the user's experience is not very good, so the key point lies in this piece. Take uniapp as an example, you need to modify the splash screen settings in the source view of uniapp, change autoclose to false, and call the plus. navigator.closesplash screen method in onLaunch to close the startup diagram by setting a delay time. Delay is set to . In this way, the setting of the startup diagram is ok.

The following method of checking whether to enter the boot page is encapsulated for reference only:

Tip: In many applications, it is found that if the mobile phone itself compares cards, the home page will still appear before the boot page when the user opens the app for the first time. The way to deal with this situation is to set the boot page as the home page by default, that is, in routing management, write the boot page first, and then judge whether to jump to the home page by flag;

The above development of the guide page only provides an idea, and there are many other ways, such as the back-end controlling whether the guide page is displayed or not, and the dynamic changes of the guide page. Of course, the problem itself is not difficult to realize, and the key lies in the problems existing in practical application.