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

How to click the button to switch pages in uniapp

coldplay.xixi
Release: 2020-12-21 17:09:23
Original
7854 people have browsed it

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" : {}
}
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template