axios mass participation issues

1.params mass participation, the background will not receive post here

updateStatus:function (id,status) {
                var _this = this;
                axios.get("/seller/updateStatus.do",{params:{id:id,status:status}}).then(function (response) {
                    alert(response.data.msg);
                    if(response.data.success)
                        _this.pageHandler(1);
                }).catch(function (reason) {
                    console.log(reason);
                });
            },

2. passing arrays

axios.post("/brand/deleteBrand.do", Qs.stringify({deleteId: this.brandSelected}, {indices: false})
            ).then(function (response) {
                alert(response.data.msg);
                if (response.data.success) {
                    _this.pageHandler(1);
                }
            }).catch(function (reason) {
                console.log(reason);
            });

3. The transfer object, to accept a background note json format must be transferred at requestBody

axios.post(url, this.brand).then(function (response) {
                alert(response.data.msg);
                if (response.data.success) {
                    _this.pageHandler(1);
                }
            }).catch(function (reason) {
                console.log(reason);
            });
Published 47 original articles · won praise 6 · views 2203

Guess you like

Origin blog.csdn.net/weixin_44467251/article/details/102642170