Explorar o código

搞个默认场景码

任一存 %!s(int64=2) %!d(string=hai) anos
pai
achega
4ff3f19df8
Modificáronse 1 ficheiros con 13 adicións e 0 borrados
  1. 13 0
      src/router/index.js

+ 13 - 0
src/router/index.js

@@ -20,6 +20,19 @@ const routes = [
     path: '/',
     path: '/',
     name: 'Home',
     name: 'Home',
     component: Home,
     component: Home,
+    beforeEnter: ((to, from, next) => {
+      if (!to.query.m) {
+        router.replace({
+          path: '/',
+          query: {
+            m: 'SS-SbPlRnV7Wg',
+          },
+        })
+        location.reload()
+      } else {
+        next()
+      }
+    }),
     children: [
     children: [
       {
       {
         path: 'rule-desc',
         path: 'rule-desc',