提交预发布环境

This commit is contained in:
daihh
2022-08-05 18:42:22 +08:00
parent e4f9066667
commit e1d8018060

View File

@@ -212,6 +212,7 @@ import apiOldCourse from "@/api/boe/course.js";
import apiTeacher from "@/api/modules/teacher.js"; import apiTeacher from "@/api/modules/teacher.js";
import apiUser from "@/api/system/user.js"; import apiUser from "@/api/system/user.js";
import scene from "@/api/modules/scene.js"; import scene from "@/api/modules/scene.js";
import apiUserGroup from "@/api/modules/usergroup.js";
import interactBar from "@/components/Portal/interactBar.vue"; 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,formatDate } from "@/utils/tools.js"; import { courseType, getType, toScore,formatDate } from "@/utils/tools.js";
@@ -235,6 +236,7 @@ export default {
data() { data() {
return { return {
formatDate, formatDate,
audiences:[],//当前用户的受众
couretitle: "", couretitle: "",
toScore, toScore,
noPageList: true, //判断接口是否还有数据 noPageList: true, //判断接口是否还有数据
@@ -317,12 +319,36 @@ export default {
if (this.course.keyword != undefined) { if (this.course.keyword != undefined) {
this.totalPages = 4; this.totalPages = 4;
} }
this.search();
this.searchterm();
this.loadSysTypes(); this.loadSysTypes();
this.getScoreList(); this.getScoreList();
this.getHotList(); this.getHotList();
//查询排行榜,页面打开只查询一次 //查询排行榜,页面打开只查询一次
let localKey="user_"+this.userInfo.sysId+"_gids";
if(this.audiences.length==0){
//let hasIds;
let hasIds=sessionStorage.getItem(localKey);
if(hasIds && hasIds.length>0){
this.audiences=hasIds.split(",");
this.search();
}else{
Promise.all([apiOldCourse.audience(this.userInfo.sysId),apiUserGroup.userGroupIds()]).then(rs=>{
//console.log(rs,'rs');
let aids=[];
if(rs[0].status==200){
aids.push(rs[0].result);
}
if(rs[1].status==200){
aids.push(rs[1].result);
}
this.audiences=aids;
sessionStorage.setItem(localKey,this.audiences);
this.search();
})
}
}
this.searchterm();
}, },
beforeDestroy() { beforeDestroy() {
window.removeEventListener("scroll", this.handleScroll); window.removeEventListener("scroll", this.handleScroll);
@@ -524,6 +550,10 @@ export default {
if (this.course.keyword) { if (this.course.keyword) {
apiSearchterm.save({ keyword: this.course.keyword, type: 1 }); apiSearchterm.save({ keyword: this.course.keyword, type: 1 });
} }
if(this.audiences.length>0){
this.course.audiences=this.audiences.join(",");
}
this.isFind = true; this.isFind = true;
this.course.type = this.category; this.course.type = this.category;
if (this.types.sysTypes == 0 || this.types.sysTypes == null) { if (this.types.sysTypes == 0 || this.types.sysTypes == null) {
@@ -597,6 +627,7 @@ export default {
i !== "orderAsc" && i !== "orderAsc" &&
i !== "topOrder" && i !== "topOrder" &&
i !== "device" && i !== "device" &&
i !== "audiences" &&
courseData[i] !== null && courseData[i] !== null &&
courseData[i] !== undefined courseData[i] !== undefined
) { ) {