Access to XMLHttpRequest at ‘http://www.xiaoleql.com/api/login‘ from origin ‘http://localhost:8080‘
前端加上请求头token之后报错是因为后端没有配置在php中加上这段配置即可header("Access-Control-Allow-Origin:*");header("Access-Control-Allow-Methods:GET,POST,OPTIONS,DELETE");header("Access-Control-Allow-Headers:DNT,X-Mx-ReqToken,Keep