axios无法发送header

                axios.post(this.url + 'vdata_cate/getVdataCate', {
                    params: {
                        id: 3,
                        name: 'abc'
                    },
                    headers: {
                        'token': '123123213123'
                    }
                }).then((response) => {

                    console.log(response.data);

                    this.data1 = response.data.r;
                    this.totalnumber = response.data.totalnumber;
                });

image.png

阅读 288
评论
    4 个回答

    你的请求是post请求,用params传参干啥,headers写错地方了