One of the difficult problems - uniapp generates a white bar at the bottom of the history box

Project problem : uniappH5 is fine on the Android side. When opening it on WeChat, there will be no history white box at the bottom, but when it is opened on the browser, there will be a white box; but on the ios side, when opening the link on WeChat, a white box will appear. And this white box will affect the page layout;

ios opens on WeChat

Open in browser 

 Solution: The reason for this white box is: when your page jumps, the browser saves your historical path, which will cause the above problem; you need to clear the history record to completely avoid it; it cannot be directly controlled Currently, WeChat and various platforms have this adaptation for displaying and hiding white frames, but no direct solution has been found.

uniapp solution code

uni.reLaunch({
			url:'/pages/路径地址'
	})

// All path jumps are implemented using uni.relaunch, so no historical paths will be generated.

 However, some requirements require return, and you can only simulate return, and implement simulated return according to your own project;

When you have a problem with Vue jump; it can also be realized through the current idea, that is, no history record is generated when jumping, which can be perfectly solved

Contributor: I looked for various posts on the Internet, but there was no complete solution. I got the solution idea from a post replied by a netizen. If there are any errors in the article, please feel free to change it @ the original poster.

Guess you like

Origin blog.csdn.net/m0_71071511/article/details/131832928