Home > Article > Web Front-end > uniapp removes startup page
With the development of the mobile application market, users are paying more and more attention to the experience of using mobile applications. The startup page, as one of the entrances to the application, also needs to be optimized as much as possible to reduce loading time and improve user experience. For applications developed using uniapp, it is also possible to remove the startup page. This article will introduce how to remove the startup page in uniapp.
1. What is the uniapp startup page?
Before introducing how to remove the uniapp startup page, you first need to understand what the uniapp startup page is. The uniapp startup page refers to an interface with the application icon and name that appears on the mobile phone interface when the application is opened. Generally speaking, there are two situations:
2. Why should we remove the uniapp startup page
Although the startup page can improve the quality and user experience of the application, in some cases, we also need to remove the startup page. The following are Some typical examples:
3. How to remove the uniapp startup page
If you decide to remove the uniapp startup page, what should you do? Two implementation methods are introduced below, as follows:
On the Android platform, we can modify uni- app framework source code to remove the startup page. The specific steps are as follows:
module. exports = { // ... configureWebpack: { plugins: [ // 去掉Uni-app默认的启动页 new RemoveWebpackPlugin([/^/?__uni__default/]) ] } }
On the iOS platform, we can remove the startup page by calling the API encapsulated by uni-app:
plus.navigator.launchWebview( "", "com.dcloud.uniapp", {}, { "uni-app": true, splash: 'none', }, // 启动参数为界面id (e) => { // 执行你想执行的方法 }, (e) => { // 错误处理 } );
Through the above two methods, you can easily remove the startup page of uniapp.
4. Summary
The startup page is an important part of the application, which can improve the quality and user experience of the application. However, there are also some situations where the startup page needs to be removed. This article introduces how to remove the startup page from uniapp. There are two implementation methods, I hope it will be helpful to you. If you have questions about other issues with uniapp, you can go to the uniapp official website or the community for help.
The above is the detailed content of uniapp removes startup page. For more information, please follow other related articles on the PHP Chinese website!