From 842fcfcabcd9da119e4bc8a218eee1b9fd2c120b Mon Sep 17 00:00:00 2001 From: daihh Date: Thu, 3 Nov 2022 13:42:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=B9=E6=AE=8A=E6=9C=BA?= =?UTF-8?q?=E6=9E=84=E5=AD=97=E6=AE=B5=E6=88=AA=E5=8F=96=E7=9A=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF=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/utils/tools.js | 5 +++++ src/views/Login.vue | 1 + src/views/course/TeacherList.vue | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/utils/tools.js b/src/utils/tools.js index 627159bb..84b10636 100644 --- a/src/utils/tools.js +++ b/src/utils/tools.js @@ -25,6 +25,7 @@ export const cutFullName = (fullName,num) => { /**截取机构名称路径namePath最后两段,不包含第一个 */ export const cutOrgNamePath = (namePath) => { let newName=namePath; + //debugger if(newName){ let names=newName.split('/'); let len=names.length; @@ -32,7 +33,11 @@ export const cutOrgNamePath = (namePath) => { if(len>1){ //newName=names[len-2]+'/'+names[len-1]; newName=names[1]; + if(!newName){ + newName=names[0] + } } + // if(names.length>1){ // newName=names[1]; // if(num==2){ diff --git a/src/views/Login.vue b/src/views/Login.vue index dfb1ee2d..fea0a8dd 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -67,6 +67,7 @@ } }, mounted() { + //console.log(process.env,'process.env'); this.refreshCode(); if(this.portalLoginRememberMe && this.portalLoginRememberMe.rememberMe){ diff --git a/src/views/course/TeacherList.vue b/src/views/course/TeacherList.vue index 7f34fd2f..790705cf 100644 --- a/src/views/course/TeacherList.vue +++ b/src/views/course/TeacherList.vue @@ -257,6 +257,8 @@ export default { const { status } = await apiCourse.del(params); if (status === 200) { this.$message.success('操作成功!'); + //发送自己删除课程的事件 + this.getList(); } } catch (error) {