统一定义一个部门名称截断的处理

This commit is contained in:
daihh
2022-06-08 20:52:11 +08:00
parent 6dabf8a0fd
commit cf138e3365
4 changed files with 33 additions and 23 deletions

View File

@@ -137,7 +137,7 @@
<interactBar :type="3" :readonly="true" :data="ca" :shares="false" :views="false"></interactBar>
</div>
<div style="height:40px;margin-top:10px">
<authorInfo :avatar="ca.authorInfo.avatar" :name="ca.authorInfo.name" :sex="ca.authorInfo.sex"></authorInfo></div>
<authorInfo :avatar="ca.authorInfo.avatar" :info="ca.authorInfo.orgInfo" :name="ca.authorInfo.name" :sex="ca.authorInfo.sex"></authorInfo></div>
</div>
</div>
</div>
@@ -331,7 +331,7 @@ import ad from '@/components/Portal/adFloat.vue';
import interactRowBar from '@/components/Portal/interactRowBar.vue';
import courseImage from '@/components/Course/courseImage.vue';
import articleImage from '@/components/Article/articleImage.vue';
import { toScore} from '@/utils/tools.js';
import { toScore,cutFullName} from '@/utils/tools.js';
export default {
name: 'index',
components: { portalHeader,ad, portalFooter, articleImage, portalFloatTools, authorInfo, interactRowBar, interactBar, courseImage },
@@ -493,7 +493,9 @@ export default {
list.forEach((item, index) => {
res.result.some(author => {
if (author.aid == item.authorId) {
author.orgInfo=cutFullName(author.orgInfo,1);
item.authorInfo = author;
return true;
} else {
return false;