美文网首页
axios请求

axios请求

作者: 天天向上er | 来源:发表于2019-08-12 14:00 被阅读0次

getData(){

            let api = 'xxx/getMyOrders?user_id=199'

            Axios.get(api).then((response)=>{

              console.log('res=',response)

              this.list = response.data;

            })

            .catch((error)=>{

              console.log('err=',error)

            })

        }

// axios不支持jsonp类型

// 用fetch jsonp来请求

相关文章

网友评论

      本文标题:axios请求

      本文链接:https://www.haomeiwen.com/subject/zpqujctx.html