Vue-resource sends a request to the server, but the server cannot receive the parameters.

this.$http.post("http://192.168.1.37/app/getPhoneRightCode.action", {
    params: {
        "session": sessionStorage,
        "phone": phone_num,
        "type": 1
    }
}).then(response => {
    console.log(response);
})

the method is called successfully, but the server shows that all three parameters are null,. It is estimated that there is something wrong with the front end.

Mar.02,2021

this problem just open the network of the browser to see the parameters of the request


the server-side method needs to use req.query to get the parameters you pass

Menu