fix: 修复苹果返回导航异常

This commit is contained in:
2025-08-26 15:59:57 +08:00
parent b29cb7c0d7
commit db7b2749a9
2 changed files with 10 additions and 3 deletions

View File

@@ -46,6 +46,11 @@
}
},
toBack(){
// 如果定义的有 go 事件,优先处理这个
if( this.$listeners['go'] ) {
this.$emit('go')
return
}
if(this.backUrl!=''){
if(this.backUrl == '/pages/my/index'){
uni.switchTab({
@@ -67,7 +72,6 @@
}else{
uni.navigateBack();
}
}
}
}

View File

@@ -1,7 +1,7 @@
<template>
<!--新的课程学习页面没有中间的详细页面了课程点过来就是这个用户未报名就直接报名-->
<view>
<page-title :showBack="true" :sticky="true">视频详情</page-title>
<page-title :showBack="true" :sticky="true" @go="goBack">视频详情</page-title>
<watermark></watermark>
<u-toast ref="messager"></u-toast>
<!-- <page-title :showBack="true"></page-title> -->
@@ -1823,6 +1823,9 @@
},
showMore(){
this.articleMore=false;
},
goBack(){
history.go(-1)
}
}
}