類似于這個 https://segmentfault.com/q/1010000017073493
跟這個問題一樣,但是我配置了跨域
uj5u.com熱心網友回復:
大佬們,https://segmentfault.com/q/1010000017073493/a-1020000017074611類似于這個問題,跪求uj5u.com熱心網友回復:
export const postRequest = (url, params) => {
return axios({
method: 'post',
url: `${base}${url}`,
data: params,
transformRequest: [function (data) {
let ret = ''
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
}
return ret
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
"withCredentials": true
}
});
}
uj5u.com熱心網友回復:
請問這個解決了嗎,最近也遇到同樣的問題,跨域登錄成功,可以看到response中的cookie,但是訪問其他埠時報403轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/8242.html
標籤:Web 開發
上一篇:求助:同步資料
