修改课程传递受众问题

This commit is contained in:
NiSen
2023-10-19 14:37:02 +08:00
parent b05aae3d83
commit 7d3f3f1483

View File

@@ -719,38 +719,38 @@ export default {
// this.toCourseDetail(item);
// this.orderChange(id);
//查询排行榜,页面打开只查询一次
// 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 {
// apiUserbasic.getInAudienceIds().then(rs => {
// if (rs.status == 200) {
// this.audiences = rs.result;
// sessionStorage.setItem(localKey, this.audiences);
// } else {
// console.log(rs.message);
// }
// // this.search();
// })
// // 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();
// // })
// }
// }
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 {
apiUserbasic.getInAudienceIds().then(rs => {
if (rs.status == 200) {
this.audiences = rs.result;
sessionStorage.setItem(localKey, this.audiences);
} else {
console.log(rs.message);
}
this.search();
})
// 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();//搜索词已经没有了
this.couresreso();//广告位
@@ -1084,7 +1084,7 @@ export default {
});
this.loadLocalFilters();
this.search()
// this.search()
}
} catch (error) {
console.log(error);