From 2615c45220aa9bff6c4c1f7c2f4039307e960a72 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 27 Oct 2019 19:44:12 +0800 Subject: [PATCH] update --- app/Http/Controllers/OrderController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/OrderController.php b/app/Http/Controllers/OrderController.php index 07e02ece..5ed97fc6 100755 --- a/app/Http/Controllers/OrderController.php +++ b/app/Http/Controllers/OrderController.php @@ -55,13 +55,13 @@ class OrderController extends Controller abort(500, '订阅不存在'); } - if (!($plan->show || $user->plan_id == $plan->id)) { + if (!($plan->show)) { abort(500, '该订阅已售罄'); } $order = new Order(); $order->user_id = $request->session()->get('id'); - $order->plan_id = $plan->id; + $order->plan_data = serialize($plan->toArray()); $order->cycle = $request->input('cycle'); $order->trade_no = Helper::guid(); $order->total_amount = $plan[$request->input('cycle')];