|
@@ -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"));
|