feat: 完善合同上传

master
yin5th 2023-08-14 18:17:45 +08:00
parent 95fe7bd981
commit 4346bc718c
1 changed files with 16 additions and 1 deletions

View File

@ -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('操作成功!');
}
/**