Browse Source

request()改为$input获取

master
李可松 4 years ago
parent
commit
be4bc1f73c
  1. 11
      app/Admin/Forms/SelectHorseman.php

11
app/Admin/Forms/SelectHorseman.php

@ -7,10 +7,7 @@ use App\Admin\Common\Rpc;
use App\Libs\SsdbClient; use App\Libs\SsdbClient;
use App\Models\ImsCjdcMarket; use App\Models\ImsCjdcMarket;
use App\Models\ImsCjdcOrderMain; use App\Models\ImsCjdcOrderMain;
use App\Models\LanzuServiceHorseman;
use App\Models\v3\LanzuEmployees; use App\Models\v3\LanzuEmployees;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Dcat\Admin\Widgets\Form; use Dcat\Admin\Widgets\Form;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
@ -27,9 +24,9 @@ class SelectHorseman extends Form
protected $orderId; protected $orderId;
public function handle(array $input) public function handle(array $input)
{ {
$hid = request()->input('horseman_id');
$oid = request()->input('order_id');
$current_page = request()->input('current_page');
$hid = $input['horseman_id'];
$oid = $input['order_id'];
$current_page = $input['current_page'] ?? 1;
$horseman = LanzuEmployees::getName($hid);//骑手名称 $horseman = LanzuEmployees::getName($hid);//骑手名称
$result = ImsCjdcOrderMain::where('id',$oid)->update(['shipping_type'=>1,'horseman_id'=>$hid,'delivery_start_time'=>time(),'shipping_name'=>$horseman,'updated_at'=>time()]); $result = ImsCjdcOrderMain::where('id',$oid)->update(['shipping_type'=>1,'horseman_id'=>$hid,'delivery_start_time'=>time(),'shipping_name'=>$horseman,'updated_at'=>time()]);
if ($result){ if ($result){
@ -61,6 +58,4 @@ class SelectHorseman extends Form
$this->hidden('order_id'); $this->hidden('order_id');
$this->hidden('current_page'); $this->hidden('current_page');
} }
} }
Loading…
Cancel
Save