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'])){