diff --git a/front/src/router/index.js b/front/src/router/index.js index 9c657ebedbeb71a9cd8cb617a435047e04765c16..3ed855b493a756def722f98eadba205901fae03c 100644 --- a/front/src/router/index.js +++ b/front/src/router/index.js @@ -228,7 +228,7 @@ export const constantRoutes = [ component: () => import('@/views/view/index') }, { - path: ':docId(\\w+)', + path: ':projectId/:docId(\\w+)', name: 'ViewDoc', component: () => import('@/views/view/index') } diff --git a/front/src/views/project/DocTable/index.vue b/front/src/views/project/DocTable/index.vue index 7af5ee82f47f8b295c7b860ab3cc29aeb5fa516f..7f026ba74eea8c0572da944fe0875654c16e93e5 100644 --- a/front/src/views/project/DocTable/index.vue +++ b/front/src/views/project/DocTable/index.vue @@ -113,7 +113,7 @@ 添加接口
- + 预览 修改 diff --git a/front/src/views/view/index.vue b/front/src/views/view/index.vue index 4e3fa35285564458c83c3c2fe0ffb36664075d4d..45fbeb203087aec17fdd93d33b5a899a0f146cb7 100644 --- a/front/src/views/view/index.vue +++ b/front/src/views/view/index.vue @@ -26,12 +26,14 @@ export default { } }, created() { + const projectId = this.$route.params.projectId const docId = this.$route.params.docId this.$nextTick(() => { if (docId) { this.get('/doc/view/detail', { id: docId }, function(resp) { this.load = true const data = resp.data + data.projectId = projectId this.initDocInfo(data) this.item = data this.setTitle(data.name)