2025-10-15 21:23:19 +08:00
|
|
|
export default ({ app,$cookies,$config, store, $axios }) => {
|
2025-06-28 21:10:52 +08:00
|
|
|
app.router.beforeEach((to, from, next) => {
|
2025-06-29 01:26:10 +08:00
|
|
|
app.i18n.locale = store.state.locale
|
2025-06-28 21:10:52 +08:00
|
|
|
next()
|
|
|
|
|
})
|
2025-10-15 21:23:19 +08:00
|
|
|
app.router.afterEach((to, from) => {
|
|
|
|
|
if (process.client) {
|
|
|
|
|
let data = {
|
|
|
|
|
url: window.location.href,
|
|
|
|
|
equipment: store.state.device,
|
|
|
|
|
}
|
|
|
|
|
if (data.url && data.url !== '') {
|
|
|
|
|
$axios.post('/web/pageSave',data)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-06-28 21:10:52 +08:00
|
|
|
}
|