From a1bdb78747c11474507cc8e8426c02628cf47f3f Mon Sep 17 00:00:00 2001 From: daihh Date: Fri, 13 Jan 2023 10:43:42 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/HomePage/homePage.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/HomePage/homePage.vue b/src/components/HomePage/homePage.vue index 7a15a068..ab672f37 100644 --- a/src/components/HomePage/homePage.vue +++ b/src/components/HomePage/homePage.vue @@ -187,7 +187,8 @@ this.teachtext.workExperience = res.result.workExperience; this.teachtext.courses = res.result.courses; this.tearchUrl = this.fileBaseUrl + res.result.photo; - apiBoeTeahcer.simpleInfo(this.userInfo.sysId).then(sinfo=>{ + //通过用户的sysId(原系统中的kid)去取用户 + apiBoeTeahcer.simpleInfo(res.result.sysId).then(sinfo=>{ if(sinfo.status=='200'){ if(sinfo.result.courses){ this.teachtext.courses = sinfo.result.courses; From 9f5528e6d311ec411f8dc69ee750680d4dbad341 Mon Sep 17 00:00:00 2001 From: daihh Date: Fri, 13 Jan 2023 10:45:45 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/HomePage/homePage.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/HomePage/homePage.vue b/src/components/HomePage/homePage.vue index ab672f37..e9b7966d 100644 --- a/src/components/HomePage/homePage.vue +++ b/src/components/HomePage/homePage.vue @@ -186,7 +186,12 @@ apiTeach.detailTeacher(this.pageId).then(res =>{ this.teachtext.workExperience = res.result.workExperience; this.teachtext.courses = res.result.courses; - this.tearchUrl = this.fileBaseUrl + res.result.photo; + if(res.result.photo){ + this.tearchUrl = this.fileBaseUrl + res.result.photo; + }else{ + this.tearchUrl =''; + } + //通过用户的sysId(原系统中的kid)去取用户 apiBoeTeahcer.simpleInfo(res.result.sysId).then(sinfo=>{ if(sinfo.status=='200'){ From 6b089493270d7baf493a57a299ee84574c72fcf1 Mon Sep 17 00:00:00 2001 From: daihh Date: Fri, 13 Jan 2023 10:51:23 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=95=99=E5=B8=88=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/HomePage/homePage.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/HomePage/homePage.vue b/src/components/HomePage/homePage.vue index e9b7966d..f1179f6b 100644 --- a/src/components/HomePage/homePage.vue +++ b/src/components/HomePage/homePage.vue @@ -166,7 +166,7 @@ if(this.pageId !== this.userInfo.aid) { this.followHas(); } - this.Teacherprofile(); + this.teacherProfile(); }, @@ -191,7 +191,7 @@ }else{ this.tearchUrl =''; } - + //通过用户的sysId(原系统中的kid)去取用户 apiBoeTeahcer.simpleInfo(res.result.sysId).then(sinfo=>{ if(sinfo.status=='200'){ @@ -226,8 +226,8 @@ }) }) }, - Teacherprofile(){ - apiTeach.has(this.userInfo.aid).then(res =>{ + teacherProfile(){ //检查是否是教师 + apiTeach.has(this.pageId).then(res =>{ this.teaechswich = res.result.isTeacher; }) }, From 58377363b6f2dcd1f4aa152d8ff6af0a8e15b076 Mon Sep 17 00:00:00 2001 From: daihh Date: Fri, 13 Jan 2023 11:13:14 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E6=95=99=E5=B8=88=E8=BA=AB=E4=BB=BD=E7=9A=84=E8=AF=86?= =?UTF-8?q?=E5=88=AB=E6=8C=89=E8=A7=92=E8=89=B2=E8=BA=AB=E4=BB=BD=E6=9D=A5?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/user/Setting.vue | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) 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(){ //执行隐藏操作