diff --git a/app/controller/PayController.php b/app/controller/PayController.php index 8f0f6ef..42081b3 100644 --- a/app/controller/PayController.php +++ b/app/controller/PayController.php @@ -218,6 +218,9 @@ class PayController $path = '../runtime/order.json'; if ($is_user) { $orders = Order::scope('activeOrder')->field('id,pid,aid,cid')->select(); + if (!file_exists($path)) { + file_put_contents($path, '[]'); + } $old_info = file_get_contents($path); $num = count($orders); if ($num > 0) { diff --git a/public/order.php b/public/order.php index 6c9ebe7..69432bd 100644 --- a/public/order.php +++ b/public/order.php @@ -1,4 +1,9 @@