From b29e31721f131e2451a9b11b5a62409a8eb7e75f Mon Sep 17 00:00:00 2001 From: yuping <82253452@qq.com> Date: Fri, 17 Feb 2023 19:47:02 +0800 Subject: [PATCH] =?UTF-8?q?--fix=20=E5=A4=8D=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/learningpath/LearningPath.vue | 24 +++++------------------ src/views/projectcenter/ProjectManage.vue | 7 +++---- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/src/views/learningpath/LearningPath.vue b/src/views/learningpath/LearningPath.vue index 4e5d517c..099351de 100644 --- a/src/views/learningpath/LearningPath.vue +++ b/src/views/learningpath/LearningPath.vue @@ -974,27 +974,13 @@ export default { }; //确认复制 const copyLearnPath = () => { - let obj = { + state.copyModal = false; + state.tableLoading = true; + api.handleLearnPath({ routerId: state.copyPathId, type: 2, - }; - api - .handleLearnPath(obj) - .then((res) => { - if (res.data.code === 200) { - console.log("复制成功", res); - message.destroy(); - message.success("复制成功"); - state.copyModal = false; - getLearnPath(); - } - if (res.data.code === -1) { - message.warning(res.data.msg); - } - }) - .catch((err) => { - console.log("复制失败", err); - }); + }).then(() => {getLearnPath();}) + message.success("复制成功"); }; //显示结束窗口 diff --git a/src/views/projectcenter/ProjectManage.vue b/src/views/projectcenter/ProjectManage.vue index 3eacaf9b..5a6f753d 100644 --- a/src/views/projectcenter/ProjectManage.vue +++ b/src/views/projectcenter/ProjectManage.vue @@ -1355,15 +1355,14 @@ export default { }; //确认复制 const copyProject = () => { + state.copyModal = false; state.tableLoading = true; - api - .handleProject({ + api.handleProject({ projectId: state.copyProjectId, - type: 2, + type: 2 }) .then(() => getTableDate()); message.success("复制成功"); - state.copyModal = false; }; //打开提交审核弹窗 const showReviewModal = (projectId) => {