import { getCurrentInstance } from '@tarojs/taro'

const pages = require('../pages')

// 深度拷贝
export const deepCopy = x => JSON.parse(JSON.stringify(X))

// 获取当前页面配置
export const getPage = () => {
  const router = getCurrentInstance().router
  return pages.filter(x => router.path.indexOf(x.page) > -1)[0]
}
