diff --git a/server/app/api/controller/Order.php b/server/app/api/controller/Order.php index a3b18d47..adee5100 100644 --- a/server/app/api/controller/Order.php +++ b/server/app/api/controller/Order.php @@ -27,10 +27,25 @@ class Order extends Api return JsonServer::success('下单成功!', ['path' => $path, 'domain' => request()->domain()]); } + // 合同上传 public function contractUpload() { + $orderId = input('order_id/d'); + $path = input('path/s'); - return JsonServer::success('上传成功!'); + if (empty($orderId) || empty($path)) { + return JsonServer::error('参数错误!'); + } + + if (!$order = \app\common\model\order\Order::where('id', $orderId)->find()) { + return JsonServer::error('订单不存在!'); + } + + $order->save([ + 'frontend_info' => $path + ]); + + return JsonServer::success('操作成功!'); } /**