## 3.1得到的数据要在data函数里注册
```
data(){
return{
imgUrl:"",
title:"",
summary:""
}
},
mounted(){
var id = this.$route.params.id;
var url = "https://douban.uieee.com/v2/movie/subject/";
axios.jsonp(url+id).then(res=>{
this.imgUrl = res.images.small;
//this.imgUrl 指data里的imgUrl 和小程序区别,小程序是this.data.imgUrl
this.title = res.title;
this.summary = res.summary
})
}
```
## 3.2使用
```
<template>
<div class="about">
<img :src="imgUrl" alt="">
<h4>{{title}}</h4>
<p>{{summary}}</p>
</div>
</template>
```
## 3.3 组件中注册接收到的数据
```
props: {
movie: {
type: Object
}
},
```