Quellcode durchsuchen

轻松环境去掉练习题相关内容

natasha vor 7 Monaten
Ursprung
Commit
d41d3ecb06
2 geänderte Dateien mit 14 neuen und 2 gelöschten Zeilen
  1. 12 1
      src/layouts/components/LayoutHeader.vue
  2. 2 1
      src/views/main/index.js

+ 12 - 1
src/layouts/components/LayoutHeader.vue

@@ -157,7 +157,18 @@ function getChildSysList() {
   GetChildSysList_CanEnter_PC()
     .then(({ child_sys_list }) => {
       if (child_sys_list && child_sys_list.length > 0) {
-        projectList.value = child_sys_list;
+        const isNotYouth = window.location.origin !== 'https://youthchinesedu.blcup.com';
+        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) {
             LoginNavIndex.value = index;

+ 2 - 1
src/views/main/index.js

@@ -2,6 +2,7 @@ import store from '@/store';
 
 const popedom_code_list = store.state.user.popedom_code_list;
 const isStudent = store.state.user.user_type === 'STUDENT';
+const isNotYouth = window.location.origin !== 'https://youthchinesedu.blcup.com'
 
 export const menuList = [
   {
@@ -12,7 +13,7 @@ export const menuList = [
   {
     name: '练习',
     tab: 'ExerciseList',
-    isShow: isStudent
+    isShow: isStudent && isNotYouth
   },
   {
     name: 'Key215',