feat:app嵌套h5隐藏头

This commit is contained in:
liu.huiying@ebiz-digits.com
2025-03-14 18:45:51 +08:00
parent 65f1be05a1
commit 144dc28eca
4 changed files with 43 additions and 49 deletions

View File

@@ -29,7 +29,7 @@ router.beforeEach((to, from, next) => {
if (to.query.digitalYiliToken) {
utils.setSessionStorage('xToken', to.query.digitalYiliToken);
}
appBridge.setTitle(to.meta.title as string);
// appBridge.setTitle(to.meta.title as string);
// 设置禁止原生返回
appBridge.takeOverAndroidBack();
// 定义路由是否可以返回的判断
@@ -45,11 +45,9 @@ router.beforeEach((to, from, next) => {
// 添加 Android 返回按钮监听方法
window.onAndroidBack = () => {
if (routerCanGoBack()) {
console.log('h5返回')
router.back();
} else {
console.log('app返回')
callAppGoBack(); // 调用 APP 的返回方法
callAppGoBack();
}
};
next();