当前位置:网站首页>mui 关闭其他页面,只保留首页面
mui 关闭其他页面,只保留首页面
2022-04-23 13:04:00 【孤身不觉晚】
这个可以用于mui打开很多子页面时,直接返回首页面…
var wvs = plus.webview.all(); //所有窗口对象
var launch = plus.webview.getLaunchWebview(); //首页窗口对象
var self = plus.webview.currentWebview(); //当前窗口对象
var appid = plus.webview.getLaunchWebview().id //首页窗口id
for(var i = 0, len = wvs.length; i < len; i++) {
// 首页以及当前窗口对象,不关闭;
if(wvs[i].id == appid || wvs[i].id == 'nav_footer.html' || wvs[i].id == 'index.html' || wvs[i].id == 'check_content.html' || wvs[i].id == 'my.html' || wvs[i].id == 'HBuilder') {
//选定某一页不关wvs[i].id === localStorage.homeWebId
continue;
} else {
wvs[i].close('none'); //关闭中间的窗口对象,为防止闪屏,不使用动画效果;
}
} // 此时,窗口对象只剩下首页以及当前窗口,直接关闭当前窗口即可;
版权声明
本文为[孤身不觉晚]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_40043424/article/details/102851563
边栏推荐
- HQL find the maximum value in a range
- Get the punch in record of nailing attendance machine
- AUTOSAR from introduction to mastery 100 lectures (87) - key weapon of advanced EEA - AUTOSAR and DDS
- melt reshape decast 长数据短数据 长短转化 数据清洗 行列转化
- Synchronously update the newly added and edited data to the list
- 100 GIS practical application cases (52) - how to keep the number of rows and columns consistent and aligned when cutting grids with grids in ArcGIS?
- Summary of JVM knowledge points - continuously updated
- 将新增和编辑的数据同步更新到列表
- SQL exercise question 1
- Start mqbroker CMD failure resolution
猜你喜欢

MySQL -- 16. Data structure of index

mysql8安装

Softbank vision fund entered the Web3 security industry and led a new round of investment of US $60 million in certik

如何实现点击一下物体播放一次动画

Custom nail robot alarm

4. DRF permission & access frequency & filtering & sorting

PC starts multiple wechat at one time

CVPR 2022&NTIRE 2022|首个用于高光谱图像重建的 Transformer
![Packet capturing and sorting -- TCP protocol [8]](/img/ae/4957a997af725a1bf3f61cb24fc717.png)
Packet capturing and sorting -- TCP protocol [8]

22. Bracket generation
随机推荐
No idle servers? Import OVF image to quickly experience smartx super fusion community version
Customize classloader and implement hot deployment - use loadclass
CVPR 2022&NTIRE 2022|首个用于高光谱图像重建的 Transformer
产品开发都应该知道的8个网站,增强工作体验
HQL statement tuning
Servlet监听器&过滤器介绍
AUTOSAR from introduction to mastery 100 lectures (83) - bootloader self refresh
How to click an object to play an animation
The accuracy and speed are perfectly balanced, and the latest image segmentation SOTA model is released!!!
Proteus 8.10 installation problem (personal test is stable and does not flash back!)
Synchronously update the newly added and edited data to the list
「玩转Lighthouse」轻量应用服务器自建DNS解析服务器
(personal) sorting out system vulnerabilities after recent project development
Packet capturing and sorting -- TCP protocol [8]
Pytorch: a pit about the implementation of gradreverselayer
Go language slicing operation
Design of STM32 multi-channel temperature measurement wireless transmission alarm system (industrial timing temperature measurement / engine room temperature timing detection, etc.)
CVPR 2022 & ntire 2022 | the first transformer for hyperspectral image reconstruction
MySQL -- 16. Data structure of index
Use Proteus to simulate STM32 ultrasonic srf04 ranging! Code+Proteus