diff --git a/src/components/PortalHeader.vue b/src/components/PortalHeader.vue index 881db6c8..f06e04c6 100644 --- a/src/components/PortalHeader.vue +++ b/src/components/PortalHeader.vue @@ -46,7 +46,7 @@
- +
@@ -54,7 +54,7 @@
- 个人中心 + 个人中心 退出 @@ -117,13 +117,13 @@ export default { // cmtask_status:this.cmtask_status, // cmtask_name:this.cmtask_name, }; - apiBoeCourse.cmtaskList(params).then(res => { - if (res.status == 200 && res.result.count > 0) { - this.isTiao = true; - } else { - this.isTiao = false; - } - }); + // apiBoeCourse.cmtaskList(params).then(res => { + // if (res.status == 200 && res.result.count > 0) { + // this.isTiao = true; + // } else { + // this.isTiao = false; + // } + // }); }, handleCommand(val) { let urlPre=window.location.protocol+'//'+window.location.host; diff --git a/src/views/Loading.vue b/src/views/Loading.vue index 5d59e15f..f8909b3f 100644 --- a/src/views/Loading.vue +++ b/src/views/Loading.vue @@ -45,7 +45,7 @@ if(this.toUrl){ location.href=this.toUrl; }else{ - this.$router.push({ path: "/study/index" }) + this.$router.push({ path: "/uc/study/task" }) } //this.$router.push({ path: "/index" }) }else{ diff --git a/src/views/Login.vue b/src/views/Login.vue index 8a77d185..bb6a47a4 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -108,7 +108,7 @@ this.$store.dispatch("portal/SetLoginRememberMe", rememberMeOjb) } //console.log(this.redirect,'this.redirect'); - this.$router.push({ path: this.redirect || "/study/index" }).catch(()=>{ + this.$router.push({ path: this.redirect || "/uc/study/task" }).catch(()=>{ $this.loading = false; }); }else{ diff --git a/src/views/StudyIndex.vue b/src/views/StudyIndex.vue index 1adfa426..4e74499d 100644 --- a/src/views/StudyIndex.vue +++ b/src/views/StudyIndex.vue @@ -131,32 +131,32 @@ // cmtask_name:this.cmtask_name, } - apiBoeCourse.cmtaskList(params).then(res=>{ - if(res.status==200){ - this.total = res.result.count - this.couresList = res.result.list; - this.loading = false; - if(this.$route.fullPath != '/uc/study/task' && this.$route.fullPath != '/uc/study/courses' && this.$route.fullPath != '/study/index') { - return; - } - if(res.result.count > 0) { - this.$router.push('/uc/study/task') - } else { - if(this.$route.query.study == '1') { - this.$router.push('/uc/study/task') - } else { - this.$router.push('/uc/study/courses') - } - } - }else{ - this.$router.push('/uc/study/courses') - } - }).catch(err=>{ - if(this.$route.fullPath != '/uc/study/task' || this.$route.fullPath != '/uc/study/courses' || this.$route.fullPath != '/study/index') { - return; - } - this.$router.push('/uc/study/courses'); - }) + // apiBoeCourse.cmtaskList(params).then(res=>{ + // if(res.status==200){ + // this.total = res.result.count + // this.couresList = res.result.list; + // this.loading = false; + // if(this.$route.fullPath != '/uc/study/task' && this.$route.fullPath != '/uc/study/courses' && this.$route.fullPath != '/study/index') { + // return; + // } + // if(res.result.count > 0) { + // this.$router.push('/uc/study/task') + // } else { + // if(this.$route.query.study == '1') { + // this.$router.push('/uc/study/task') + // } else { + // this.$router.push('/uc/study/courses') + // } + // } + // }else{ + // this.$router.push('/uc/study/courses') + // } + // }).catch(err=>{ + // if(this.$route.fullPath != '/uc/study/task' || this.$route.fullPath != '/uc/study/courses' || this.$route.fullPath != '/study/index') { + // return; + // } + // this.$router.push('/uc/study/courses'); + // }) }, created() { //this.$router.push('/uc/study/courses'); diff --git a/src/views/study/TaskList.vue b/src/views/study/TaskList.vue index d881cc39..00446da0 100644 --- a/src/views/study/TaskList.vue +++ b/src/views/study/TaskList.vue @@ -140,6 +140,10 @@ export default { if(res.status==200){ this.total = res.result.count this.couresList = res.result.list; + if(total==0){ + //如果没有就跳转到其它页面 + this.$router.push({ path: "/uc/study/courses" }) + } }else{ this.$message.error('查询数据失败:'+res.message); }