Home  >  Article  >  Web Front-end  >  How to click the button to switch pages in uniapp

How to click the button to switch pages in uniapp

coldplay.xixi
coldplay.xixiOriginal
2020-12-21 17:09:237818browse

Uniapp clicks the button to switch the page: use the carousel page, the code is [methods:{gotoLunBo(){uni.navigateTo({url: 'test?id=1&name=uniapp'}}] .

How to click the button to switch pages in uniapp

The operating environment of this tutorial: windows7 system, uni-app2.5.1 version, this method is suitable for all brands of computers.

Recommended ( Free): uni-app development

uniapp method of clicking the button to switch pages:

<view class="" @tap="gotoLunBo">
    去轮播页
</view>
// 
methods:{
    gotoLunBo(){
        uni.navigateTo({
            // url: &#39;test?id=1&name=uniapp&#39;  c传递参数
            url:"/pages/banpaiindex/banpaiindex"
        })
    }
},
//路径注意就行了
{
    "path" : "pages/banpaiindex/banpaiindex",
    "style" : {}
}

How to click the button to switch pages in uniapp

The above is the detailed content of How to click the button to switch pages in uniapp. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn