修改fileBaseUrl路径

This commit is contained in:
weinan2087
2022-10-17 20:10:56 +08:00
parent a3487c3841
commit a56f74ae21

View File

@@ -179,8 +179,8 @@
<div class="teacher" v-for="(item, idx) in teachers" :key="idx"> <div class="teacher" v-for="(item, idx) in teachers" :key="idx">
<div class="teacher-avator"> <div class="teacher-avator">
<!-- <div class="teacher-text" v-if="item.authorInfo.avatar == ''">{{userAvatarText(item.teacherName)}}</div> --> <!-- <div class="teacher-text" v-if="item.authorInfo.avatar == ''">{{userAvatarText(item.teacherName)}}</div> -->
<div v-if="item.authorInfo.avatar !== ''"> <div v-if="item.avatar !== ''">
<el-avatar :src="fileBaseUrl + item.authorInfo.avatar" shape="circle" :size="50"></el-avatar> <el-avatar :src="item.avatar" shape="circle" :size="50"></el-avatar>
</div> </div>
<div v-else class="teacher-text"> <div v-else class="teacher-text">
<div v-if="item.authorInfo.sex === 1 "><img src="../../../public/images/Avatarman.png" alt=""></div> <div v-if="item.authorInfo.sex === 1 "><img src="../../../public/images/Avatarman.png" alt=""></div>
@@ -306,7 +306,7 @@
totalContent: 0, //课程内容数量 totalContent: 0, //课程内容数量
pageCount: 0, pageCount: 0,
currentPage: 0, currentPage: 0,
fileBaseUrl: this.$xpage.constants.fileBaseUrl, fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
contentList: [], contentList: [],
sectionList: [], sectionList: [],
teachers: [], teachers: [],
@@ -766,6 +766,9 @@
res.result.some(author => { res.result.some(author => {
if (author.aid == item.teacherId) { if (author.aid == item.teacherId) {
item.authorInfo = author; item.authorInfo = author;
if(author.avatar){
item.avatar=this.fileBaseUrl + author.avatar;
}
return true; return true;
} else { } else {
return false; return false;