Commit e2546370 authored by Mac's avatar Mac

地址处理

parent 8fcf4250
......@@ -252,33 +252,47 @@
},
res => {
this.courseList = res.data.pageData;
this.selectcourse=this.courseList[this.index];
this.count =res.data.count;
this.img=[];
this.courseList[this.index].ImageList.forEach((x) => {
this.img.push(x.Path);
});
this.loading=true;
this.learned=0;
this.courseList.forEach(x=>{
if(x.IsRead==1){
if(this.courseList.length>0){
this.courseList.forEach(x=>{
if(x.ImageList.length>0){
x.ImageList.forEach(j=>{
if(j.Path!='' && j.Path.indexOf('http://') ==-1){//对图片地址的不对做处理
console.log(j.Path)
j.Path= j.Path.replace('http:/','http://')
console.log(j.Path)
}
})
}
})
this.selectcourse=this.courseList[this.index];
this.count =res.data.count;
this.img=[];
this.courseList[this.index].ImageList.forEach((x) => {
this.img.push(x.Path);
});
this.loading=true;
this.learned=0;
this.courseList.forEach(x=>{
if(x.IsRead==1){
this.learned++;
}
})
if(this.selectcourse.IsRead==0){
this.learned++;
}
})
if(this.selectcourse.IsRead==0){
this.learned++;
}
let obj = {
id:this.id,
name:this.name,
cover_pic:this.cover_pic,
Sort:this.selectcourse.Sort,
learned:this.learned,
count:this.count,
let obj = {
id:this.id,
name:this.name,
cover_pic:this.cover_pic,
Sort:this.selectcourse.Sort,
learned:this.learned,
count:this.count,
}
uni.setStorageSync("laststudy", obj);
this.setMyCourseStudyOK()//课程已阅读
}
uni.setStorageSync("laststudy", obj);
this.setMyCourseStudyOK()//课程已阅读
}
);
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment