修改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-avator">
<!-- <div class="teacher-text" v-if="item.authorInfo.avatar == ''">{{userAvatarText(item.teacherName)}}</div> -->
<div v-if="item.authorInfo.avatar !== ''">
<el-avatar :src="fileBaseUrl + item.authorInfo.avatar" shape="circle" :size="50"></el-avatar>
<div v-if="item.avatar !== ''">
<el-avatar :src="item.avatar" shape="circle" :size="50"></el-avatar>
</div>
<div v-else class="teacher-text">
<div v-if="item.authorInfo.sex === 1 "><img src="../../../public/images/Avatarman.png" alt=""></div>
@@ -208,7 +208,7 @@
</template>
<script>
import { mapGetters } from 'vuex';
import portalHeader from "@/components/PortalHeader.vue";
import portalFooter from "@/components/PortalFooter.vue";
import comments from "@/components/Portal/comments.vue";
@@ -306,7 +306,7 @@
totalContent: 0, //课程内容数量
pageCount: 0,
currentPage: 0,
fileBaseUrl: this.$xpage.constants.fileBaseUrl,
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
contentList: [],
sectionList: [],
teachers: [],
@@ -336,7 +336,7 @@
appendStudyOtherHandle:null,
}
},
mounted() {
this.$watermark.set(this.userInfo.name + this.userInfo.loginName);
this.courseId = this.$route.query.id;
@@ -381,10 +381,10 @@
methods: {
Fn1(){
console.log('子组件发生变化');
// this.componentKey += 1;
// this.componentKey += 1;
// this.$forceUpdate();
// window.location.reload()
// this.coutab(3);
// this.coutab(3);
this.timer = new Date().getTime()
},
@@ -766,6 +766,9 @@
res.result.some(author => {
if (author.aid == item.teacherId) {
item.authorInfo = author;
if(author.avatar){
item.avatar=this.fileBaseUrl + author.avatar;
}
return true;
} else {
return false;
@@ -966,7 +969,7 @@
});
}
this.courseInfo = rs.result.course;
if (rs.result.teachers && rs.result.teachers.length > 0) {
let userIds = [];
let ctoUsers = [];