diff --git a/test_client/src/api/examtest.js b/test_client/src/api/examtest.js index 1e0b1cc..c106f9c 100644 --- a/test_client/src/api/examtest.js +++ b/test_client/src/api/examtest.js @@ -104,4 +104,11 @@ export function createPaper(data) { method: 'post', data }) +} +export function updatePaper(id, data) { + return request({ + url: `/examtest/paper/${id}/`, + method: 'put', + data + }) } \ No newline at end of file diff --git a/test_client/src/router/index.js b/test_client/src/router/index.js index 768aa95..fd6855c 100644 --- a/test_client/src/router/index.js +++ b/test_client/src/router/index.js @@ -171,6 +171,13 @@ export const asyncRoutes = [ meta: { title: '新建押题试卷', noCache: true, icon: '', perms: ['paper_add']}, hidden: true }, + { + path: 'paper/update', + name: 'UpdatePaper', + component: () => import('@/views/examtest/paperupdate.vue'), + meta: { title: '编辑押题试卷', noCache: true, icon: '', perms: ['paper_update']}, + hidden: true + }, ] }, { diff --git a/test_client/src/views/examtest/papercreate.vue b/test_client/src/views/examtest/papercreate.vue index 035bd4b..3db1968 100644 --- a/test_client/src/views/examtest/papercreate.vue +++ b/test_client/src/views/examtest/papercreate.vue @@ -29,7 +29,7 @@