uni-app类似于router-link标签的页面路由跳转

一、navigator标签:

<navigator url="/pages/agreement/BuyAgreement" open-type="navigate"></navigator>

 

 

二、@tap事件跳转:

<view @tap="openinfo">tap事件跳转</view>

<script>
methods: {
           openinfo(e) {
                console.log(e)
                var newsid = e.currentTarget.dataset.newsid ;    
                uni.navigateTo({
                    url: '../info/info?newsid='+newsid,
                    success: res => {},
                    fail: () => {},
                    complete: () => {}
                });
            }
}
</script>

 

posted @ 2020-09-12 13:27  最爱小虾  阅读(2473)  评论(0编辑  收藏  举报