2024-01-03 17:34:52 +08:00
|
|
|
import pagesJson from '@/pages.json'
|
|
|
|
|
|
|
|
console.log(pagesJson)
|
|
|
|
|
|
|
|
/** 判断当前页面是否是tabbar页 */
|
|
|
|
export const getIsTabbar = () => {
|
2024-01-09 09:05:26 +08:00
|
|
|
if (!pagesJson.tabBar || !pagesJson.tabBar.list.length) {
|
2024-01-03 17:34:52 +08:00
|
|
|
return false
|
|
|
|
}
|
|
|
|
const pages = getCurrentPages()
|
|
|
|
const currPath = pages.at(-1).route
|
2024-01-09 09:05:26 +08:00
|
|
|
console.log(currPath)
|
2024-01-03 17:34:52 +08:00
|
|
|
return !!pagesJson.tabBar.list.find((e) => e.pagePath === currPath)
|
|
|
|
}
|