提交 6199f7ba authored 作者: matian's avatar matian

updates

上级 87f7dadf
...@@ -42,12 +42,13 @@ Vue.prototype.VueEvent = new Vue() ...@@ -42,12 +42,13 @@ Vue.prototype.VueEvent = new Vue()
const before = createBefore() const before = createBefore()
/* 导航守卫 */ /* 导航守卫 */
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
if (to.query.channel_num) {
window.localStorage.setItem('channel_num', to.query.channel_num)
}
await store.dispatch('generateRoutes') await store.dispatch('generateRoutes')
before.update(to, from, next) before.update(to, from, next)
}) })
if (window.location.search.includes('channel_num')) {
window.localStorage.setItem('channel_num', window.location.search.slice(13))
}
window.G.$instance_vue = new Vue({ window.G.$instance_vue = new Vue({
router, router,
store, store,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论