guanchunjie 3 år sedan
förälder
incheckning
c1faadd0da
1 ändrade filer med 61 tillägg och 59 borttagningar
  1. 61 59
      src/components/Header.vue

+ 61 - 59
src/components/Header.vue

@@ -331,68 +331,70 @@ export default {
           },
         ];
         projectList = arr;
-      } else if (list.includes(2000001)) {
-        projectList = JSON.parse(JSON.stringify(this.teacherProList));
-        for (let i = 0; i < list.length; i++) {
-          let code = list[i];
-          if (code == 2000003) {
-            projectList.push({
-              id: 1,
-              name: "教材管理系统",
-              img: "project1-1",
-              selectImg: "project1-1-1",
-            });
-          }
-          if (code == 2000005) {
-            projectList.push({
-              id: 4,
-              name: "考试中心",
-              img: "project5",
-            });
-          }
-        }
       } else {
-        for (let i = 0; i < list.length; i++) {
-          let code = list[i];
-          if (code == 2000002) {
-            projectList.push({
-              id: 0,
-              name: "教学管理系统",
-              img: "project1",
-            });
-          } else if (code == 2000003) {
-            projectList.push({
-              id: 1,
-              name: "教材管理系统",
-              img: "project2",
-            });
-          } else if (code == 2000004) {
-            projectList.push({
-              id: 2,
-              name: "教师培训中心",
-              img: "project3",
-            });
-          } else if (code == 2000005) {
-            projectList.push({
-              id: 4,
-              name: "考试中心",
-              img: "project5",
-            });
-          } else if (code == 2000006) {
-            projectList.push({
-              id: 3,
-              name: "教研中心",
-              img: "project4",
-            });
+        if (list.includes(2000001)) {
+          projectList = JSON.parse(JSON.stringify(this.teacherProList));
+          for (let i = 0; i < list.length; i++) {
+            let code = list[i];
+            if (code == 2000003) {
+              projectList.push({
+                id: 1,
+                name: "教材管理系统",
+                img: "project1-1",
+                selectImg: "project1-1-1",
+              });
+            }
+            if (code == 2000005) {
+              projectList.push({
+                id: 4,
+                name: "考试中心",
+                img: "project5",
+              });
+            }
           }
+        } else {
+          for (let i = 0; i < list.length; i++) {
+            let code = list[i];
+            if (code == 2000002) {
+              projectList.push({
+                id: 0,
+                name: "教学管理系统",
+                img: "project1",
+              });
+            } else if (code == 2000003) {
+              projectList.push({
+                id: 1,
+                name: "教材管理系统",
+                img: "project2",
+              });
+            } else if (code == 2000004) {
+              projectList.push({
+                id: 2,
+                name: "教师培训中心",
+                img: "project3",
+              });
+            } else if (code == 2000005) {
+              projectList.push({
+                id: 4,
+                name: "考试中心",
+                img: "project5",
+              });
+            } else if (code == 2000006) {
+              projectList.push({
+                id: 3,
+                name: "教研中心",
+                img: "project4",
+              });
+            }
+          }
+          projectList.push({
+            id: 6,
+            // Teacher training center
+            name: "个人中心",
+            img: "project7",
+            text: "您收集和购买的所有资源都可以在这里轻松找到。",
+          });
         }
-        projectList.push({
-          id: 6,
-          // Teacher training center
-          name: "个人中心",
-          img: "project7",
-          text: "您收集和购买的所有资源都可以在这里轻松找到。",
-        });
       }
       // 排序
       for (var i = 0; i < projectList.length - 1; i++) {