guanchunjie 3 years ago
parent
commit
a3a201b25a

+ 20 - 19
src/api/api.js

@@ -2,31 +2,32 @@ import request from '@/utils/request'
 
 // 请求接口 根据不同的MethodNme请求不同的接口
 export function getLogin(MethodName, data) {
-    return request({
-        url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}`,
-        method: 'post',
-        data,
-    })
+  return request({
+    url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}`,
+    method: 'post',
+    data,
+  })
 }
 
 export function getAcsCode(MethodName, data) {
-    return request({
-        url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}&UserCode=${data.UserCode}&UserType=${data.UserType}&SessionID=${data.SessionID}`,
-        method: 'post',
-    })
+  return request({
+    url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}&UserCode=${data.UserCode}&UserType=${data.UserType}&SessionID=${data.SessionID}`,
+    method: 'post',
+  })
 }
 
 export function getContent(MethodName, UserCode, UserType, SessionID, data) {
-    return request({
-        url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data
+  })
 }
+
 export function getStaticContent(MethodName, data) {
-    return request({
-        url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}`,
+    method: 'post',
+    data
+  })
 }

+ 0 - 531
src/components/login/LayoutHeader.vue

@@ -1,531 +0,0 @@
-<template>
-  <!-- 顶部登录导航 -->
-  <div class="LoginNav1">
-    <div class="logo">
-      <span class="logo-img"> logo </span>
-      <el-menu
-        :default-active="activeIndex"
-        class="el-menu-demo"
-        mode="horizontal"
-        @select="handleSelect"
-        text-color="#000"
-        active-text-color="#FF9900"
-      >
-        <el-menu-item index="1">主页</el-menu-item>
-        <el-menu-item index="2">
-          <template v-if="projectList.length > 1">
-            <el-dropdown trigger="click" @command="handleCommand">
-              <span
-                class="el-dropdown-link"
-                :style="{ color: activeIndex == 2 ? '#FF9900' : '#000' }"
-              >
-                {{ projectName }}
-                <!-- SYSTEM -->
-                <i class="el-icon-arrow-down el-icon--right"></i>
-              </span>
-              <el-dropdown-menu slot="dropdown" style="min-width: 278px">
-                <el-dropdown-item
-                  :class="i == LoginNavIndex ? 'menuActive' : ''"
-                  :command="i"
-                  :key="i"
-                  class="projectList"
-                  v-for="(item, i) in projectList"
-                >
-                  <img
-                    style="position: relative; width: 24px"
-                    :src="require('../../assets/login/' + item.img + '.png')"
-                    alt=""
-                  />
-                  <span style="margin-left: 16px">
-                    {{ item.name }}
-                  </span>
-                </el-dropdown-item>
-              </el-dropdown-menu>
-            </el-dropdown>
-          </template>
-          <template v-else>{{
-            projectList.length > 0 && projectList[0].name
-          }}</template>
-        </el-menu-item>
-      </el-menu>
-    </div>
-    <div class="userName">
-      <template>
-        <el-dropdown
-          style="margin-right: 16px; cursor: pointer"
-          trigger="click"
-          @command="changeLang"
-        >
-          <span class="el-dropdown-link" style="color: #000">
-            {{ lang }}<i class="el-icon-arrow-down el-icon--right"></i>
-          </span>
-          <el-dropdown-menu slot="dropdown" style="width: 200px">
-            <el-dropdown-item
-              v-for="item in language_list"
-              :key="item.language_type"
-              :command="item"
-              >{{ item.language_name }}</el-dropdown-item
-            >
-          </el-dropdown-menu>
-        </el-dropdown>
-      </template>
-      <div v-if="!userMessage" class="selectLoginOrRegistration">
-        <span @click="cutLoginReg">登录</span>
-      </div>
-      <!-- 用户头像和用户名 -->
-      <div class="user" v-else>
-        <img
-          @click="userShow = !userShow"
-          class="headPhoto"
-          src="../../assets/login/Group3214.png"
-          alt=""
-        />
-        <span @click="userShow = !userShow">{{ userMessage.user_name }}</span>
-        <div class="userShow" v-show="userShow">
-          <p>
-            <img src="../../assets/login/project7.png" alt="" />
-            个人中心
-          </p>
-          <p @click="QuitLogin">
-            <img src="../../assets/login/Frame77.png" alt="" />
-            退出登录
-          </p>
-        </div>
-      </div>
-      <!-- 消息 铃铛图片 -->
-      <div class="message">
-        <img src="../../assets/login/Vector.png" alt="" />
-        <span class="redDot"></span>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import { mapGetters } from "vuex";
-import { getToken, removeToken } from "@/utils/auth";
-import Cookies from "js-cookie";
-import { getContent, getStaticContent } from "@/api/api";
-import { setI18nLang } from "@/utils/i18n";
-
-export default {
-  name: "LayoutHeader",
-  props: [],
-  data() {
-    return {
-      activeIndex: "2", // 主导航索引
-      LoginNavIndex: 0, //下拉框导航索引
-      projectName: "考试中心",
-      projectList: [],
-      teacherProList: [
-        //普通教师
-        {
-          id: 0,
-          name: "教学中心",
-          img: "project1",
-        },
-
-        {
-          id: 2,
-          name: "教培中心",
-          img: "project3",
-        },
-        {
-          id: 3,
-          name: "教研中心",
-          img: "project4",
-        },
-        {
-          id: 5,
-          name: "学习中心",
-          img: "project6",
-        },
-        {
-          id: 6,
-          name: "个人中心",
-          img: "project7",
-        },
-      ],
-      stuProList: [
-        {
-          id: 0,
-          name: "教学中心",
-          img: "project1",
-        },
-        {
-          id: 5,
-          name: "学习中心",
-          img: "project6",
-        },
-        {
-          id: 6,
-          name: "个人中心",
-          img: "project7",
-        },
-      ],
-      userMessage: null,
-      userShow: false,
-      language_list: [],
-      lang: "",
-    };
-  },
-  watch: {},
-  computed: {
-    ...mapGetters(["language_type"]),
-  },
-  methods: {
-    // 切换导航
-    handleSelect(key, keyPath) {
-      if (this.activeIndex == 1) {
-        window.location.href = "/";
-      }
-    },
-    // 切换项目
-    handleCommand(command) {
-      let _this = this;
-      _this.LoginNavIndex = command;
-      let userInfor = JSON.parse(getToken());
-      let UserCode = "",
-        UserType = "",
-        SessionID = "";
-      if (userInfor) {
-        UserCode = userInfor.user_code;
-        UserType = userInfor.user_type;
-        SessionID = userInfor.session_id;
-      }
-      if (!SessionID || !UserCode || !UserType || !_this.userMessage) {
-        this.$message.warning("Please login first");
-        this.projectName = "考试中心";
-        window.location.href = "/";
-        return;
-      }
-      let MethodName = "login_control-CreateAccessCode";
-      let acsCode = null;
-      getContent(MethodName, UserCode, UserType, SessionID).then((res) => {
-        acsCode = res.access_code;
-        _this.projectName = this.projectList[command].name;
-        let id = this.projectList[command].id;
-
-        if (id == 0) {
-          // 教学管理系统
-          location.href = `/GCLS-Learn/#/EnterSys?AccessCode=${acsCode}`;
-        } else if (id == 1) {
-          // 教材管理系统
-          location.href = `/GCLS-Book/#/EnterSys?AccessCode=${acsCode}`;
-        } else if (id == 2) {
-          // 教培中心
-          location.href = `/GCLS-TRC/#/EnterSys?AccessCode=${acsCode}`;
-        } else if (id == 3) {
-          // 教研中心
-          location.href = `/GCLS-TC/#/EnterSys?AccessCode=${acsCode}`;
-        } else if (id == 4) {
-          // 考试中心
-          location.href = `/GCLS-Test/#/EnterSys?AccessCode=${acsCode}`;
-        } else if (id == 5) {
-          // 学习中心
-          location.href = `/GCLS-LC/#/EnterSys?AccessCode=${acsCode}`;
-        } else {
-          // 个人中心
-          location.href = `/GCLS-Personal/#/EnterSys?AccessCode=${acsCode}`;
-        }
-      });
-    },
-    // 切换登录的注册
-    cutLoginReg() {
-      window.location.href = "/";
-    },
-    QuitLogin() {
-      removeToken();
-      Cookies.remove("userMessage");
-      Cookies.remove("session_id");
-      Cookies.remove("user_code");
-      Cookies.remove("user_type");
-      this.userShow = false;
-      this.userMessage = null;
-      window.location.href = "/";
-    },
-    getLangList() {
-      let MethodName = "language_manager-GetLanguageList";
-      let data = {};
-      getStaticContent(MethodName, data).then((res) => {
-        this.language_list = res.language_list;
-        for (let i = 0; i < this.language_list.length; i++) {
-          let item = this.language_list[i];
-          if (item.language_type == this.language_type) {
-            this.lang = item.language_name;
-            break;
-          }
-        }
-      });
-    },
-    async changeLang(command) {
-      console.log(command);
-      this.lang = command.language_name;
-      let lang_type = command.language_type;
-      await setI18nLang(lang_type);
-      this.$router.go(0);
-    },
-    handleProList(list) {
-      let projectList = [];
-      if (list.includes(2000001)) {
-        projectList = this.teacherProList;
-      } 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",
-            });
-          }
-        }
-      }
-      console.log(projectList);
-      return projectList;
-    },
-  },
-  created() {},
-  mounted() {
-    let _this = this;
-    let user = getToken();
-    if (user) {
-      _this.userMessage = JSON.parse(user);
-      let popedom_code_list = _this.userMessage.popedom_code_list;
-      if (_this.userMessage.user_type == "TEACHER") {
-        _this.projectList =
-          popedom_code_list.length > 0
-            ? _this.handleProList(popedom_code_list)
-            : [];
-      } else if (_this.userMessage.user_type == "STUDENT") {
-        _this.projectList = _this.stuProList;
-      }
-      _this.projectList.forEach((item, index) => {
-        if (item.id == 4) {
-          _this.LoginNavIndex = index;
-        }
-      });
-    }
-    _this.getLangList();
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.LoginNav1 {
-  height: 74px;
-  position: relative;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  box-sizing: border-box;
-  padding: 0px 24px;
-  z-index: 999;
-  background: #ffffff;
-  box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.15);
-  font-family: "sourceR";
-  .logo {
-    &-img {
-      font-style: normal;
-      font-weight: 600;
-      font-size: 30px;
-      font-variant: small-caps;
-      color: #000000;
-      margin-right: 29px;
-      line-height: 74px;
-    }
-    display: flex;
-    align-items: center;
-    .el-menu-demo {
-      background: rgba(0, 0, 0, 0);
-      // margin-left: 100px;
-      li:hover {
-        background: none;
-      }
-      li {
-        font-size: 16px;
-        background: none;
-      }
-    }
-    // 取消组件默认的样式
-    .el-menu.el-menu--horizontal {
-      border-bottom: none;
-    }
-  }
-  .userName {
-    display: flex;
-    justify-content: flex-end;
-    align-items: center;
-    .seek {
-      margin-right: 100px;
-      position: relative;
-      img {
-        left: 10px;
-        top: 11px;
-        position: absolute;
-      }
-    }
-    .flag {
-      position: relative;
-      top: 5px;
-    }
-    .headPhoto {
-      width: 50px;
-      height: 50px;
-      // background: url("../assets/teacherTrain/image 4.png") no-repeat 100% 100%;
-      // background-size: 100%;
-      border-radius: 50%;
-      // margin-right: 10px;
-    }
-    .message {
-      height: 100%;
-      position: relative;
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      margin-left: 23px;
-      img {
-        width: 18px;
-        height: 24px;
-      }
-      .redDot {
-        position: absolute;
-        top: 2px;
-        right: -2px;
-        width: 6px;
-        height: 6px;
-        display: inline-block;
-        background: red;
-        border-radius: 50%;
-      }
-    }
-    .selectLoginOrRegistration {
-      display: flex;
-      height: 32px;
-      border: 1px solid #ffffff;
-      box-sizing: border-box;
-      border-radius: 4px;
-      justify-content: space-evenly;
-      align-items: center;
-      padding: 0 16px;
-      > span {
-        cursor: pointer;
-        font-size: 16px;
-        color: #fff;
-      }
-    }
-    .user {
-      display: flex;
-      align-items: center;
-      cursor: pointer;
-      position: relative;
-      > img {
-        width: 34px;
-        height: 34px;
-      }
-      > span {
-        font-size: 20px;
-        padding-left: 10px;
-      }
-      .userShow {
-        position: absolute;
-        width: 156px;
-        height: 96px;
-        background: #ffffff;
-        box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
-        border-radius: 8px;
-        bottom: -100px;
-        color: black;
-        img {
-          width: 24px;
-          height: 24px;
-          margin-right: 10px;
-        }
-        p {
-          font-size: 16px;
-          height: 40px;
-          display: flex;
-          align-items: center;
-          padding-left: 20px;
-          margin: 0;
-          margin-top: 5px;
-        }
-        > p:hover {
-          background: #f2f2f2;
-        }
-      }
-    }
-  }
-}
-</style>
-<style lang="scss">
-.LoginNav1 {
-  .el-dropdown-menu__item {
-    line-height: 40px;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    > span {
-      font-family: "sourceR";
-      font-size: 16px;
-    }
-  }
-  .el-menu--horizontal > .el-menu-item {
-    height: 74px;
-    line-height: 78px;
-  }
-  .el-dropdown {
-    display: block;
-    > span {
-      font-family: "sourceR";
-      font-size: 16px;
-    }
-  }
-}
-.projectList {
-  &.el-dropdown-menu__item {
-    line-height: 40px;
-    display: flex;
-    align-items: center;
-    color: #000000;
-    > img {
-      top: 0;
-    }
-    > span {
-      line-height: 40px;
-      font-family: "sourceR";
-    }
-  }
-  &:hover {
-    background: rgba(255, 153, 0, 0.1) !important;
-    color: #000 !important;
-  }
-  &.menuActive {
-    background: #ff9900;
-  }
-}
-</style>

+ 9 - 37
src/components/login/LoginNav.vue

@@ -12,7 +12,7 @@
         active-text-color="#FF9900"
       >
         <el-menu-item index="1">首页</el-menu-item>
-        <el-menu-item index="2" v-if="projectList.length > 0">
+        <el-menu-item index="2" v-if="projectListArr.length > 0">
           <el-dropdown trigger="click" @command="handleCommand">
             <span
               class="el-dropdown-link"
@@ -28,14 +28,14 @@
             </span>
             <el-dropdown-menu slot="dropdown" style="width: 300px">
               <el-dropdown-item
-                v-for="(item, i) in projectList"
+                v-for="(item, i) in projectListArr"
                 :key="i"
                 :command="i"
                 :class="projectDownIndex == i ? 'downsele' : ''"
               >
                 <img
                   style="position: relative; top: 5px; width: 24px"
-                  :src="require('../../assets/login/' + item.img + '.png')"
+                  :src="item.icon_url_memu_default"
                   alt=""
                 />
                 <span style="margin-left: 16px">
@@ -127,6 +127,7 @@ export default {
       projectDownIndex: 0,
       language_list: [],
       lang: "",
+      projectListArr: [],
     };
   },
   watch: {
@@ -137,6 +138,7 @@ export default {
     projectList: {
       handler: function (val, oldVal) {
         if (val.length > 0) {
+          this.projectListArr = val;
           this.projectName = val[0].name;
         }
       },
@@ -172,41 +174,11 @@ export default {
       if (!session_id || !user_code || !user_type || !_this.userMessage) {
         this.$message.warning("请先登录");
         this.projectName = "教学中心";
-        // window.location.href = "/";
         return;
       }
       _this.projectDownIndex = command;
-
-      let MethodName = "login_control-CreateAccessCode";
-      let acsCode = null;
-      getContent(MethodName, user_code, user_type, session_id).then((res) => {
-        acsCode = res.access_code;
-        _this.projectName = this.projectList[command].name;
-        let id = this.projectList[command].id;
-
-        if (id == 0) {
-          // 教学管理系统
-          location.href = `/GCLS-Learn/#/EnterSys?AccessCode=${acsCode}`;
-        } else if (id == 1) {
-          // 教材管理系统
-          location.href = `/GCLS-Book/#/EnterSys?AccessCode=${acsCode}`;
-        } else if (id == 2) {
-          // 教培中心
-          location.href = `/GCLS-TRC/#/EnterSys?AccessCode=${acsCode}`;
-        } else if (id == 3) {
-          // 教研中心
-          location.href = `/GCLS-TC/#/EnterSys?AccessCode=${acsCode}`;
-        } else if (id == 4) {
-          // 考试中心
-          location.href = `/GCLS-Test/#/EnterSys?AccessCode=${acsCode}`;
-        } else if (id == 5) {
-          // 学习中心
-          location.href = `/GCLS-LC/#/EnterSys?AccessCode=${acsCode}`;
-        } else {
-          // 个人中心
-          location.href = `/GCLS-Personal/#/EnterSys?AccessCode=${acsCode}`;
-        }
-      });
+      let relative_path = _this.projectList[command].relative_path;
+      location.href = relative_path;
     },
     // 切换语言
     async changeLang(command) {
@@ -278,8 +250,8 @@ export default {
     _this.getLangList();
   },
   mounted() {
-    this.projectName =
-      this.projectList.length > 0 ? this.projectList[0].name : "";
+    // this.projectName =
+    //   this.projectList.length > 0 ? this.projectList[0].name : "";
   },
 };
 </script>

+ 3 - 3
src/components/login/login.vue

@@ -150,12 +150,11 @@
 //这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
 //例如:import 《组件名称》from ‘《组件路径》';
 import { getLogin, getContent } from "@/api/api";
-import Cookies from "js-cookie";
 import { setToken } from "@/utils/auth";
 export default {
   //import引入的组件需要注入到对象中才能使用
   components: {},
-  props: ["ForgetType", "changeLoginReg", "changeLoginType"],
+  props: ["ForgetType", "changeLoginReg", "changeLoginType", "getChildSysList"],
   data() {
     //这里存放数据
     return {
@@ -257,13 +256,14 @@ export default {
             localStorage.setItem("user_name", JSON.stringify(obj));
           }
           setToken(res);
-
           if (
             res.popedom_code_list.indexOf(2000001) > -1 ||
             res.user_type == "STUDENT"
           ) {
             this.$message.warning("跳转中....");
             location.href = `/GCLS-Learn/#/EnterSys`;
+          } else {
+            this.getChildSysList();
           }
         })
         .catch((err) => {

+ 0 - 1
src/utils/index.js

@@ -11,7 +11,6 @@ export function getConfigInfor() {
       reject(err);
     })
   })
-
 }
 
 /**

+ 38 - 186
src/views/login/index.vue

@@ -8,7 +8,7 @@
           :language_list="language_list"
           :projectList="projectList"
         />
-        <!-- <LayoutHeader /> -->
+
         <div class="logoAndlogin">
           <div class="LogoAndText">
             <div class="logo">
@@ -26,6 +26,7 @@
               :ForgetType.sync="loginType"
               :changeLoginReg="changeLoginReg"
               :changeLoginType="changeLoginType"
+              :getChildSysList="getChildSysList"
             />
           </div>
           <div
@@ -40,7 +41,7 @@
           </div>
           <div class="list" v-if="!LoginOrRegistration">
             <div
-              :class="projectIndex == item.id ? 'Selectproject' : ''"
+              :class="projectIndex == item.key ? 'Selectproject' : ''"
               @mousemove="projectMove(item)"
               @mouseout="projectOut"
               v-for="(item, i) in projectList"
@@ -49,20 +50,14 @@
             >
               <div>
                 <img
-                  v-if="projectIndex == item.id"
-                  :src="
-                    require('../../assets/login/' + item.selectImg + '.png')
-                  "
-                  alt=""
-                />
-                <img
-                  v-else
-                  :src="require('../../assets/login/' + item.img + '.png')"
+                  v-if="projectIndex == item.key"
+                  :src="item.icon_url_home_selected"
                   alt=""
                 />
+                <img v-else :src="item.icon_url_home_default" alt="" />
                 <p>{{ item.name }}</p>
               </div>
-              <p>{{ item.text }}</p>
+              <p>{{ item.desc }}</p>
             </div>
           </div>
         </div>
@@ -105,9 +100,7 @@ import LoginNav2 from "@/components/login/LoginNav2";
 import ForgetPassword from "@/components/login/ForgetPassword";
 import LoginNav from "@/components/login/LoginNav";
 
-import Cookies from "js-cookie";
 import { getLogin, getContent, getAcsCode, getStaticContent } from "@/api/api";
-import LayoutHeader from "@/components/login/LayoutHeader";
 import { updateWordPack } from "@/utils/i18n";
 import { getToken, removeToken } from "@/utils/auth";
 
@@ -121,7 +114,6 @@ export default {
     ForgetPassword,
     LoginNav,
     LoginNav2,
-    LayoutHeader,
   },
   props: {},
   data() {
@@ -273,33 +265,13 @@ export default {
       } else {
         this.LoginOrRegistration = value;
       }
-      this.userMessage = userMessage ? userMessage : null;
-      if (this.userMessage) {
-        let _this = this;
-        let popedom_code_list = _this.userMessage.popedom_code_list;
-        if (_this.userMessage.user_type == "TEACHER") {
-          _this.projectList =
-            popedom_code_list.indexOf(2000001) > -1
-              ? []
-              : _this.handleProList(popedom_code_list);
-        } else if (_this.userMessage.user_type == "STUDENT") {
-          //_this.projectList = _this.stuProList;
-        }
-        _this.projectList.forEach((item, index) => {
-          if (item.id == 4) {
-            _this.LoginNavIndex = index;
-          }
-        });
-      } else {
-        this.projectList = [];
-      }
     },
     changeLoginType(value) {
       this.loginType = value;
     },
     // 鼠标进入
     projectMove(item) {
-      this.projectIndex = item.id;
+      this.projectIndex = item.key;
     },
     // 鼠标离开
     projectOut() {
@@ -323,36 +295,9 @@ export default {
         this.projectName = this.projectList[0].name;
         return;
       }
-      let acsCode = null;
-      let MethodName = "login_control-CreateAccessCode";
-
-      getContent(MethodName, user_code, user_type, session_id).then((res) => {
-        acsCode = res.access_code;
-        _this.projectName = this.projectList[command].name;
-        let id = this.projectList[command].id;
-        if (id == 0) {
-          // 教学管理系统
-          location.href = `/GCLS-Learn/#/EnterSys?AccessCode=${acsCode}`;
-        } else if (id == 1) {
-          // 教材管理系统
-          location.href = `/GCLS-Book/#/EnterSys?AccessCode=${acsCode}`;
-        } else if (id == 2) {
-          // 教培中心
-          location.href = `/GCLS-TRC/#/EnterSys?AccessCode=${acsCode}`;
-        } else if (id == 3) {
-          // 教研中心
-          location.href = `/GCLS-TC/#/EnterSys?AccessCode=${acsCode}`;
-        } else if (id == 4) {
-          // 考试中心
-          location.href = `/GCLS-Test/#/EnterSys?AccessCode=${acsCode}`;
-        } else if (id == 5) {
-          // 学习中心
-          location.href = `/GCLS-LC/#/EnterSys?AccessCode=${acsCode}`;
-        } else {
-          // 个人中心
-          location.href = `/GCLS-Personal/#/EnterSys?AccessCode=${acsCode}`;
-        }
-      });
+      _this.projectName = this.projectList[command].name;
+      let relative_path = this.projectList[command].relative_path;
+      location.href = relative_path;
     },
     // 获取语言列表
     getLangList() {
@@ -386,6 +331,7 @@ export default {
             removeToken();
           } else {
             this.userMessage = userInfor;
+
             if (
               userInfor.popedom_code_list.indexOf(2000001) > -1 ||
               userInfor.user_type == "STUDENT"
@@ -396,9 +342,7 @@ export default {
             } else {
               this.isPc = true;
               this.LoginOrRegistration = "";
-              this.projectList = this.handleProList(
-                userInfor.popedom_code_list
-              );
+              this.getChildSysList();
             }
             this.getLangList();
             updateWordPack({
@@ -411,123 +355,6 @@ export default {
         this.LoginOrRegistration = "login";
       }
     },
-    handleProList(list) {
-      let projectList = [];
-      if (list.length == 0) {
-        let arr = [
-          {
-            id: 2,
-            name: "教培中心",
-            img: "project2-2-2",
-            selectImg: "project2-2",
-            text: "名师授课,丰富的课程体系,快速扎实帮您提升教学能力。",
-          },
-          {
-            id: 3,
-            name: "教研中心",
-            img: "project6-6-6",
-            selectImg: "project6-6",
-            text: "丰富的教学资料和珍贵的文献可以在线查看或下载。",
-          },
-          {
-            id: 5,
-            name: "学习中心",
-            img: "project4-4-4",
-            selectImg: "project4-4",
-            text: "在这里可以很容易地找到数字教科书、学习材料和丰富的课程。",
-          },
-          {
-            id: 6,
-            // Teacher training center
-            name: "个人中心",
-            img: "project3-3-3",
-            selectImg: "project3-3",
-            text: "您收集和购买的所有资源都可以在这里轻松找到。",
-          },
-        ];
-        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: "project8-8",
-              selectImg: "project8-8-8",
-              text: "帮您快速定制生动、有趣、实用的数字教材。",
-            });
-          }
-        }
-      } else {
-        for (let i = 0; i < list.length; i++) {
-          let code = list[i];
-          if (code == 2000002) {
-            projectList.push({
-              id: 0,
-              name: "教学管理中心",
-              img: "project1-1",
-              selectImg: "project1-1-1",
-              text: "帮助您快速完成课程及任务安排,快速清晰的完成学习任务。",
-            });
-          } else if (code == 2000003) {
-            projectList.push({
-              id: 1,
-              name: "教材管理系统",
-              img: "project8-8",
-              selectImg: "project8-8-8",
-              text: "帮您快速定制生动、有趣、实用的数字教材。",
-            });
-          } else if (code == 2000004) {
-            projectList.push({
-              id: 2,
-              name: "教师培训中心",
-              img: "project2-2-2",
-              selectImg: "project2-2",
-              text: "名师授课,丰富的课程体系,快速扎实帮您提升教学能力。",
-            });
-          } else if (code == 2000005) {
-            projectList.push({
-              id: 4,
-              name: "考试中心",
-              img: "project5-5-5",
-              selectImg: "project5-5",
-              text: "丰富的题库将帮助您快速编写实用、准确、全面的试卷。",
-            });
-          } else if (code == 2000006) {
-            projectList.push({
-              id: 3,
-              name: "教研中心",
-              img: "project4-4-4",
-              selectImg: "project4-4",
-              text: "丰富的教学资料和珍贵的文献可以在线查看或下载。",
-            });
-          }
-        }
-        projectList.push({
-          id: 6,
-          // Teacher training center
-          name: "个人中心",
-          img: "project3-3-3",
-          selectImg: "project3-3",
-          text: "您收集和购买的所有资源都可以在这里轻松找到。",
-        });
-      }
-      // 排序
-      for (var i = 0; i < projectList.length - 1; i++) {
-        for (var j = 0; j < projectList.length - 1 - i; j++) {
-          // 相邻元素两两对比,元素交换,大的元素交换到后面
-          if (projectList[j].id > projectList[j + 1].id) {
-            var temp = projectList[j];
-            projectList[j] = projectList[j + 1];
-            projectList[j + 1] = temp;
-          }
-        }
-      }
-      console.log(projectList);
-      return projectList;
-    },
     browserRedirect() {
       var sUserAgent = navigator.userAgent.toLowerCase();
 
@@ -564,6 +391,31 @@ export default {
         this._getConfig();
       }
     },
+    getChildSysList() {
+      let _this = this;
+      let MethodName = "login_control-GetChildSysList_CanEnter_PC";
+      let userInfor = getToken();
+      let user_code = "",
+        user_type = "",
+        session_id = "";
+      if (userInfor) {
+        userInfor = JSON.parse(getToken());
+        user_code = userInfor.user_code;
+        user_type = userInfor.user_type;
+        session_id = userInfor.session_id;
+        getContent(MethodName, user_code, user_type, session_id, {})
+          .then((res) => {
+            if (res.child_sys_list && res.child_sys_list.length > 0) {
+              this.projectList = res.child_sys_list;
+            } else {
+              this.$message.warning("您没有任何权限,请联系您所在机构的管理员");
+            }
+          })
+          .catch((err) => {
+            console.log();
+          });
+      }
+    },
     async _getConfig() {
       this.configInfor = await getConfigInfor();
       let user_name = JSON.parse(localStorage.getItem("user_name"));