|
@@ -17,43 +17,24 @@
|
|
|
<div class="search" @click="selectAll">
|
|
|
<img src="../assets/icon/search.png" alt="" />
|
|
|
</div>
|
|
|
- <input
|
|
|
- class="sInput"
|
|
|
- type="text"
|
|
|
- placeholder="请输入关键字"
|
|
|
- v-model="sCourse"
|
|
|
- />
|
|
|
+ <input class="sInput" type="text" placeholder="请输入关键字" v-model="sCourse" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="choose">
|
|
|
- <div
|
|
|
- class="all_choose"
|
|
|
- v-for="(item, index) in CourseType[0]"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
+ <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
|
|
|
<span>{{ item.name }}:</span>
|
|
|
<div class="typeCss">
|
|
|
- <div
|
|
|
- class="cName"
|
|
|
- @click="getCourse(item.name, '', item.id, 1)"
|
|
|
- :class="typeE.indexOf(item.id) != -1 ? 'isCType' : ''"
|
|
|
- >
|
|
|
+ <div class="cName" @click="getCourse(item.name, '', item.id, 1)"
|
|
|
+ :class="typeE.indexOf(item.id) != -1 ? 'isCType' : ''" style="min-width: fit-content;width: auto;">
|
|
|
全部
|
|
|
</div>
|
|
|
- <div
|
|
|
- v-for="(item1, index1) in CourseTypeJson[item.id]"
|
|
|
- :key="index + '-' + index1"
|
|
|
- :label="item1.id"
|
|
|
- @click="getCourse(item.name, item.id, item1.id, 2)"
|
|
|
- >
|
|
|
- <div
|
|
|
- class="cName"
|
|
|
- :class="
|
|
|
- typea == item1.id || typeb == item1.id || typed == item1.id || typee == item1.id || typef == item1.id
|
|
|
- ? 'isCType'
|
|
|
- : ''
|
|
|
- "
|
|
|
- >
|
|
|
+ <div v-for="(item1, index1) in CourseTypeJson[item.id]" :key="index + '-' + index1" :label="item1.id"
|
|
|
+ @click="getCourse(item.name, item.id, item1.id, 2)">
|
|
|
+ <div class="cName" :class="
|
|
|
+ typea == item1.id || typeb == item1.id || typed == item1.id || typef == item1.id
|
|
|
+ ? 'isCType'
|
|
|
+ : ''
|
|
|
+ ">
|
|
|
{{ item1.name }}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -77,41 +58,25 @@
|
|
|
</div> -->
|
|
|
<div>
|
|
|
<div class="main_box">
|
|
|
- <div
|
|
|
- class="box_course"
|
|
|
- v-for="(item, index) in zoneClass"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
+ <div class="box_course" v-for="(item, index) in zoneClass" :key="index">
|
|
|
<div class="wheel">
|
|
|
- <img
|
|
|
- :src="
|
|
|
- item.cover
|
|
|
- ? JSON.parse(item.cover)[0].url
|
|
|
- : require('../assets/wheel.png')
|
|
|
- "
|
|
|
- alt=""
|
|
|
- />
|
|
|
+ <img :src="
|
|
|
+ item.cover
|
|
|
+ ? JSON.parse(item.cover)[0].url
|
|
|
+ : require('../assets/wheel.png')
|
|
|
+ " alt="" />
|
|
|
</div>
|
|
|
<div class="middle_white">
|
|
|
<div class="textOverflow">{{ item.title }}</div>
|
|
|
<div class="nameAndLength">
|
|
|
- <el-tooltip
|
|
|
- class="typeN"
|
|
|
- effect="light"
|
|
|
- :content="item.typename"
|
|
|
- placement="top"
|
|
|
- >
|
|
|
+ <el-tooltip class="typeN" effect="light" :content="item.typename" placement="top">
|
|
|
<div>{{ item.typename }}</div>
|
|
|
</el-tooltip>
|
|
|
|
|
|
<div>{{ JSON.parse(item.chapters).length }}阶段</div>
|
|
|
</div>
|
|
|
<div class="school_box">
|
|
|
- <el-tooltip
|
|
|
- effect="light"
|
|
|
- :content="item.school"
|
|
|
- placement="top"
|
|
|
- >
|
|
|
+ <el-tooltip effect="light" :content="item.school" placement="top">
|
|
|
<div class="school">
|
|
|
{{ item.school }}
|
|
|
</div>
|
|
@@ -129,27 +94,26 @@
|
|
|
</div>
|
|
|
</div> -->
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="now_study"
|
|
|
- @click="
|
|
|
- goTo(
|
|
|
- '/courseDetailS?courseId=' +
|
|
|
- item.courseId +
|
|
|
- '&userid=' +
|
|
|
- userid +
|
|
|
- '&oid=' +
|
|
|
- oid +
|
|
|
- '&org=' +
|
|
|
- org +
|
|
|
- '&cid=' +
|
|
|
- classId +
|
|
|
- '&tType=' +
|
|
|
- tType +
|
|
|
- '&screenType=' +
|
|
|
- screenType
|
|
|
- )
|
|
|
- "
|
|
|
- >
|
|
|
+ <div class="now_study" @click="
|
|
|
+ goTo(
|
|
|
+ '/courseDetailS?courseId=' +
|
|
|
+ item.courseId +
|
|
|
+ '&userid=' +
|
|
|
+ userid +
|
|
|
+ '&oid=' +
|
|
|
+ oid +
|
|
|
+ '&org=' +
|
|
|
+ org +
|
|
|
+ '&cid=' +
|
|
|
+ classId +
|
|
|
+ '&tType=' +
|
|
|
+ tType +
|
|
|
+ '&role=' +
|
|
|
+ role +
|
|
|
+ '&screenType=' +
|
|
|
+ screenType
|
|
|
+ )
|
|
|
+ ">
|
|
|
立即学习
|
|
|
</div>
|
|
|
</div>
|
|
@@ -158,28 +122,12 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="student_page"
|
|
|
- style="margin: 15px 0 0"
|
|
|
- v-if="zoneClass.length > 0"
|
|
|
- >
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- layout="prev, pager, next"
|
|
|
- :page-size="10"
|
|
|
- :total="total"
|
|
|
- v-if="page && zoneListId != 0"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- >
|
|
|
+ <div class="student_page" style="margin: 15px 0 0" v-if="zoneClass.length > 0">
|
|
|
+ <el-pagination background layout="prev, pager, next" :page-size="10" :total="total"
|
|
|
+ v-if="page && zoneListId != 0" @current-change="handleCurrentChange">
|
|
|
</el-pagination>
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- layout="prev, pager, next"
|
|
|
- :page-size="10"
|
|
|
- :total="total"
|
|
|
- v-if="page && zoneListId == 0"
|
|
|
- @current-change="handleCurrentChange1"
|
|
|
- >
|
|
|
+ <el-pagination background layout="prev, pager, next" :page-size="10" :total="total"
|
|
|
+ v-if="page && zoneListId == 0" @current-change="handleCurrentChange1">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -203,6 +151,7 @@ export default {
|
|
|
classId: this.$route.query.cid,
|
|
|
tType: this.$route.query.tType,
|
|
|
org: this.$route.query.org,
|
|
|
+ role: this.$route.query.role,
|
|
|
screenType: this.$route.query.screenType,
|
|
|
CourseType: [],
|
|
|
CourseTypeJson: {},
|
|
@@ -212,6 +161,7 @@ export default {
|
|
|
typea: "",
|
|
|
typeb: "",
|
|
|
typed: "",
|
|
|
+ typef: "",
|
|
|
typeE: [],
|
|
|
loading: "",
|
|
|
};
|
|
@@ -411,8 +361,18 @@ export default {
|
|
|
// if (!this.loading) {
|
|
|
// this.loading = this.openLoading(document.querySelector(".main_box"));
|
|
|
// }
|
|
|
+ let type = '0'
|
|
|
+ if (!this.org || this.org == "undefined" || this.org == "null") {
|
|
|
+ if (this.tType == 1) {
|
|
|
+ type = '2'
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (this.role == 1) {
|
|
|
+ type = '2'
|
|
|
+ }
|
|
|
+ }
|
|
|
let params = {
|
|
|
- type: '2',
|
|
|
+ type: type,
|
|
|
uid: this.userid,
|
|
|
oid: this.oid,
|
|
|
org: this.org,
|
|
@@ -423,7 +383,7 @@ export default {
|
|
|
typef: this.typef != undefined ? this.typef : "",
|
|
|
typeE: this.typeE.join(","),
|
|
|
cu: "",
|
|
|
- cn: "",
|
|
|
+ cn: this.sCourse,
|
|
|
page: this.page,
|
|
|
};
|
|
|
this.ajax
|
|
@@ -444,6 +404,7 @@ export default {
|
|
|
// this.getBanner({
|
|
|
// data: [res.data[6], res.data[5], res.data[7]],
|
|
|
// });
|
|
|
+ this.getBanner()
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.error(err);
|
|
@@ -467,56 +428,58 @@ export default {
|
|
|
},
|
|
|
//获取banner
|
|
|
getBanner(res) {
|
|
|
- // var a = false;
|
|
|
- // if (this.org == "eb2af5e9-ac3d-46b6-9fe3-3c1c364f018d") {
|
|
|
- // a = true;
|
|
|
- // }
|
|
|
- // let params = {
|
|
|
- // oid: this.org,
|
|
|
- // };
|
|
|
- // this.ajax
|
|
|
- // .get(this.$store.state.api + "selectBannerByOid", params)
|
|
|
- // .then((res) => {
|
|
|
- if (res.data[0].length > 0) {
|
|
|
- this.bannerList = res.data[0];
|
|
|
- } else {
|
|
|
- this.getBannerByOid({
|
|
|
- data: [res.data[1], res.data[2]],
|
|
|
- });
|
|
|
+ var a = false;
|
|
|
+ if (this.org == "eb2af5e9-ac3d-46b6-9fe3-3c1c364f018d") {
|
|
|
+ a = true;
|
|
|
}
|
|
|
- // })
|
|
|
- // .catch((err) => {
|
|
|
- // console.error(err);
|
|
|
- // });
|
|
|
+ let params = {
|
|
|
+ oid: this.org,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "selectBannerByOid", params)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data[0].length > 0) {
|
|
|
+ this.bannerList = res.data[0];
|
|
|
+ } else {
|
|
|
+ // this.getBannerByOid({
|
|
|
+ // data: [res.data[1], res.data[2]],
|
|
|
+ // });
|
|
|
+ this.getBannerByOid();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
},
|
|
|
getBannerByOid(res) {
|
|
|
- // let params = {
|
|
|
- // oid: this.oid,
|
|
|
- // };
|
|
|
- // this.ajax
|
|
|
- // .get(this.$store.state.api + "selectBannerByOid", params)
|
|
|
- // .then((res) => {
|
|
|
- if (res.data[0].length > 0) {
|
|
|
- this.bannerList = res.data[0];
|
|
|
- } else {
|
|
|
- this.getOldBanner({
|
|
|
- data: [res.data[1]],
|
|
|
+ let params = {
|
|
|
+ oid: this.oid,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "selectBannerByOid", params)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data[0].length > 0) {
|
|
|
+ this.bannerList = res.data[0];
|
|
|
+ } else {
|
|
|
+ // this.getOldBanner({
|
|
|
+ // data: [res.data[1]],
|
|
|
+ // });
|
|
|
+ this.getOldBanner();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
});
|
|
|
- }
|
|
|
- // })
|
|
|
- // .catch((err) => {
|
|
|
- // console.error(err);
|
|
|
- // });
|
|
|
},
|
|
|
getOldBanner(res) {
|
|
|
- // this.ajax
|
|
|
- // .get(this.$store.state.api + "getBanner", "")
|
|
|
- // .then((res) => {
|
|
|
- this.bannerList = res.data[0];
|
|
|
- // })
|
|
|
- // .catch((err) => {
|
|
|
- // console.error(err);
|
|
|
- // });
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "getBanner", "")
|
|
|
+ .then((res) => {
|
|
|
+ this.bannerList = res.data[0];
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
},
|
|
|
selectAllType() {
|
|
|
let params = {
|
|
@@ -537,14 +500,14 @@ export default {
|
|
|
}
|
|
|
|
|
|
// if (res.data[2].length == 0 && res.data[3].length == 0) {
|
|
|
- for (var j = 0; j < res.data[1].length; j++) {
|
|
|
- if (res.data[0][i].id == res.data[1][j].pid) {
|
|
|
- if (!this.CourseTypeJson[res.data[0][i].id]) {
|
|
|
- this.CourseTypeJson[res.data[0][i].id] = [];
|
|
|
- }
|
|
|
- this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
|
|
|
+ for (var j = 0; j < res.data[1].length; j++) {
|
|
|
+ if (res.data[0][i].id == res.data[1][j].pid) {
|
|
|
+ if (!this.CourseTypeJson[res.data[0][i].id]) {
|
|
|
+ this.CourseTypeJson[res.data[0][i].id] = [];
|
|
|
}
|
|
|
+ this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
|
|
|
}
|
|
|
+ }
|
|
|
// } else {
|
|
|
// if (res.data[2].length > 0) {
|
|
|
// for (var j = 0; j < res.data[2].length; j++) {
|
|
@@ -721,8 +684,8 @@ export default {
|
|
|
height: 16px;
|
|
|
}
|
|
|
|
|
|
-.wheel > img,
|
|
|
-.man > img {
|
|
|
+.wheel>img,
|
|
|
+.man>img {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
object-fit: cover;
|
|
@@ -753,7 +716,7 @@ export default {
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
-.people > div:nth-child(2) {
|
|
|
+.people>div:nth-child(2) {
|
|
|
margin-left: 10px;
|
|
|
}
|
|
|
|
|
@@ -787,7 +750,7 @@ export default {
|
|
|
margin: auto 0;
|
|
|
}
|
|
|
|
|
|
-.right_bottom_flex > img {
|
|
|
+.right_bottom_flex>img {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
@@ -843,17 +806,17 @@ export default {
|
|
|
width: 100%;
|
|
|
}
|
|
|
|
|
|
-.all_choose > span {
|
|
|
+.all_choose>span {
|
|
|
min-width: 80px;
|
|
|
display: block;
|
|
|
letter-spacing: 14px;
|
|
|
}
|
|
|
|
|
|
-.all_choose > span:nth-child(1) {
|
|
|
+.all_choose>span:nth-child(1) {
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
-.all_choose >>> .el-checkbox-group {
|
|
|
+.all_choose>>>.el-checkbox-group {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
width: 820px;
|
|
@@ -864,14 +827,14 @@ export default {
|
|
|
margin-top: 3px;
|
|
|
}
|
|
|
|
|
|
-.all_choose > .el-checkbox-group >>> .el-checkbox {
|
|
|
+.all_choose>.el-checkbox-group>>>.el-checkbox {
|
|
|
margin-bottom: 10px;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
-.all_choose > .el-checkbox-group > .el-checkbox >>> .el-checkbox__label {
|
|
|
+.all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
|
|
|
min-width: 80px;
|
|
|
overflow: hidden;
|
|
|
width: 80px;
|
|
@@ -879,7 +842,7 @@ export default {
|
|
|
white-space: nowrap;
|
|
|
}
|
|
|
|
|
|
-.all_choose > .el-checkbox-group > .el-checkbox >>> .el-checkbox__label:hover {
|
|
|
+.all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
|
|
|
width: auto;
|
|
|
}
|
|
|
|
|
@@ -916,7 +879,7 @@ export default {
|
|
|
justify-content: space-between;
|
|
|
}
|
|
|
|
|
|
-.reTop > div:nth-child(1) {
|
|
|
+.reTop>div:nth-child(1) {
|
|
|
font-weight: bold;
|
|
|
width: 40px;
|
|
|
border-bottom: 1px solid #205cc6;
|
|
@@ -925,7 +888,7 @@ export default {
|
|
|
font-size: 20px;
|
|
|
}
|
|
|
|
|
|
-.reTop > div:nth-child(2) {
|
|
|
+.reTop>div:nth-child(2) {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
align-items: center;
|
|
@@ -941,7 +904,7 @@ export default {
|
|
|
padding: 0 5px;
|
|
|
}
|
|
|
|
|
|
-.search > img {
|
|
|
+.search>img {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|