Vue+axios

the first request method:

let customer_id = localStorage.getItem("customer_id")
this.$http.post("/health_record/health_status_list.do",customer_id)

the data returned from the request in this way is empty

clipboard.png

:



clipboard.png

problem description

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Apr.11,2021

let param = new URLSearchParams();
param.append('customer_id', customer_id);
this.$http.post('/health_record/health_status_list.do',param)

Content-type


https://www.cnblogs.com/cooll.

this is a problem with parameter serialization

if I need to send serialization parameters, I will introduce qs

the effect is the same as that of URLSearchParams
(because of URLSearchParams compatibility issues)

it is recommended to read more about http and learn to debug ajax requests with network of f12
http://www.java1234.com/a/jav.

.
Menu