1. npm i axios-jsonp-pro -S
    2. import axios from 'axios-jsonp-pro';
    3. //使用
    4. mounted(){
    5. var url = "https://douban.uieee.com/v2/movie/in_theaters";
    6. axios.jsonp(url).then(res=>{
    7. this.movies = res.subjects;
    8. })
    9. }
    10. //数据渲染
    11. <template>
    12. <div id="app">
    13. <div class="item" v-for="item of movies" :key="item.id">
    14. <p>{{item.title}}</p>
    15. <!-- vue中属性要使用变量要在前面加: -->
    16. <img :src="item.images.small" alt="">
    17. </div>
    18. </div>
    19. </template>