mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-20 16:26:43 +08:00
提交修改
This commit is contained in:
@@ -46,7 +46,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-badge>
|
</el-badge>
|
||||||
<div>
|
<div>
|
||||||
<a :href="`${webBaseUrl}${isTiao ? '/uc/study/task' : '/uc/study/courses'}`">
|
<a :href="`${webBaseUrl}${'/uc/study/task?identity=1'}`">
|
||||||
<el-avatar :src="userInfo.avatar" v-if="userInfo.avatar !== '' "></el-avatar>
|
<el-avatar :src="userInfo.avatar" v-if="userInfo.avatar !== '' "></el-avatar>
|
||||||
<div v-else class="uavatar">
|
<div v-else class="uavatar">
|
||||||
<div v-if="sex === 1 "><img src="../../public/images/Avatarman.png" alt=""></div>
|
<div v-if="sex === 1 "><img src="../../public/images/Avatarman.png" alt=""></div>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<el-link type="primary" style="margin-right:10px;" :href="`${webBaseUrl}${isTiao ? '/uc/study/task' : '/uc/study/courses'}`" :underline="false">个人中心</el-link>
|
<el-link type="primary" style="margin-right:10px;" :href="`${webBaseUrl}${'/uc/study/task?identity=1'}`" :underline="false">个人中心</el-link>
|
||||||
<el-link type="primary" @click="logout()" icon="el-icon-switch-button" :underline="false">退出</el-link>
|
<el-link type="primary" @click="logout()" icon="el-icon-switch-button" :underline="false">退出</el-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -117,13 +117,13 @@ export default {
|
|||||||
// cmtask_status:this.cmtask_status,
|
// cmtask_status:this.cmtask_status,
|
||||||
// cmtask_name:this.cmtask_name,
|
// cmtask_name:this.cmtask_name,
|
||||||
};
|
};
|
||||||
apiBoeCourse.cmtaskList(params).then(res => {
|
// apiBoeCourse.cmtaskList(params).then(res => {
|
||||||
if (res.status == 200 && res.result.count > 0) {
|
// if (res.status == 200 && res.result.count > 0) {
|
||||||
this.isTiao = true;
|
// this.isTiao = true;
|
||||||
} else {
|
// } else {
|
||||||
this.isTiao = false;
|
// this.isTiao = false;
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
handleCommand(val) {
|
handleCommand(val) {
|
||||||
let urlPre=window.location.protocol+'//'+window.location.host;
|
let urlPre=window.location.protocol+'//'+window.location.host;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
if(this.toUrl){
|
if(this.toUrl){
|
||||||
location.href=this.toUrl;
|
location.href=this.toUrl;
|
||||||
}else{
|
}else{
|
||||||
this.$router.push({ path: "/study/index" })
|
this.$router.push({ path: "/uc/study/task" })
|
||||||
}
|
}
|
||||||
//this.$router.push({ path: "/index" })
|
//this.$router.push({ path: "/index" })
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
this.$store.dispatch("portal/SetLoginRememberMe", rememberMeOjb)
|
this.$store.dispatch("portal/SetLoginRememberMe", rememberMeOjb)
|
||||||
}
|
}
|
||||||
//console.log(this.redirect,'this.redirect');
|
//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;
|
$this.loading = false;
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -131,32 +131,32 @@
|
|||||||
// cmtask_name:this.cmtask_name,
|
// cmtask_name:this.cmtask_name,
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
this.loading = false;
|
// this.loading = false;
|
||||||
if(this.$route.fullPath != '/uc/study/task' && this.$route.fullPath != '/uc/study/courses' && this.$route.fullPath != '/study/index') {
|
// if(this.$route.fullPath != '/uc/study/task' && this.$route.fullPath != '/uc/study/courses' && this.$route.fullPath != '/study/index') {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
if(res.result.count > 0) {
|
// if(res.result.count > 0) {
|
||||||
this.$router.push('/uc/study/task')
|
// this.$router.push('/uc/study/task')
|
||||||
} else {
|
// } else {
|
||||||
if(this.$route.query.study == '1') {
|
// if(this.$route.query.study == '1') {
|
||||||
this.$router.push('/uc/study/task')
|
// this.$router.push('/uc/study/task')
|
||||||
} else {
|
// } else {
|
||||||
this.$router.push('/uc/study/courses')
|
// this.$router.push('/uc/study/courses')
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}else{
|
// }else{
|
||||||
this.$router.push('/uc/study/courses')
|
// this.$router.push('/uc/study/courses')
|
||||||
}
|
// }
|
||||||
}).catch(err=>{
|
// }).catch(err=>{
|
||||||
if(this.$route.fullPath != '/uc/study/task' || this.$route.fullPath != '/uc/study/courses' || this.$route.fullPath != '/study/index') {
|
// if(this.$route.fullPath != '/uc/study/task' || this.$route.fullPath != '/uc/study/courses' || this.$route.fullPath != '/study/index') {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
this.$router.push('/uc/study/courses');
|
// this.$router.push('/uc/study/courses');
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
//this.$router.push('/uc/study/courses');
|
//this.$router.push('/uc/study/courses');
|
||||||
|
|||||||
@@ -140,6 +140,10 @@ export default {
|
|||||||
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.$router.push({ path: "/uc/study/courses" })
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
this.$message.error('查询数据失败:'+res.message);
|
this.$message.error('查询数据失败:'+res.message);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user