28 lines
1.1 KiB
JavaScript
28 lines
1.1 KiB
JavaScript
import pages from "@/pages"
|
|
export default {
|
|
async goBack(didBack) {
|
|
// const isDoBack = didBack !== undefined && didBack !== null && didBack !== '' ? didBack : true;
|
|
// const tabBar = pages().tabBar
|
|
// let canNavBack = getCurrentPages();
|
|
// if (canNavBack && canNavBack.length > 1) {
|
|
// } else {
|
|
// const PATH = new RegExp(canNavBack[canNavBack.length - 1].$route.fullPath)
|
|
// let isBack = true
|
|
// try {
|
|
// await tabBar.list.forEach(element => {
|
|
// const PAGEPATH = new RegExp(element.pagePath)
|
|
// const isTabBar = canNavBack[canNavBack.length - 1].$route.fullPath.slice(1) === element.pagePath
|
|
// if (isTabBar) {
|
|
// isBack = false
|
|
// throw new String("此次history.back返回操作起点页面为tabBar页面")
|
|
// }
|
|
// })
|
|
// } catch (err) {}
|
|
// if (isBack === true && isDoBack === true) {
|
|
// history.back();
|
|
// }
|
|
// return true
|
|
// }
|
|
}
|
|
}
|