个人设置,教师身份的识别按角色身份来设置

This commit is contained in:
daihh
2023-01-13 11:13:14 +08:00
parent 6b08949327
commit 58377363b6

View File

@@ -333,7 +333,7 @@
}, },
computed: { computed: {
...mapGetters(['userInfo','sysTypeMap']), ...mapGetters(['userInfo','sysTypeMap','identity']),
avatar(){ avatar(){
if(this.userInfo.avatar){ if(this.userInfo.avatar){
if(this.userInfo.avatar.indexOf('http')==-1){ if(this.userInfo.avatar.indexOf('http')==-1){
@@ -383,15 +383,17 @@
// console.log(rs); // console.log(rs);
this.sysTypeListtear = rs; this.sysTypeListtear = rs;
}); });
this.Teacherprofile(); //this.Teacherprofile();
this.Teacherinfo(); if(this.identity == 2 || this.identity == 5){
this.teaechswich=true;
this.loadTeacherinfo();
}
}, },
methods:{ methods:{
gettearch(){ gettearch(){
// console.log(this.checkboxtearGroup,'lmj'); // console.log(this.checkboxtearGroup,'lmj');
}, },
loadTeacherinfo(){
Teacherinfo(){
this.workname=[]; this.workname=[];
this.checkboxtearGroup=[]; this.checkboxtearGroup=[];
apiTeach.detailTeacher(this.userInfo.aid).then(res =>{ apiTeach.detailTeacher(this.userInfo.aid).then(res =>{
@@ -440,11 +442,11 @@
}) })
}) })
}, },
Teacherprofile(){ // Teacherprofile(){
apiTeach.has(this.userInfo.aid).then(res =>{ // apiTeach.has(this.userInfo.aid).then(res =>{
this.teaechswich = res.result.isTeacher; // this.teaechswich = res.result.isTeacher;
}) // })
}, // },
// 保存个人主页选项的编辑 // 保存个人主页选项的编辑
saveHideHome(){ saveHideHome(){
//执行隐藏操作 //执行隐藏操作