We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6514da commit 18c181eCopy full SHA for 18c181e
src/router/index.js
@@ -7,7 +7,7 @@ import config from '../config';
7
8
Vue.use(Router);
9
10
-export default new Router({
+const router = new Router({
11
routes: [
12
{
13
path: '/',
@@ -29,3 +29,23 @@ export default new Router({
29
},
30
],
31
});
32
+
33
+router.beforeEach((to, from, next) => {
34
35
+ if ((from.query.auth_token && !to.query.auth_token)
36
+ || (from.query.uid && !to.query.uid)){
37
+ if (from.path === to.path) {
38
+ next(false);
39
+ } else {
40
+ next({
41
+ path: to.path,
42
+ query: from.query,
43
+ });
44
+ }
45
46
+ next();
47
48
49
+})
50
51
+export default router
0 commit comments