You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
557 B

8 months ago
// 引入路由
import router from '@/router/index'
import pinia from './store'
import { constRouter } from '@/router/module/constRouter'
import useSettingStore from '@/store/module/setting'
const settingStore = useSettingStore(pinia) //重新指向pinia仓储
router.beforeEach((to, from, next) => {
console.log(from)
let index = constRouter[0].children.findIndex((item:any) => {
return to.path.includes(item.path)
});
8 months ago
settingStore.setuseIndex(index)
document.title = `教学一体化-${to.meta.title}`
8 months ago
next()
})