Browse Source

编辑资料需要审核

dev
李可松 4 years ago
parent
commit
fa0d42c2dc
  1. 4
      app/AdminAgent/Forms/AgentInfo.php
  2. 4
      app/AdminSupplier/Forms/SupplierInfo.php

4
app/AdminAgent/Forms/AgentInfo.php

@ -1,6 +1,7 @@
<?php
namespace App\AdminAgent\Forms;
use App\Common\UserStatus;
use App\Models\Agent;
use Dcat\Admin\Admin;
use Dcat\Admin\Widgets\Form;
@ -28,6 +29,7 @@ class AgentInfo extends Form
$model->logo = $input['logo'];
$model->avatar = $input['avatar'];
$model->license_pic = $input['license_pic'];
$model->status = UserStatus::UNAUDITED;
$model->agentInfo->about = $input['agentInfo']['about'];
$model->agentInfo->reg_protocol = $input['agentInfo']['reg_protocol'];
@ -57,6 +59,8 @@ class AgentInfo extends Form
$this->editor('agentInfo.about')->required();
$this->editor('agentInfo.reg_protocol')->required();
$this->editor('agentInfo.buy_protocol')->required();
$this->confirm('编辑确认', '编辑内容需要管理员重新审核,确定要提交吗?');
}
/**

4
app/AdminSupplier/Forms/SupplierInfo.php

@ -2,6 +2,7 @@
namespace App\AdminSupplier\Forms;
use App\Common\UserStatus;
use App\Models\Supplier;
use Dcat\Admin\Admin;
use Dcat\Admin\Widgets\Form;
@ -29,6 +30,7 @@ class SupplierInfo extends Form
$model->avatar = $input['avatar'];
$model->logo = $input['logo'];
$model->license_pic = $input['license_pic'];
$model->status = UserStatus::UNAUDITED;
$model->save();
return $this->response()->success('保存成功')->refresh();
@ -49,6 +51,8 @@ class SupplierInfo extends Form
$this->image('avatar');
$this->image('logo')->required();
$this->image('license_pic')->required();
$this->confirm('编辑确认', '编辑内容需要管理员重新审核,确定要提交吗?');
}
/**

Loading…
Cancel
Save