Explorar o código

fix: 移动端首页跳转内容页

zhangyuhan %!s(int64=4) %!d(string=hai) anos
pai
achega
2363ae4bdd

+ 1 - 1
jydocs-mobile/src/router/modules/main.ts

@@ -24,7 +24,7 @@ export default [
     }
   },
   {
-    path: '/details',
+    path: '/details/:id',
     name: 'details',
     component: () => import(/* webpackChunkName: "test" */ '@/views/details/details.vue'),
     meta: {

+ 6 - 1
jydocs-mobile/src/views/Home.vue

@@ -133,7 +133,12 @@ export default class extends Vue {
     }
 
     goContent (item: any) {
-      console.log(item)
+      this.$router.push({
+        name: 'details',
+        params: {
+          id: item.id
+        }
+      })
     }
 }
 </script>