🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
​ 在入口文件里面加上下面这段代码就ok了 点击链接加入群聊【ThinkPHP56小功能】:[正在跳转](https://jq.qq.com/?_wv=1027&k=Z0c641WP "正在跳转")  ``` ​// [ 应用入口文件 ] if(isset($_SERVER["HTTP_ORIGIN"])) { header('Access-Control-Allow-Origin:'.$_SERVER["HTTP_ORIGIN"]); } header("Access-Control-Allow-Credentials: true"); header("Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With,Access-Token"); header("Access-Control-Allow-Methods: GET,POST,INPUT,OPTION"); if (strtoupper($_SERVER['REQUEST_METHOD']) == 'OPTIONS') { header('Access-Control-Allow-Origin:'.$_SERVER["HTTP_ORIGIN"]); header("Access-Control-Allow-Credentials: true"); header("Access-Control-Allow-Headers: Content-Type,access_token,Keep-Alive,X-Requested-With"); header("Access-Control-Allow-Methods: GET,POST,INPUT,OPTION"); http_response_code(200); exit; } ```