From aea1565fe57e165ec46e045a4794bf899072465a Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq,com> Date: Tue, 4 Jul 2023 10:28:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B7=A8=E5=9F=9F=E5=85=81?= =?UTF-8?q?=E8=AE=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/application/api/controller/Controller.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/application/api/controller/Controller.php b/source/application/api/controller/Controller.php index 75f173a..c6002fc 100644 --- a/source/application/api/controller/Controller.php +++ b/source/application/api/controller/Controller.php @@ -26,8 +26,10 @@ class Controller extends \think\Controller */ public function _initialize() { - header('Access-Control-Allow-Origin: http://192.168.66.220:8080'); - header('Access-Control-Allow-Credentials: true'); + header("Access-Control-Allow-Origin: http://192.168.66.220:8080"); + header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE"); + header("Access-Control-Allow-Headers: Content-Type"); + header("Access-Control-Allow-Credentials: true"); // 当前小程序id // $this->wxapp_id = $this->getWxappId(); // // 验证当前小程序状态