Browse Source

订单默认1440分钟改为60

develop
李可松 4 years ago
parent
commit
c6e3bf9049
  1. 2
      app/AdminAgent/Forms/Setting.php
  2. 2
      app/Http/Controllers/Api/OrderController.php

2
app/AdminAgent/Forms/Setting.php

@ -32,7 +32,7 @@ class Setting extends Form
*/ */
public function form() public function form()
{ {
$this->text('order_timeout')->required()->default(1440)
$this->text('order_timeout')->required()->default(60)
->help('订单超时时间,单位:分钟。(订金、定金支付的超时时间将根据产品设定的超时时间)'); ->help('订单超时时间,单位:分钟。(订金、定金支付的超时时间将根据产品设定的超时时间)');
$this->radio('auto_shelves')->options(['否', '是'])->required()->default(1) $this->radio('auto_shelves')->options(['否', '是'])->required()->default(1)
->help('是否自动上架合作供应商的产品,如果选是,当合作供应商发布新产品之后,将自动上架供应商的产品'); ->help('是否自动上架合作供应商的产品,如果选是,当合作供应商发布新产品之后,将自动上架供应商的产品');

2
app/Http/Controllers/Api/OrderController.php

@ -164,7 +164,7 @@ class OrderController extends Controller
} else if ($formData['pay_type'] == PayType::EARNEST_PAY && $ap->earnest_timeout > 0) { } else if ($formData['pay_type'] == PayType::EARNEST_PAY && $ap->earnest_timeout > 0) {
$timeout = date('Y-m-d H:i:s', time() + $ap->earnest_timeout * 60); $timeout = date('Y-m-d H:i:s', time() + $ap->earnest_timeout * 60);
} else { } else {
$order_timeout = AgentSetting::val($this->agent_id, 'order_timeout') ?? 1440;
$order_timeout = AgentSetting::val($this->agent_id, 'order_timeout') ?? 60;
$timeout = date('Y-m-d H:i:s', time() + $ap->earnest_timeout * $order_timeout); $timeout = date('Y-m-d H:i:s', time() + $ap->earnest_timeout * $order_timeout);
} }

Loading…
Cancel
Save