use axios to pass parameters. The initial request header is passed in json format without adding format. The backend says that if formdata is needed, add
to axios.axios.defaults.headers = {
"Content-Type": "application/x-www-form-urlencoded"
}
function fetch(url, params) {
return new Promise((resolve, reject) => {
axios.post(url, params)
.then(response => {
resolve(response.data);
})
.catch((error) => {
reject(error);
})
})
}
pass the parameter format as let content = {openid:openid}; then pass content as an argument to the fetch method
, but the format passed is formdata but still looks like a string (not well understood)
Sorry for being a little incoherent. Please do me a favor.