![](https://csdnimg.cn/release/download_crawler_static/86300414/bg5.jpg)
b、课程名称
2、定义数据对象
3、在created钩子方法中获取课程信息
<divclass="navnav‐stacked"v‐for="(teachplan_first,index)inteachplanList">
<divclass="titnav‐justifiedtext‐center"><iclass="pull‐leftglyphicon
glyphicon‐th‐list"></i>{{teachplan_first.pname}}<iclass="pull‐right"></i></div>
<liv‐if="teachplan_first.children!=null"v‐for="(teachplan_second,index)
inteachplan_first.children"><iclass="glyphiconglyphicon‐check"></i>
<a:href="url"@click="study(teachplan_second.id)">
{{teachplan_second.pname}}
</a>
</li>
<divclass="toptext‐center">
{{coursename}}
</div>
data(){
return{
url:'',//当前url
courseId:'',//课程id
chapter:'',//章节Id
coursename:'',//课程名称
coursepic:'',//课程图片
teachplanList:[],//课程计划
playerOptions:{//播放参数
autoplay:false,
controls:true,
sources:[{
type:"application/x‐mpegURL",
src:''
}]
},
}
}
created(){
//当前请求的url
this.url=window.location
//课程id
this.courseId=this.$route.params.courseId
//章节id
this.chapter=this.$route.params.chapter
//查询课程信息
systemApi.course_view(this.courseId).then((view_course)=>{
if(!view_course||!view_course[this.courseId]){
北京市昌平区建材城西路金燕龙办公楼一层 电话:400-618-9090