项目需求如图: 2号页面跳转3号页面时用了路由替换
<view class="commitButton" @tap="submitApplication">提交申请
</view>
submitApplication(){
this.jump('/pageCommons/feedback/feedbackSuccess');
},
jump(path
, parmas
) {
this.$Router
.replace({
path
: path
,
query
: parmas
});
},
3号页面返回1号页面:
<view class="backBtn" @tap="getback">关闭
</view>
getback(){
this.$router
.go(-1);
uni
.navigateBack({
delta
: 1
});
}
用了条件编译,H5端用this.$router.go(-1);微信小程序调用底层方法uni.navigateBack