mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 11:56:44 +08:00
图片显示问题
This commit is contained in:
@@ -65,10 +65,10 @@ export default {
|
|||||||
},
|
},
|
||||||
imageUrl() {
|
imageUrl() {
|
||||||
this.isShow = false;
|
this.isShow = false;
|
||||||
if(this.course && this.course.coverImg && this.course.coverImg.startsWith('h')) {
|
if(this.course && this.course.coverImg && this.course.coverImg.startsWith('http')) {
|
||||||
return this.course.coverImg;
|
return this.course.coverImg;
|
||||||
}
|
}
|
||||||
if(this.course && this.course.courseImage && this.course.courseImage.startsWith('h')) {
|
if(this.course && this.course.courseImage && this.course.courseImage.startsWith('http')) {
|
||||||
return this.course.courseImage;
|
return this.course.courseImage;
|
||||||
}
|
}
|
||||||
if (this.course && this.course.coverImg && this.course.coverImg != "") {
|
if (this.course && this.course.coverImg && this.course.coverImg != "") {
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ export default {
|
|||||||
if(flag){
|
if(flag){
|
||||||
this.page.pageIndex=1;
|
this.page.pageIndex=1;
|
||||||
}
|
}
|
||||||
|
let $this=this;
|
||||||
this.isSearch=false;
|
this.isSearch=false;
|
||||||
let reqData={
|
let reqData={
|
||||||
courseName:this.params.courseName,
|
courseName:this.params.courseName,
|
||||||
@@ -198,6 +199,11 @@ export default {
|
|||||||
this.loading=true;
|
this.loading=true;
|
||||||
apiCourseStudy.myStudysFromES(reqData).then(res=>{
|
apiCourseStudy.myStudysFromES(reqData).then(res=>{
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
|
res.result.list.forEach(item=>{
|
||||||
|
if(item.courseImage.startsWith('/upload')){
|
||||||
|
item.courseImage=$this.fileUrl+item.courseImage.substring(7)
|
||||||
|
}
|
||||||
|
})
|
||||||
this.couresList=res.result.list;
|
this.couresList=res.result.list;
|
||||||
this.page.count=res.result.count;
|
this.page.count=res.result.count;
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in New Issue
Block a user