SOURCE

console 命令行工具 X clear

                    
>
console
<script src="https://cdn.staticfile.org/vue-resource/1.5.1/vue-resource.min.js"></script>


<div id="app">
    <input type="button" value="获取" @click="getl" />{{msg}}
</div>


<script>

    var vm = new Vue({
        el:'#app',
        data:{msg:111},
        methods:{
            getl(){
                this.$http.get('http://v.juhe.cn/toutiao/index?type=top&key=APPKEY')
                .then(function(res){
                    console.log(res.body.data)
                },function(){
                    console.log("err")
                })
            }
        }
    })

</script>

本项目引用的自定义外部资源