From 7d3f3f1483b2d5ec16030e7535ad30e9b9b03809 Mon Sep 17 00:00:00 2001 From: NiSen Date: Thu, 19 Oct 2023 14:37:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B=E4=BC=A0?= =?UTF-8?q?=E9=80=92=E5=8F=97=E4=BC=97=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/portal/course/Index.vue | 66 +++++++++++++++---------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/src/views/portal/course/Index.vue b/src/views/portal/course/Index.vue index bbd73fd1..72da7de1 100644 --- a/src/views/portal/course/Index.vue +++ b/src/views/portal/course/Index.vue @@ -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);