美文网首页
记录vue一个小坑

记录vue一个小坑

作者: 力丸x | 来源:发表于2018-01-30 10:39 被阅读9次

发送post和get请求的参数key值有区别


//get发送参数

this.$http.get('http://xxx', {

    params:{         // params为固定的对象

            userName:xxx,

            password:xxx

    }              

});

//post发送参数

this.$http.post('http://xxx', {   

        key:xxx                //  key 为任意写的参数key值

});

相关文章

网友评论

      本文标题:记录vue一个小坑

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