Explorar el Código

轻松环境不显示练习题管理菜单

natasha hace 9 meses
padre
commit
f77e5e5a7b
Se han modificado 1 ficheros con 13 adiciones y 1 borrados
  1. 13 1
      src/components/Header.vue

+ 13 - 1
src/components/Header.vue

@@ -234,7 +234,19 @@ export default {
       getContentFile(MethodName, {})
         .then(res => {
           if (res.child_sys_list && res.child_sys_list.length > 0) {
-            _this.projectList = res.child_sys_list;
+            const isNotYouth =
+              window.location.origin !== "https://youthchinesedu.blcup.com";
+            if (isNotYouth) {
+              _this.projectList = res.child_sys_list;
+            } else {
+              let child_sys_list_youth = [];
+              res.child_sys_list.forEach(item => {
+                if (item.key !== "GCLS-Exercise") {
+                  child_sys_list_youth.push(item);
+                }
+              });
+              _this.projectList = child_sys_list_youth;
+            }
             _this.projectList.forEach((item, index) => {
               if (item.key == "GCLS-Book") {
                 _this.LoginNavIndex = index;