12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace app\controller\admin\user;
- use app\common\AdminBaseController;
- use app\Request;
- use app\services\user\UserGroupServices;
- use think\exception\ValidateException;
- class UserGroup extends AdminBaseController
- {
-
- public function __construct(Request $request, UserGroupServices $services)
- {
- parent::__construct($request);
- $this->service = $services;
- $this->createParams = [
- ['group_name', '', '', '', function ($value) {
- if (!$value) throw new ValidateException('请输入分组名称');
- }],
- ];
- $this->saveDeal = $this->updateDeal = function (&$data) {
- if (!$data['group_name']) throw new ValidateException('请输入分组名称');
- };
- }
- }
|