|
...
|
...
|
@@ -3,6 +3,7 @@ |
|
|
|
namespace App\Http\Logic\Aside\Manage;
|
|
|
|
|
|
|
|
|
|
|
|
use App\Helper\Arr;
|
|
|
|
use App\Helper\Common;
|
|
|
|
use App\Http\Logic\Aside\BaseLogic;
|
|
|
|
use App\Models\Manage\Manage;
|
|
...
|
...
|
@@ -59,6 +60,9 @@ class ManageLogic extends BaseLogic |
|
|
|
if($managerInfo !== false){
|
|
|
|
$this->fail('当前手机号码已存在');
|
|
|
|
}
|
|
|
|
if (isset($this->param['rules']) && is_array($this->param['rules'])){
|
|
|
|
$this->param['rules'] = Arr::arrToSet($this->param['rules']);
|
|
|
|
}
|
|
|
|
$this->param['password'] = Hash::make(isset($this->param['password']) ?? 'globalsov6');
|
|
|
|
$this->model->add($this->param);
|
|
|
|
$this->success();
|
|
...
|
...
|
@@ -93,6 +97,9 @@ class ManageLogic extends BaseLogic |
|
|
|
if(isset($this->param['password']) && !empty($this->param['password'])){
|
|
|
|
$this->param['password'] = Hash::make($this->param['password']);
|
|
|
|
}
|
|
|
|
if (isset($this->param['rules']) && is_array($this->param['rules'])){
|
|
|
|
$this->param['rules'] = Arr::arrToSet($this->param['rules']);
|
|
|
|
}
|
|
|
|
$this->model->edit($this->param,['id'=>$this->param['id']]);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -120,7 +127,7 @@ class ManageLogic extends BaseLogic |
|
|
|
*/
|
|
|
|
public function getManagerInfo(){
|
|
|
|
$info = $this->model->read(['id'=>$this->param['id']],
|
|
|
|
['id','name','email','mobile','status','gid','sort','dept_id','is_dept_manager','created_at','role','updated_at']);
|
|
|
|
['id','name','email','mobile','status','gid','sort','dept_id','is_dept_manager','created_at','role','rules','updated_at']);
|
|
|
|
if($info === false){
|
|
|
|
$this->fail('error');
|
|
|
|
}
|
...
|
...
|
|