Commit e2546370 authored by Mac's avatar Mac

地址处理

parent 8fcf4250
...@@ -252,33 +252,47 @@ ...@@ -252,33 +252,47 @@
}, },
res => { res => {
this.courseList = res.data.pageData; this.courseList = res.data.pageData;
this.selectcourse=this.courseList[this.index]; if(this.courseList.length>0){
this.count =res.data.count; this.courseList.forEach(x=>{
this.img=[]; if(x.ImageList.length>0){
this.courseList[this.index].ImageList.forEach((x) => { x.ImageList.forEach(j=>{
this.img.push(x.Path); if(j.Path!='' && j.Path.indexOf('http://') ==-1){//对图片地址的不对做处理
}); console.log(j.Path)
this.loading=true; j.Path= j.Path.replace('http:/','http://')
console.log(j.Path)
this.learned=0; }
this.courseList.forEach(x=>{ })
if(x.IsRead==1){ }
})
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++; this.learned++;
} }
}) let obj = {
if(this.selectcourse.IsRead==0){ id:this.id,
this.learned++; name:this.name,
} cover_pic:this.cover_pic,
let obj = { Sort:this.selectcourse.Sort,
id:this.id, learned:this.learned,
name:this.name, count:this.count,
cover_pic:this.cover_pic, }
Sort:this.selectcourse.Sort, uni.setStorageSync("laststudy", obj);
learned:this.learned, this.setMyCourseStudyOK()//课程已阅读
count:this.count,
} }
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