has been blocked by CORS policy: Request header field mall is not allowed by Access-Control-Allow-Headers in preflight response
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘statusText’)
报错原因是服务器端对未设置的自定义请求头进行了拦截
需要在项目中查找到 Access-Control-Allow-Headers 进行设置
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, roleId, Authorization");