mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 14:26:43 +08:00
提交跳转修改
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
<span>学习时长:{{userInfo.studyTotalH}}小时</span>
|
<span>学习时长:{{userInfo.studyTotalH}}小时</span>
|
||||||
</div>
|
</div>
|
||||||
<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="/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>
|
<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>
|
</div>
|
||||||
|
|||||||
@@ -73,6 +73,10 @@ const user = {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//
|
||||||
|
SetTaskCount({ commit }, count) {
|
||||||
|
commit('SET_StudyTaskCount', count);
|
||||||
|
},
|
||||||
//设置用户身份
|
//设置用户身份
|
||||||
SetIdentity({ commit }, iden) {
|
SetIdentity({ commit }, iden) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
|
|||||||
@@ -136,13 +136,17 @@ export default {
|
|||||||
cmtask_name:this.params.cmtask_name,
|
cmtask_name:this.params.cmtask_name,
|
||||||
}
|
}
|
||||||
this.loading=true;
|
this.loading=true;
|
||||||
|
let $this=this;
|
||||||
apiBoeCourse.cmtaskList(params).then(res=>{
|
apiBoeCourse.cmtaskList(params).then(res=>{
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
this.total = res.result.count
|
this.total = res.result.count
|
||||||
this.couresList = res.result.list;
|
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{
|
}else{
|
||||||
this.$message.error('查询数据失败:'+res.message);
|
this.$message.error('查询数据失败:'+res.message);
|
||||||
|
|||||||
Reference in New Issue
Block a user