当前位置:网站首页>Uniapp solves the home page. Click return (mobile phone return key) to jump to the login page

Uniapp solves the home page. Click return (mobile phone return key) to jump to the login page

2022-04-22 06:42:00 Herry brother

** You are using uniapp When writing a small program, I found that after jumping from the login page to the home page , Click the back button on the home page ( Or the physical return key of the mobile phone ) It will appear blank or jump to the login page 
*** Here I summarize two solutions 
1. Case one ( It is also the simplest solution ), I think most people are through **uni.navigateTo** The jump ( as follows ), In this case, you can put 

	uni.navigateTo({
    
		url:'../home/home'     Change it to    
	})

	 uni.reLaunch({
    
		url: '../home/home'
	})
	 It's a perfect solution 
2. The second situation is in your pages.json Start page path in ( Usually the first path ) Should be login Or something , It's not the home page anyway , At this point, you can put the path of the home page in the first , But the disadvantage is that the login page is not displayed or the effect in the transition page is not displayed 

If it helps you , Remember to like it , I wrote all the problems I encountered on it

版权声明
本文为[Herry brother]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220556437955.html