mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 20:06:44 +08:00
Merge branch 'master' into dev
This commit is contained in:
@@ -623,21 +623,18 @@ export default {
|
||||
}
|
||||
}
|
||||
if($this.coursewareInfo.content.contentType == 40) {
|
||||
//console.log(con.content,'con.content');
|
||||
// if(con.content != '' && con.content.indexOf('.pdf') > -1) {
|
||||
// $this.coursewareInfo.content.content = con.content;
|
||||
// }else {
|
||||
apiCourseFile.detail(con.contentRefId).then(cfrs => {
|
||||
if (cfrs.status == 200) {
|
||||
$this.coursewareInfo.content.content = cfrs.result.previewFilePath;
|
||||
$this.curCFile=cfrs.result;
|
||||
$this.converStatus = cfrs.result.converStatus;
|
||||
|
||||
//以下是为了兼容老数据
|
||||
if(cfrs.result.previewFilePath == '' && cfrs.result.filePath.indexOf('.pdf') > -1) {
|
||||
$this.coursewareInfo.content.content = cfrs.result.filePath;
|
||||
}
|
||||
//设置状态值
|
||||
if($this.coursewareInfo.content.content && $this.coursewareInfo.content.content.indexOf('.pdf') > -1){
|
||||
if(cfrs.result.converStatus || cfrs.result.converStatus<2){
|
||||
if(!cfrs.result.converStatus || cfrs.result.converStatus<2){
|
||||
$this.converStatus=2;//转化完成
|
||||
}
|
||||
}
|
||||
@@ -645,7 +642,6 @@ export default {
|
||||
$this.$message.error('加载pdf课件文件失败');
|
||||
}
|
||||
});
|
||||
// }
|
||||
}
|
||||
} else if (con.sortIndex == 2) {
|
||||
$this.homeworkInfo = con;
|
||||
|
||||
@@ -680,29 +680,27 @@ export default {
|
||||
}
|
||||
} else if(r.contentType == 40) {
|
||||
this.contentData.content="";
|
||||
// if (r.content != '' && r.content.indexOf('.pdf') > -1) {
|
||||
// // this.contentData.content = cfrs.result.previewFilePath;
|
||||
// }else{
|
||||
apiCourseFile.detail(r.contentRefId).then(cfrs => {
|
||||
if (cfrs.status == 200) {
|
||||
this.curCFile=cfrs.result;
|
||||
this.contentData.content = cfrs.result.previewFilePath;
|
||||
this.converStatus = cfrs.result.converStatus;
|
||||
this.curCFile=cfrs.result;
|
||||
//下面是为了兼容老数据
|
||||
if(cfrs.result.previewFilePath == '' && cfrs.result.filePath.indexOf('pdf') > -1) {
|
||||
this.contentData.content = cfrs.result.filePath;
|
||||
}
|
||||
//设置状态
|
||||
if(this.contentData.content && this.contentData.content.indexOf('pdf') > -1){
|
||||
if(this.converStatus || this.converStatus<2){
|
||||
if(!this.converStatus || this.converStatus<2){
|
||||
this.converStatus=2;
|
||||
}
|
||||
}
|
||||
//console.log(r.content);
|
||||
}else {
|
||||
this.contentData.content="";
|
||||
this.$message.error('加载pdf课件文件失败');
|
||||
}
|
||||
});
|
||||
// }
|
||||
|
||||
}
|
||||
this.type = 0;
|
||||
},
|
||||
|
||||
@@ -139,8 +139,9 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.one-line-ellipsis{
|
||||
display: -webkit-box;
|
||||
|
||||
white-space:pre-wrap;
|
||||
// word-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
word-break:break-all;
|
||||
overflow: hidden;
|
||||
text-overflow:ellipsis;
|
||||
|
||||
@@ -156,12 +156,21 @@ export default {
|
||||
this.signInShow=false;
|
||||
},
|
||||
handleCommand(val) {
|
||||
// let obj = {
|
||||
// one: process.env.VUE_APP_BOE_WEB_URL+'/web/teacherLesson',
|
||||
// two: process.env.VUE_APP_BOE_WEB_URL+'/grow180/login',
|
||||
// three: this.webBaseUrl + '/study/index',
|
||||
// four: 'https://m.qingxuetang.com/x/?appId=qxtcorp306130',
|
||||
// five: process.env.VUE_APP_BOE_WEB_URL+'/boe/new-employee/index.html'
|
||||
// };
|
||||
let urlPre=window.location.protocol+'//'+window.location.host;
|
||||
// process.env.VUE_APP_BOE_WEB_URL
|
||||
let obj = {
|
||||
one: process.env.VUE_APP_BOE_WEB_URL+'/web/teacherLesson',
|
||||
two: process.env.VUE_APP_BOE_WEB_URL+'/grow180/login',
|
||||
three: this.webBaseUrl + '/study/index',
|
||||
one: urlPre+'/web/teacherLesson',
|
||||
two: urlPre+'/grow180/login',
|
||||
three: this.webBaseUrl + '/study/index?study=1',
|
||||
four: 'https://m.qingxuetang.com/x/?appId=qxtcorp306130',
|
||||
five: process.env.VUE_APP_BOE_WEB_URL+'/boe/new-employee/index.html'
|
||||
five: urlPre+'/boe/new-employee/index.html'
|
||||
};
|
||||
window.open(obj[val]);
|
||||
},
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/**页面设置的一些常量*/
|
||||
const caseUser={
|
||||
'12345601': '测试',
|
||||
'00004409': '李玉冰',
|
||||
'101215': '徐涛',
|
||||
'00005011': '邱炜玮',
|
||||
|
||||
@@ -194,26 +194,26 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters,mapActions } from 'vuex';
|
||||
import { mapGetters, mapActions } from "vuex";
|
||||
import portalHeader from "@/components/PortalHeader.vue";
|
||||
import portalFooter from "@/components/PortalFooter.vue";
|
||||
import portalFloatTools from "@/components/PortalFloatTools.vue";
|
||||
import authorInfo from '@/components/Portal/authorInfo.vue';
|
||||
import authorInfo from "@/components/Portal/authorInfo.vue";
|
||||
import courseItem from "@/components/Portal/course/courseItem.vue";
|
||||
import apiCoursePortal from "@/api/modules/coursePortal.js";
|
||||
import courseForm from "@/components/Course/courseForm.vue";
|
||||
import apiType from "@/api/modules/type.js";
|
||||
import apiCourse from "@/api/modules/coursePortal.js";
|
||||
import apiOldCourse from "@/api/boe/course.js";
|
||||
import apiTeacher from '@/api/modules/teacher.js';
|
||||
import apiUser from '@/api/system/user.js';
|
||||
import apiTeacher from "@/api/modules/teacher.js";
|
||||
import apiUser from "@/api/system/user.js";
|
||||
import scene from "@/api/modules/scene.js";
|
||||
import interactBar from "@/components/Portal/interactBar.vue";
|
||||
import courseImage from "@/components/Course/courseImage.vue"
|
||||
import courseImage from "@/components/Course/courseImage.vue";
|
||||
import { courseType, getType, toScore } from "@/utils/tools.js";
|
||||
import { deepClone, param } from "../../../utils";
|
||||
import apiSearchterm from "@/api/modules/searchterm.js";
|
||||
import { Promise } from 'q';
|
||||
import { Promise } from "q";
|
||||
export default {
|
||||
name: "index",
|
||||
components: {
|
||||
@@ -227,11 +227,11 @@ export default {
|
||||
interactBar
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['resOwnerMap','sysTypeMap','userInfo','identity']),
|
||||
...mapGetters(["resOwnerMap", "sysTypeMap", "userInfo", "identity"])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
couretitle:'',
|
||||
couretitle: "",
|
||||
toScore,
|
||||
noPageList: true, //判断接口是否还有数据
|
||||
noDataList: true, //判断接口是否还有数据
|
||||
@@ -245,7 +245,7 @@ export default {
|
||||
subTow: "",
|
||||
sysTypes: null,
|
||||
oneSubList: [],
|
||||
towSubList: [],
|
||||
towSubList: []
|
||||
},
|
||||
course: {
|
||||
orderField: "studys",
|
||||
@@ -282,12 +282,12 @@ export default {
|
||||
courseList: [],
|
||||
searchRecords: [],
|
||||
hotList: [],
|
||||
totalPages:1,
|
||||
totalPages: 1
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
let screenWidth=window.screen.width;
|
||||
let screenWidth = window.screen.availHeight;
|
||||
//console.log("screenWidth", screenWidth);
|
||||
if (screenWidth < 1280) {
|
||||
this.course.pageSize = 9;
|
||||
this.columns = 3;
|
||||
@@ -306,12 +306,8 @@ export default {
|
||||
let height = 200;
|
||||
let flag = true;
|
||||
let $this = this;
|
||||
this.getAnkingData()
|
||||
window.addEventListener(
|
||||
"scroll",
|
||||
|
||||
this.handleScroll
|
||||
);
|
||||
this.getAnkingData();
|
||||
window.addEventListener("scroll",this.handleScroll);
|
||||
if (this.$route.query !== {}) {
|
||||
this.course.keyword = this.$route.query.keyword;
|
||||
}
|
||||
@@ -331,29 +327,28 @@ export default {
|
||||
window.removeEventListener("scroll", this.handleScroll);
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
jumUX() {
|
||||
window.open('https://m.qingxuetang.com/x/?appId=qxtcorp306130','_blank');
|
||||
window.open("https://m.qingxuetang.com/x/?appId=qxtcorp306130", "_blank");
|
||||
},
|
||||
emitInput(val) {
|
||||
this.course.keyword = val;
|
||||
this.searchData()
|
||||
this.searchData();
|
||||
},
|
||||
handleScroll() {
|
||||
let innerHeight = document.querySelector('#couser-list-content').clientHeight
|
||||
let outerHeight = document.documentElement.clientHeight
|
||||
let scrollTop = document.documentElement.scrollTop
|
||||
if ((outerHeight + scrollTop + 350) >= innerHeight) {
|
||||
let innerHeight = document.querySelector("#couser-list-content")
|
||||
.clientHeight;
|
||||
let outerHeight = document.documentElement.clientHeight;
|
||||
let scrollTop = document.documentElement.scrollTop;
|
||||
if (outerHeight + scrollTop + 350 >= innerHeight) {
|
||||
if (this.moreState == 1 && this.course.pageIndex < 4) {
|
||||
this.loadMore();
|
||||
}
|
||||
}
|
||||
if (scrollTop > 630) {
|
||||
document.querySelector('#fixd-box').style.cssText = "position: fixed;top: -550px;width:242.5px";
|
||||
document.querySelector("#fixd-box").style.cssText =
|
||||
"position: fixed;top: -550px;width:242.5px";
|
||||
} else {
|
||||
document.querySelector('#fixd-box').style.cssText = "position: static";
|
||||
document.querySelector("#fixd-box").style.cssText = "position: static";
|
||||
}
|
||||
},
|
||||
toNeedCourse() {
|
||||
@@ -374,17 +369,19 @@ export default {
|
||||
this.$forceUpdate();
|
||||
},
|
||||
...mapActions({
|
||||
getResOwnerTree:'resOwner/getResOwnerTree',
|
||||
loadResOwners:'resOwner/loadResOwners',
|
||||
getSysTypeTree:'sysType/getSysTypeTree',
|
||||
loadSysTypes:'sysType/loadSysTypes'
|
||||
getResOwnerTree: "resOwner/getResOwnerTree",
|
||||
loadResOwners: "resOwner/loadResOwners",
|
||||
getSysTypeTree: "sysType/getSysTypeTree",
|
||||
loadSysTypes: "sysType/loadSysTypes"
|
||||
}),
|
||||
sysTypeName(code) {
|
||||
if(code==''){return '';}
|
||||
if (code == "") {
|
||||
return "";
|
||||
}
|
||||
return this.sysTypeMap.get(code);
|
||||
},
|
||||
useHotword(item) {
|
||||
this.$set(this.course,'keyword',item.keyword)
|
||||
this.$set(this.course, "keyword", item.keyword);
|
||||
this.searchData();
|
||||
},
|
||||
searchterm() {
|
||||
@@ -396,18 +393,20 @@ export default {
|
||||
},
|
||||
toCourseDetail(item) {
|
||||
if (isNaN(item.type)) {
|
||||
return `${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.type}`;
|
||||
return `${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${
|
||||
item.type
|
||||
}`;
|
||||
//此处使用window.open有问题
|
||||
//window.open(`${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.type}`);
|
||||
} else {
|
||||
if (item.type == 10) {
|
||||
return this.webBaseUrl+'/course/micro?id='+item.id;
|
||||
return this.webBaseUrl + "/course/micro?id=" + item.id;
|
||||
} else if (item.type == 20) {
|
||||
return this.webBaseUrl+'/course/detail?id='+item.id;
|
||||
return this.webBaseUrl + "/course/detail?id=" + item.id;
|
||||
}
|
||||
}
|
||||
|
||||
return '';
|
||||
return "";
|
||||
},
|
||||
orderChange(id) {
|
||||
this.course.orderField = id;
|
||||
@@ -431,7 +430,7 @@ export default {
|
||||
if (i === "sysType3") {
|
||||
this.types.subTow = "";
|
||||
}
|
||||
if(i === 'type') {
|
||||
if (i === "type") {
|
||||
this.category = "";
|
||||
this.categorySub = "";
|
||||
}
|
||||
@@ -444,7 +443,7 @@ export default {
|
||||
// 分类
|
||||
changeType(num) {
|
||||
this.types.oneSubList = [];
|
||||
this.types.subOne = '0';
|
||||
this.types.subOne = "0";
|
||||
this.types.towSubList = [];
|
||||
let list = {};
|
||||
if (num !== 0) {
|
||||
@@ -459,7 +458,7 @@ export default {
|
||||
},
|
||||
// 子级分类
|
||||
changeTypeSub(num) {
|
||||
this.types.subTow = '0';
|
||||
this.types.subTow = "0";
|
||||
let list = {};
|
||||
if (num !== 0) {
|
||||
apiType.list(1, num).then(res => {
|
||||
@@ -514,26 +513,26 @@ export default {
|
||||
this.course.type = this.category;
|
||||
}
|
||||
if (this.types.sysTypes == 0 || this.types.sysTypes == null) {
|
||||
this.course.sysType1 = '';
|
||||
this.course.sysType2 = '';
|
||||
this.course.sysType3 = '';
|
||||
this.course.sysType1 = "";
|
||||
this.course.sysType2 = "";
|
||||
this.course.sysType3 = "";
|
||||
} else {
|
||||
this.course.sysType1 = this.types.sysTypes;
|
||||
}
|
||||
this.course.sysType2 = this.types.subOne;
|
||||
this.course.sysType3 = this.types.subTow;
|
||||
if (this.course.sysType2 == 0) {
|
||||
this.course.sysType2 = '';
|
||||
this.course.sysType2 = "";
|
||||
}
|
||||
if (this.course.sysType3 == 0) {
|
||||
this.course.sysType3 = '';
|
||||
this.course.sysType3 = "";
|
||||
}
|
||||
this.course.device = 1;
|
||||
this.getTags();
|
||||
//从新课程库中取10条,从老库中取10条
|
||||
let oldPageIndex = 0;
|
||||
let oldCateName = '';
|
||||
let oldParamsType = '';
|
||||
let oldCateName = "";
|
||||
let oldParamsType = "";
|
||||
if (this.course.sysType1) {
|
||||
//cateName
|
||||
let courseSysType = this.course.sysType1;
|
||||
@@ -545,89 +544,131 @@ export default {
|
||||
}
|
||||
}
|
||||
if (this.category == 20) {
|
||||
oldParamsType='online-course';
|
||||
oldParamsType = "online-course";
|
||||
} else if (this.category == 30) {
|
||||
oldParamsType='face-course';
|
||||
oldParamsType = "face-course";
|
||||
} else if (this.category == 40) {
|
||||
oldParamsType='project';
|
||||
oldParamsType = "project";
|
||||
}
|
||||
if(oldParamsType == '' && oldCateName == '' && this.course.keyword == '') {
|
||||
//if(oldParamsType == '' && oldCateName == '' && this.course.keyword == '') {
|
||||
if (this.searchTags.length == 0) {
|
||||
oldPageIndex = this.course.pageIndex - 3;
|
||||
} else {
|
||||
oldPageIndex = this.course.pageIndex;
|
||||
}
|
||||
|
||||
let oldParams={type:oldParamsType,page:oldPageIndex,size:this.course.pageSize,keyword:this.course.keyword,sort:'new',cateName:oldCateName}
|
||||
if(this.course.orderField == 'id') {//最新
|
||||
oldParams.sort = 'new';
|
||||
let oldParams = {
|
||||
type: oldParamsType,
|
||||
page: oldPageIndex,
|
||||
size: this.course.pageSize,
|
||||
keyword: this.course.keyword,
|
||||
sort: "new",
|
||||
cateName: oldCateName
|
||||
};
|
||||
if (this.course.orderField == "id") {
|
||||
//最新
|
||||
oldParams.sort = "new";
|
||||
}
|
||||
if(this.course.orderField == 'studys') {//最热
|
||||
oldParams.sort = 'hot';
|
||||
if (this.course.orderField == "studys") {
|
||||
//最热
|
||||
oldParams.sort = "hot";
|
||||
}
|
||||
let data = [];
|
||||
let isTopList = [];
|
||||
|
||||
if (this.course.pageIndex > this.totalPages) {
|
||||
//console.log(this.course.pageIndex, this.totalPages, "1");
|
||||
this.noDataList = true;
|
||||
if (this.searchTags.length == 0) {
|
||||
oldParams.page = this.course.pageIndex - this.totalPages;
|
||||
}else {
|
||||
if(this.totalPages<3){
|
||||
this.noDataList = false;
|
||||
}
|
||||
if(this.totalPages == 1 && this.course.pageIndex ==1){
|
||||
} else {
|
||||
//console.log(this.course.pageIndex, this.totalPages, "2");
|
||||
if (this.searchTags.length == 0) {
|
||||
if (this.totalPages > 3) {
|
||||
if (this.course.pageIndex <= 3) {
|
||||
this.noDataList = false;
|
||||
} else {
|
||||
this.noDataList = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// if(this.totalPages == 1 && this.course.pageIndex ==1){
|
||||
// this.noDataList = true;
|
||||
// }
|
||||
}
|
||||
if (this.course.type == 30 || this.course.type == 40) {
|
||||
this.noPageList = false;
|
||||
}
|
||||
//console.log(this.noDataList, this.totalPages, "this.noDataList");
|
||||
// 隐藏loadMore
|
||||
this.moreState = 2;
|
||||
this.noDataList && await apiOldCourse.courseList(oldParams).then(oldRs=>{
|
||||
this.noDataList &&
|
||||
(await apiOldCourse
|
||||
.courseList(oldParams)
|
||||
.then(oldRs => {
|
||||
if (oldRs.status == 200 && oldRs.result.dataList.length > 0) {
|
||||
let list = that.filterConversion(oldRs.result.dataList);
|
||||
list.name = list.name.replace(/<[^>]+>|&[^>]+;/g,"").trim();
|
||||
//list.name = list.name.replace(/<[^>]+>|&[^>]+;/g,"").trim();
|
||||
data.push(...list);
|
||||
that.moreState = 1;
|
||||
} else {
|
||||
that.noDataList = false;
|
||||
}
|
||||
}).catch(err=>{
|
||||
that.noDataList = false;
|
||||
})
|
||||
.catch(err => {
|
||||
that.noDataList = false;
|
||||
}));
|
||||
|
||||
this.noPageList && await apiCoursePortal
|
||||
this.noPageList &&
|
||||
(await apiCoursePortal
|
||||
.pageList(this.course)
|
||||
.then(res => {
|
||||
|
||||
if (res.status == 200 && res.result.list.length > 0) {
|
||||
|
||||
this.totalPages = res.result.totalPages;
|
||||
let courseIds = [];
|
||||
res.result.list.forEach(item => {
|
||||
item.name = this.$keywordActiveShow(item.name,this.course.keyword);
|
||||
item.couretitle = this.$keywordActiveShow(item.name,this.course.keyword).replace(/<[^>]+>|&[^>]+;/g,"").trim();//去掉所有的html标签和 之类的特殊符合
|
||||
item.authorInfo={aid:'',name:'',orgInfo:'',avatar:'',code:''};
|
||||
item.name = this.$keywordActiveShow(
|
||||
item.name,
|
||||
this.course.keyword
|
||||
);
|
||||
item.couretitle = this.$keywordActiveShow(
|
||||
item.name,
|
||||
this.course.keyword
|
||||
)
|
||||
.replace(/<[^>]+>|&[^>]+;/g, "")
|
||||
.trim(); //去掉所有的html标签和 之类的特殊符合
|
||||
item.authorInfo = {
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
code: ""
|
||||
};
|
||||
courseIds.push(item.id);
|
||||
if (item.isTop) {
|
||||
isTopList.push(item);
|
||||
} else {
|
||||
data.push(item);
|
||||
}
|
||||
})
|
||||
});
|
||||
that.loadCouserTeacher(res.result.list, courseIds);
|
||||
// data.push(...res.result.list);
|
||||
that.moreState = 1;
|
||||
} else {
|
||||
that.noPageList = false;
|
||||
}
|
||||
}).catch(err=>{
|
||||
that.noPageList = false;
|
||||
})
|
||||
if(this.course.orderField == 'id') {//最新
|
||||
data.sort(this.pcompare("publishTime",false))
|
||||
.catch(err => {
|
||||
that.noPageList = false;
|
||||
}));
|
||||
if (this.course.orderField == "id") {
|
||||
//最新
|
||||
data.sort(this.pcompare("publishTime", false));
|
||||
}
|
||||
if(this.course.orderField == 'studys') {//最热
|
||||
data.sort(this.pcompare("studys",false))
|
||||
if (this.course.orderField == "studys") {
|
||||
//最热
|
||||
data.sort(this.pcompare("studys", false));
|
||||
}
|
||||
this.courseList.push(...isTopList, ...data);
|
||||
if (this.noDataList == false && this.noPageList == false) {
|
||||
@@ -641,9 +682,10 @@ export default {
|
||||
rev = rev ? 1 : -1;
|
||||
}
|
||||
return function(obj1, obj2) {
|
||||
let val1 = obj1[prop],val2 = obj2[prop];
|
||||
return val1 < val2 ? rev*(-1):rev*1;
|
||||
}
|
||||
let val1 = obj1[prop],
|
||||
val2 = obj2[prop];
|
||||
return val1 < val2 ? rev * -1 : rev * 1;
|
||||
};
|
||||
},
|
||||
filterConversion(data) {
|
||||
let list = [];
|
||||
@@ -657,11 +699,11 @@ export default {
|
||||
score: item.score,
|
||||
publishTime: item.releaseDate,
|
||||
authorInfo: {
|
||||
avatar: '',
|
||||
name: ''
|
||||
avatar: "",
|
||||
name: ""
|
||||
}
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
return list;
|
||||
},
|
||||
loadCouserTeacher(list, ids) {
|
||||
@@ -682,17 +724,18 @@ export default {
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
//that.loadCourseAuthorInfo(list,userIds);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
loadCourseAuthorInfo(list,ids){ //加载作者信息,头像,机构信息
|
||||
loadCourseAuthorInfo(list, ids) {
|
||||
//加载作者信息,头像,机构信息
|
||||
if (ids.length == 0) {
|
||||
return;
|
||||
}
|
||||
const noReapetIds=[...new Set(ids)]
|
||||
const noReapetIds = [...new Set(ids)];
|
||||
apiUser.getByIds(ids).then(res => {
|
||||
if (res.status == 200) {
|
||||
list.forEach((item, index) => {
|
||||
@@ -703,10 +746,10 @@ export default {
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
} else {
|
||||
console.log('加载课程信息失败:'+res.error);
|
||||
console.log("加载课程信息失败:" + res.error);
|
||||
//this.$message.error(res.message);
|
||||
}
|
||||
});
|
||||
@@ -731,20 +774,19 @@ export default {
|
||||
courseData[i] = courseType(courseData[i]);
|
||||
}
|
||||
if (i == "sysType1" || i == "sysType2" || i == "sysType3") {
|
||||
if(courseData[i] !== '0') {
|
||||
if (courseData[i] !== "0") {
|
||||
courseData[i] = this.sysTypeName(courseData[i]);
|
||||
}
|
||||
}
|
||||
if (i == "type" && courseData[i] === 0) {
|
||||
courseData[i] = '在线课'
|
||||
};
|
||||
if(courseData[i] !== '0') {
|
||||
courseData[i] = "在线课";
|
||||
}
|
||||
if (courseData[i] !== "0") {
|
||||
this.searchTags.push({
|
||||
id: id,
|
||||
name: courseData[i]
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -769,32 +811,34 @@ export default {
|
||||
getAnkingData() {
|
||||
apiCourse.ranking().then(res => {
|
||||
if (res.status == 200) {
|
||||
this.ankingList=res.result
|
||||
this.ankingList = res.result;
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
getScoreList() {
|
||||
apiCourse.scorelist(5).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.scorelist=res.result
|
||||
this.scorelist = res.result;
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
getHotList() {
|
||||
apiCourse.studyCounts(5).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.hotList=res.result
|
||||
this.hotList = res.result;
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
jumpRouter(item) {
|
||||
console.log(item.type,'item.type');
|
||||
console.log(item.type, "item.type");
|
||||
// return console.log(id,type,"fihkj1")
|
||||
if(item.type == 20) {//录播课
|
||||
if (item.type == 20) {
|
||||
//录播课
|
||||
// window.open(`${this.webBaseUrl}/course/detail?id=${id}`)
|
||||
this.$router.push(`/course/detail?id=${item.id}`);
|
||||
}
|
||||
if(item.type == 10) {//微课
|
||||
if (item.type == 10) {
|
||||
//微课
|
||||
// window.open(`${this.webBaseUrl}/course/micro?id=${id}`)
|
||||
this.$router.push(`/course/micro?id=${item.id}`);
|
||||
}
|
||||
@@ -806,15 +850,16 @@ export default {
|
||||
|
||||
//console.log(item.type,type,'item.type');
|
||||
// return console.log(id,type,"fihkj1")
|
||||
if(type == 20) {//录播课
|
||||
if (type == 20) {
|
||||
//录播课
|
||||
// window.open(`${this.webBaseUrl}/course/detail?id=${id}`)
|
||||
this.$router.push(`/course/detail?id=${id}`);
|
||||
}
|
||||
if(type == 10) {//微课
|
||||
if (type == 10) {
|
||||
//微课
|
||||
// window.open(`${this.webBaseUrl}/course/micro?id=${id}`)
|
||||
this.$router.push(`/course/micro?id=${id}`);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -841,7 +886,6 @@ export default {
|
||||
::v-deep .bacolor:nth-child(even) {
|
||||
background-color: #f6f6f6;
|
||||
padding: 0 5px;
|
||||
|
||||
}
|
||||
.Uxtext {
|
||||
font-weight: 450;
|
||||
@@ -868,7 +912,8 @@ export default {
|
||||
// height: 20px;
|
||||
// }
|
||||
// }
|
||||
::v-deep .el-radio-button__inner, .el-radio-group {
|
||||
::v-deep .el-radio-button__inner,
|
||||
.el-radio-group {
|
||||
vertical-align: top;
|
||||
}
|
||||
::v-deep .el-radio-button__inner {
|
||||
@@ -919,11 +964,11 @@ export default {
|
||||
left: 100px;
|
||||
top: 54px;
|
||||
border-radius: 50%;
|
||||
background: rgba(88, 138, 252,.37);
|
||||
background: rgba(88, 138, 252, 0.37);
|
||||
|
||||
.el-icon-caret-right {
|
||||
font-size: 36px;
|
||||
color: #588AFC;
|
||||
color: #588afc;
|
||||
}
|
||||
}
|
||||
.course-image-box {
|
||||
@@ -946,7 +991,7 @@ export default {
|
||||
opacity: 0.4;
|
||||
border-top-left-radius: 15px;
|
||||
border-bottom-left-radius: 15px;
|
||||
color: #FFFFFF;
|
||||
color: #ffffff;
|
||||
}
|
||||
.course-type-title {
|
||||
position: absolute;
|
||||
@@ -956,7 +1001,7 @@ export default {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
color: #ffffff;
|
||||
}
|
||||
.course-flag {
|
||||
height: 26px;
|
||||
@@ -1013,26 +1058,25 @@ export default {
|
||||
flex: 1;
|
||||
}
|
||||
.course-score-value {
|
||||
color: #FFB30F;
|
||||
color: #ffb30f;
|
||||
font-family: "Arial";
|
||||
// font-size: 30px;
|
||||
}
|
||||
.course-score-no {
|
||||
font-size: 12px;
|
||||
color: #FFB30F;
|
||||
color: #ffb30f;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.course-score-no {
|
||||
text-align: right;
|
||||
font-size: 12px;
|
||||
color: #FFB30F;
|
||||
color: #ffb30f;
|
||||
line-height: 30px;
|
||||
}
|
||||
.course-score-value {
|
||||
font-size: 14px;
|
||||
color: #FFB30F;
|
||||
color: #ffb30f;
|
||||
margin-left: 32px;
|
||||
line-height: 30px;
|
||||
font-family: "Arial";
|
||||
@@ -1042,7 +1086,7 @@ export default {
|
||||
line-height: 30px;
|
||||
font-size: 12px;
|
||||
|
||||
color: #8590A6;
|
||||
color: #8590a6;
|
||||
}
|
||||
.btn-label {
|
||||
}
|
||||
@@ -1131,7 +1175,7 @@ export default {
|
||||
height: 38px;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
background:#3E7FFF;
|
||||
background: #3e7fff;
|
||||
border-radius: 0;
|
||||
.el-button {
|
||||
margin: 0;
|
||||
|
||||
Reference in New Issue
Block a user