import { getGlobalData } from '@/store/index.js' const back = () => { const pages = getCurrentPages() if (pages.length === 1) { uni.reLaunch({ url: '/pages/workbench/index' }) } else { uni.navigateBack() } } const push = (a, b) => { let routeList = getGlobalData('route') let type = b || 1 if (type === 1) { uni.navigateTo(a) } } export const router = { back, push }