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