All methods for uniapp to jump to the page

All methods for uniapp to jump to the page

1.switchTab

When refreshing, you need to modify the data, refresh the data, etc.

uni.switchTab({
    
    
		url:"../index/index"
    })

2.navigateBack

Close the current page and return to the previous page or two pages

uni.navigateBack({
    
    
	delta: 1
});

3.navigateTo

Keep the current page and jump to a page within the app

uni.navigateTo({
    
    
	delta: 1
});

4.redirectTo

Close the current page and jump to a page within the app

uni.redirectTo({
    
    
	delta: 1
});

5.switchTab

Jump to the tabBar page and close all other non-tabBar pages

uni.switchTab({
    
    
	delta: 1
});

6.openURL

Link: openURL official website

Call a third-party program to open the specified URL

​methods: {
    
    
    //Lineason()为点击响应事件,可在HTML部分设置 @tap="goopenurl()"
    Lineason(){
    
    
        boid plus.runtime.openURL('https://www.baidu.com/')
    }
}

Guess you like

Origin blog.csdn.net/m0_62496369/article/details/127207257