Merge branch 'zcwy_0716_learning' into dev0515

This commit is contained in:
nisen
2024-07-17 10:39:02 +08:00
2 changed files with 21 additions and 7 deletions

View File

@@ -275,7 +275,14 @@ export default {
if(this.nums == 0){ if(this.nums == 0){
window.location.href = `${this.webBaseUrl}/uc/study/task?type=9`; window.location.href = `${this.webBaseUrl}/uc/study/task?type=9`;
} }
window.location.href = `${this.webBaseUrl}/uc/study/task`; // window.location.href = `${this.webBaseUrl}/uc/study/task?type=${this.fistTotals || this.growTotal || this.pathTotals}`;
if(this.fistTotals != 0){
window.location.href = `${this.webBaseUrl}/uc/study/task?type=1`;
}else if (this.growTotal != 0){
window.location.href = `${this.webBaseUrl}/uc/study/growth`;
}else{
window.location.href = `${this.webBaseUrl}/uc/study/task?type=2`;
}
}else{ }else{
window.location.href = `${this.webBaseUrl}/uc/study/courses`; window.location.href = `${this.webBaseUrl}/uc/study/courses`;
} }

View File

@@ -446,22 +446,27 @@ export default {
console.log(this.fistTotals,this.growTotal,this.pathTotals,'geshu') console.log(this.fistTotals,this.growTotal,this.pathTotals,'geshu')
if(path == '/uc/study/task' || path == '/uc/study/growth'){ if(path == '/uc/study/task' || path == '/uc/study/growth'){
this.openedsList = ['mystudy'] this.openedsList = ['mystudy']
// window.location.href = `${this.webBaseUrl}/uc/study/task?type=${this.fistTotals || this.growTotal || this.pathTotals}`
} }
console.log('1')
if(path == '/uc/study/courses'){ if(path == '/uc/study/courses'){
'/uc/study/courses' '/uc/study/courses'
} }
if(sessionStorage.getItem('totalNums') == 0&&path == '/uc/study/task'){ if(sessionStorage.getItem('totalNums') == 0&&path == '/uc/study/task'){
return '/uc/study/task?type=9' return '/uc/study/task?type=9'
} }
console.log('2')
if(path == '/uc/study/task'){ if(path == '/uc/study/task'){
return '/uc/study/task?type=' + (route.query.type || this.fistTotals || this.growTotal || this.pathTotals || 2) return '/uc/study/task?type=' + (route.query.type || (this.fistTotals && 1) || 2)
} }
console.log('3')
if(meta.title == '添加受众' || meta.title == '查看受众'){ if(meta.title == '添加受众' || meta.title == '查看受众'){
meta.activeMenu = '/manage/ugroups' meta.activeMenu = '/manage/ugroups'
} }
if (meta.activeMenu) { if (meta.activeMenu) {
return meta.activeMenu; return meta.activeMenu;
} }
console.log(path,'sendpath')
return path; return path;
}, },
}, },
@@ -475,24 +480,24 @@ export default {
overlayShow: false, overlayShow: false,
instructor:0, instructor:0,
fistTotal:0, fistTotal:0,
fistTotals:1, fistTotals:0,
proTotal: 0, proTotal: 0,
proTotals: 1, proTotals: 1,
pathTotal:0, pathTotal:0,
pathTotals:1, pathTotals:0,
growTotal: 1, growTotal: 0,
openedsList:[], openedsList:[],
courseNum: 0, courseNum: 0,
}; };
}, },
created() { created() {
this.learnTotal() this.learnTotal()
this.courseNumsData()
this.$store.dispatch('refrashReviewed'); this.$store.dispatch('refrashReviewed');
this.$store.dispatch('refrashStudyTaskCount'); this.$store.dispatch('refrashStudyTaskCount');
this.getLastStudy(); this.getLastStudy();
//获取讲师认证中条数 //获取讲师认证中条数
this.instructorCertification() this.instructorCertification()
this.courseNumsData()
}, },
mounted() { mounted() {
// this.courseNum = sessionStorage.getItem('courseNums') // this.courseNum = sessionStorage.getItem('courseNums')
@@ -523,8 +528,11 @@ export default {
}else{ }else{
this.courseNum = sessionStorage.getItem('courseNums') this.courseNum = sessionStorage.getItem('courseNums')
} }
console.log(this.courseNum,'this.courseNum')
}, },
learnTotal(){ learnTotal(){
// const route = this.$route;
// const { meta, path } = route;
let params = { let params = {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
@@ -553,7 +561,6 @@ export default {
}) })
] ]
Promise.all(promises).then(() => { Promise.all(promises).then(() => {
console.log('111111111')
sessionStorage.setItem('totalNums', this.fistTotals + this.pathTotals + this.growTotal); sessionStorage.setItem('totalNums', this.fistTotals + this.pathTotals + this.growTotal);
}); });
apiManage.queryTaskCounts({}).then(res=>{ apiManage.queryTaskCounts({}).then(res=>{