At present, there is no reasonable way to solve this problem, because the bottom bar is actually a browser history jump bar, and this is not H5 is Wechat's IOS component.
the address prov
ided on the first floor does not solve the problem, and demo is invalid.
unless Wechat prov
ides jssdk api to communicate with the native.
another idea is to completely turn the current h5 application into a single-page application, all the actions are encapsulated in JS, and all page jumps are ajax content updates to avoid the navigation bar below.
-20180816 updated
you don't quite understand what I'm talking about about a single page. Let me add demo to you
.
https://donsee.cn/demo/noTool.
source code look directly at html
specific JS logic needs to be perfected by everyone. Of course, to make a single-page application, you need to consider performance issues, and dom operations need to pay attention to cleaning up invalid dom
.
you deserve it! https://blog.csdn.net/gaofei8.
has just found a solution, all links jump to use window.location.replace ('url'); In this way, Wechat's browser will not have a history record, and it can effectively hide the white bar
which appears at the bottom. Hello, have you solved this problem? I also have this problem now, please tell me, thank you very much, brother
here is a solution: https://download.csdn.net/dow.
if it is a long page, use this code to automatically hide the bottom column when the user slides the page.
CSS
.page {
position: absolute;
left:0;
top:0;
width: 100vw;
height:100vh;
}
HTML
<div class="page">
<!-- -->
</div>
maybe the answer upstairs can help you, but this is not what I want, so I will continue to look for a better solution.
I will ask the stupidest question, is this height fixed? Can't I make an adjustment to this height css?
when you jump to a page in vue using replace, the navigation bar below does not appear, and so should everything else. You can consider recording routing information to sessionStorage, and all jumps go through replace, but it may be troublesome to deal with the back of the page. I hope you can see a better way.
document.body.onclick = function(e) {
if(e.target.tagName.toLowerCase() === 'a') {
e.preventDefault()
window.location.replace(e.target.getAttribute('href'))
}
}
copy the link below and preview it in Wechat browser
http://js.jirengu.com/cusan
does anyone know the solution!
I have recently encountered this problem and figured out a relatively perfect solution. For specific operations, please refer to my article in the brief book: Wechat has a response, let me know. Thank you