diff --git a/src/utils/tools.js b/src/utils/tools.js index 8a655c2a..185fb2cc 100644 --- a/src/utils/tools.js +++ b/src/utils/tools.js @@ -23,7 +23,7 @@ export const cutFullName = (fullName,num) => { }; /**截取机构名称路径namePath最后两段,不包含第一个 */ -export const cutOrgNamePath = (namePath,firstOrder = -1) => { +export const cutOrgNamePath = (namePath) => { let newName=namePath; //debugger if(newName){ @@ -36,9 +36,6 @@ export const cutOrgNamePath = (namePath,firstOrder = -1) => { if(!newName){ newName=names[0] } - if(firstOrder == 0){ - newName=names[0] - } } // if(names.length>1){ diff --git a/src/views/portal/course/Detail.vue b/src/views/portal/course/Detail.vue index e82feb3d..0a284846 100644 --- a/src/views/portal/course/Detail.vue +++ b/src/views/portal/course/Detail.vue @@ -121,7 +121,7 @@
{{ item.teacherName }}
-
{{ cutOrgNamePath(item.orgInfo,0) }}
+
{{ cutOrgNamePath(item.orgInfo) }}
diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index 5ad21d41..ea7dd297 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -243,7 +243,7 @@ -
{{cutOrgNamePath(item.authorInfo.orgInfo,0)}}
+
{{cutOrgNamePath(item.authorInfo.orgInfo)}}