From 6228985e27a53e1091243ef0e0f95560aa2015b7 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Tue, 28 May 2024 10:16:12 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=A4=B4=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/project/ProjectDetails.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/project/ProjectDetails.vue b/src/views/project/ProjectDetails.vue index 9630331..13e4c0d 100644 --- a/src/views/project/ProjectDetails.vue +++ b/src/views/project/ProjectDetails.vue @@ -125,7 +125,7 @@
- +
From 85f66dde0986b3a1293c5ae699a0b732133c8a92 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Tue, 28 May 2024 17:27:27 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/index.js | 5 +++ src/views/project/ProjectDetails.vue | 54 ++++++++++++++++++---------- 2 files changed, 40 insertions(+), 19 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index db9c688..9d26444 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -7,6 +7,7 @@ export default createStore({ state: { userInfo: {}, projectInfo: {}, + projectError: {}, routerInfo: {} }, getters: {}, @@ -17,6 +18,9 @@ export default createStore({ SET_PROJECT_INFO(state, info) { state.projectInfo = info; }, + SET_PROJECT_ERROR(state,error){ + state.projectError = error; + }, INIT_PROJECT_INFO(state) { if (state.projectInfo.status === -1) { state.projectInfo.stageProcessList.forEach((t) => { @@ -109,6 +113,7 @@ export default createStore({ getProjectInfo(content, { projectId }) { request(PROJECT_PROCESS, { projectId, type: 1 }).then(res => { content.commit("SET_PROJECT_INFO", res.data); + content.commit("SET_PROJECT_ERROR", res); content.commit("INIT_PROJECT_INFO"); }); }, diff --git a/src/views/project/ProjectDetails.vue b/src/views/project/ProjectDetails.vue index 13e4c0d..2045c31 100644 --- a/src/views/project/ProjectDetails.vue +++ b/src/views/project/ProjectDetails.vue @@ -3,8 +3,8 @@
- {{ data.name }} - @@ -13,7 +13,7 @@
-
+
{{ i.stageName }}
@@ -92,11 +92,11 @@ -
{{ data.notice || "暂无公告" }}
+
{{ data?.notice || "暂无公告" }}
-
@@ -125,7 +125,7 @@
- +
@@ -143,9 +143,9 @@
-
-
上次学到:{{ data.lastLearned }}
-
继续学习
+
+
上次学到:{{ data?.lastLearned }}
+
继续学习
@@ -153,7 +153,7 @@
总进度
-
- {{ parseInt((data.totalProgress || 0) * 100) }}% + {{ parseInt((data?.totalProgress || 0) * 100) }}%
@@ -176,7 +176,7 @@
必修进度
-
- {{parseInt(((data.compulsoryProgress || 0) * 100)) }}% + {{parseInt(((data?.compulsoryProgress || 0) * 100)) }}%
@@ -202,7 +202,7 @@
-
+
@@ -212,7 +212,7 @@ - +
@@ -350,7 +350,7 @@