提交跳转修改

This commit is contained in:
daihh
2022-09-09 17:44:32 +08:00
parent 3daca5ae07
commit 95ad0c0db0
3 changed files with 11 additions and 3 deletions

View File

@@ -23,7 +23,7 @@
<span>学习时长{{userInfo.studyTotalH}}小时</span>
</div>
<div>
<router-link to="/study/index"><span :class="{identity:true,active:curIdentity==1}" @click="setCurIdentity(1)">学员</span></router-link>
<router-link to="/uc/study/task"><span :class="{identity:true,active:curIdentity==1}" @click="setCurIdentity(1)">学员</span></router-link>
<router-link to="/teacher/index"><span v-if="identity == 2 || identity == 5" :class="{identity:true,active:curIdentity==2}" @click="setCurIdentity(2)">教师</span></router-link>
<router-link to="/manager/index"><span v-if="identity == 3 || identity == 5" :class="{identity:true,active:curIdentity==3}" @click="setCurIdentity(3)">管理员</span></router-link>
</div>

View File

@@ -73,6 +73,10 @@ const user = {
}
})
},
//
SetTaskCount({ commit }, count) {
commit('SET_StudyTaskCount', count);
},
//设置用户身份
SetIdentity({ commit }, iden) {
return new Promise((resolve) => {

View File

@@ -136,13 +136,17 @@ export default {
cmtask_name:this.params.cmtask_name,
}
this.loading=true;
let $this=this;
apiBoeCourse.cmtaskList(params).then(res=>{
if(res.status==200){
this.total = res.result.count
this.couresList = res.result.list;
if(total==0){
//this.$store.commit('user/SET_StudyTaskCount',res.result.count);
//this.$store.dispatch('user/SetTaskCount',res.result.count);
if(this.total==0){
//如果没有就跳转到其它页面
this.$router.push({ path: "/uc/study/courses" })
this.$router.push("/uc/study/courses")
}
}else{
this.$message.error('查询数据失败:'+res.message);