Browse Source

教学在clever用户下只显示教学、学习中心和个人中心

natasha 7 months ago
parent
commit
bf716f9765
1 changed files with 16 additions and 7 deletions
  1. 16 7
      src/layouts/components/LayoutHeader.vue

+ 16 - 7
src/layouts/components/LayoutHeader.vue

@@ -158,16 +158,25 @@ function getChildSysList() {
     .then(({ child_sys_list }) => {
       if (child_sys_list && child_sys_list.length > 0) {
         const isNotYouth = window.location.origin !== 'https://youthchinesedu.blcup.com';
-        if (isNotYouth) {
-          projectList.value = child_sys_list;
-        } else {
-          let child_sys_list_youth = [];
+        if (Cookies.get('GCLSCode')) {
+          projectList.value = [];
           child_sys_list.forEach((item) => {
-            if (item.key !== 'GCLS-Exercise') {
-              child_sys_list_youth.push(item);
+            if (item.key === 'GCLS-LC' || item.key === 'GCLS-Personal' || item.key === 'GCLS-Learn') {
+              projectList.value.push(item);
             }
           });
-          projectList.value = child_sys_list_youth;
+        } else {
+          if (isNotYouth) {
+            projectList.value = child_sys_list;
+          } else {
+            let child_sys_list_youth = [];
+            child_sys_list.forEach((item) => {
+              if (item.key !== 'GCLS-Exercise') {
+                child_sys_list_youth.push(item);
+              }
+            });
+            projectList.value = child_sys_list_youth;
+          }
         }
         projectList.value.forEach((item, index) => {
           if (item.key === loginNav.value) {