From 8e01ca53c01cf2dc123fff3e69bbf047560dbf7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Fri, 2 Feb 2024 17:32:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=91=E6=9F=9A=E9=9D=99=E6=80=81=20?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E4=BF=AE=E6=94=B94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/jinyou/model/UserPrice.php | 2 +- fastphp/base/Controller.php | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/app/jinyou/model/UserPrice.php b/app/jinyou/model/UserPrice.php index 2c76a60..6054ba1 100644 --- a/app/jinyou/model/UserPrice.php +++ b/app/jinyou/model/UserPrice.php @@ -15,7 +15,7 @@ class UserPrice extends Model //根据用户价格 if ($discount != 0) { if ($discount == -1) { - $price = $$this->getOne(['UserId' => $user_id,'PackageId' => $package_info['Id']])['UserPrice']; + $price = $this->getOne(['UserId' => $user_id,'PackageId' => $package_info['Id']])['UserPrice']; } else { $scheme_model = new PriceScheme; $discount = $scheme_model->getone(['Id' => $discount])['discount']; diff --git a/fastphp/base/Controller.php b/fastphp/base/Controller.php index b9ba4e5..0dfd387 100644 --- a/fastphp/base/Controller.php +++ b/fastphp/base/Controller.php @@ -5,7 +5,7 @@ * @Author: kangkang * @Date: 2020-09-30 17:32:46 * @LastEditors: “wanyongkang” “937888580@qq.com” - * @LastEditTime: 2024-02-02 17:27:51 + * @LastEditTime: 2024-02-02 17:30:32 */ namespace fastphp\base; @@ -22,11 +22,6 @@ class Controller //初始化属性,实例化对应模型 public function __construct($controller,$action) { - if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') { - header('HTTP/1.1 405 Method Not Allowed'); - header('Allow: GET, POST, PUT, DELETE'); - exit; - } $data = json_decode(file_get_contents("php://input"),true); $getPayload = false; if(isset($data['cookie'])){