diff --git a/components/course-image/course-image.vue b/components/course-image/course-image.vue index 2e54856..447bcbf 100644 --- a/components/course-image/course-image.vue +++ b/components/course-image/course-image.vue @@ -10,7 +10,7 @@ - + diff --git a/components/data-filter/data-filter.vue b/components/data-filter/data-filter.vue index 605e724..c10856b 100644 --- a/components/data-filter/data-filter.vue +++ b/components/data-filter/data-filter.vue @@ -3,7 +3,7 @@ - 清除筛选 + 清除筛选 @@ -105,6 +105,7 @@ }, data(){ return{ + clearswitch:false, courseSysTypeTree:[], courseScenceList:[], filterShow:false,//是否显示过虑器 @@ -132,6 +133,8 @@ mounted() { // this.filterWidth=(this.$width-100)+'px'; //右边出来的抽屉宽度控制 this.loadData(); + this.clswitch(); + }, computed:{ filterTags(){ //过滤标签 @@ -194,7 +197,22 @@ } }, methods:{ + clswitch(){ + if(JSON.stringify(this.course.sysType1) !== '{}'){ + this.clearswitch = true; + console.log(this.course,this.filterTags.length) + }else if(JSON.stringify(this.course.sysType2) !== '{}'){ + this.clearswitch = true; + }else if(JSON.stringify(this.course.sysType2) !== '{}'){ + this.clearswitch = true; + }else if(this.filterTags.length !== 0 && 3){ + this.clearswitch = true; + } + + }, + // 清除筛选 clearsf(){ + console.log(this.filterTags); if(this.type==1){//生成课程查询条件 let params={ pageIndex:1, @@ -213,6 +231,7 @@ cateName:'' } this.$emit('submit',this.filterTags,params); + this.clearswitch = false; } this.course.sysType1 = ''; this.course.sysType2 = ''; @@ -414,7 +433,8 @@ this.$emit('submit',this.filterTags,params); } - + // console.log(this.filterTags.length,'llll') + this.clswitch(); } } } diff --git a/pages/index/index.vue b/pages/index/index.vue index bde797f..6f23f60 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -453,7 +453,7 @@ let query = { pageIndex:curData.pageIndex, pageSize:10, - orderField:'', + orderField:'studys', topOrder:true, orderAsc:false, device:2, @@ -474,7 +474,7 @@ if(this.conType==0){ query.orderField='studys'; }else if(this.conType==1){ - query.orderField='publishTime'; + query.orderField='studys'; } if(this.dataFilter.courseParams.scenes){ diff --git a/pages/my/rankingList.vue b/pages/my/rankingList.vue index 5379377..080fe3e 100644 --- a/pages/my/rankingList.vue +++ b/pages/my/rankingList.vue @@ -12,7 +12,7 @@ color: '#333333', fontWeight: '600', }"> - + {{userInfo.name}} {{cutOrgNamePath(userInfo.departFullName)}} {{experience.data.total}} - - + --> + {{userInfo.name}} {{cutOrgNamePath(userInfo.departFullName)}} {{formatSecondToHour(learningDuration.data.total)}} - + --> 我的排名:{{learningDays.data.rankingNo}} @@ -158,11 +156,11 @@ formatSecondToHour, cutOrgNamePath, tabList:[ - { name: '经验值'}, - { name: '学习时长'}, + // { name: '经验值'}, + // { name: '学习时长'}, { name: '学习天数'}, ], - activeTab:0, + activeTab:2, rankingList:{}, userInfo:{}, learningDays:{ @@ -203,8 +201,8 @@ onLoad(options) { this.$store.dispatch('GetUserInfo').then(rs => { this.userInfo = rs; - this.getExperience(); - this.getDuration(); + // this.getExperience(); + // this.getDuration(); this.getDays(); this.userInfo.avatar = this.userInfo.avatar.substring(this.userInfo.avatar.indexOf("upload")+6); }); @@ -214,72 +212,72 @@ back(){ uni.navigateBack(); }, - clickTabs(item) { - this.activeTab = item.index; - }, - getExperience() {//经验值 - let data = { - aid:this.userInfo.aid,// #用户id - statType:20, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数 - field:'total',// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计 - num:5,// #显示的条数 - } - apiStat.getRanking(data).then(res=>{ - if(res.status==200){ - if(res.result.currentUserRankingData) { - res.result.currentUserRankingData.authorInfo={ - aid: "", - name: "", - orgInfo: "", - avatar: "", - sex: null - } - this.experience.data = res.result.currentUserRankingData; - } - const ids= []; - res.result.rankingData.forEach(item=>{ - ids.push(item.aid) - item.authorInfo = { - aid: "", - name: "", - orgInfo: "", - avatar: "", - sex: null - } - }) - this.getUserData(ids,res.result.rankingData) - this.experience.list = res.result.rankingData; - } - }) - }, - getDuration() {//学习时长 - let data = { - aid:this.userInfo.aid,// #用户id - statType:10, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数 - field:'total',// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计 - num:5,// #显示的条数 - } - apiStat.getRanking(data).then(res=>{ - if(res.status==200){ - if(res.result.currentUserRankingData) { - this.learningDuration.data = res.result.currentUserRankingData; - } - const ids= []; - res.result.rankingData.forEach(item=>{ - ids.push(item.aid) - item.authorInfo = { - aid: "", - name: "", - orgInfo: "", - avatar: "", - sex: null - } - }) - this.getUserData(ids,res.result.rankingData) - this.learningDuration.list = res.result.rankingData; - } - }) - }, + // clickTabs(item) { + // this.activeTab = item.index; + // }, + // getExperience() {//经验值 + // let data = { + // aid:this.userInfo.aid,// #用户id + // statType:20, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数 + // field:'total',// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计 + // num:5,// #显示的条数 + // } + // apiStat.getRanking(data).then(res=>{ + // if(res.status==200){ + // if(res.result.currentUserRankingData) { + // res.result.currentUserRankingData.authorInfo={ + // aid: "", + // name: "", + // orgInfo: "", + // avatar: "", + // sex: null + // } + // this.experience.data = res.result.currentUserRankingData; + // } + // const ids= []; + // res.result.rankingData.forEach(item=>{ + // ids.push(item.aid) + // item.authorInfo = { + // aid: "", + // name: "", + // orgInfo: "", + // avatar: "", + // sex: null + // } + // }) + // this.getUserData(ids,res.result.rankingData) + // this.experience.list = res.result.rankingData; + // } + // }) + // }, + // getDuration() {//学习时长 + // let data = { + // aid:this.userInfo.aid,// #用户id + // statType:10, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数 + // field:'total',// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计 + // num:5,// #显示的条数 + // } + // apiStat.getRanking(data).then(res=>{ + // if(res.status==200){ + // if(res.result.currentUserRankingData) { + // this.learningDuration.data = res.result.currentUserRankingData; + // } + // const ids= []; + // res.result.rankingData.forEach(item=>{ + // ids.push(item.aid) + // item.authorInfo = { + // aid: "", + // name: "", + // orgInfo: "", + // avatar: "", + // sex: null + // } + // }) + // this.getUserData(ids,res.result.rankingData) + // this.learningDuration.list = res.result.rankingData; + // } + // }) + // }, //学习天数 getDays() { let data = {