uniapp如何实现页面地址跳转
时间:2022-02-11 17:49
uniapp实现页面地址跳转的方法:1、使用navigator标签,代码为【<navigator url="../hello/hello" open-type="navigate">】;2、使用【@tap】事件跳转。 本教程操作环境:windows7系统、uni-app2.5.1版本、thinkpad t480电脑。 推荐(免费):uni-app开发教程 uniapp实现页面地址跳转的方法: 1.navigator 标签 2.@tap事件跳转 相关免费学习推荐:编程视频 以上就是uniapp如何实现页面地址跳转的详细内容,更多请关注gxlsystem.com其它相关文章!<navigator url="../hello/hello" open-type="navigate">
<view class="struct">
I am {{student.age}} yeas old </br>
I have skills such as {{student.skill[0]}},{{student.skill[1]}}
</view>
</navigator>
<view class="uni-list-cell" hover-class="uni-list-cell-hover" v-for="(item,index) in news" :key="index" @tap="openinfo">
<view class="uni-media-list-text-top">{{item.title}}</view>
</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>