|
...
|
...
|
@@ -5,6 +5,7 @@ namespace App\Http\Logic\Aside\Manage; |
|
|
|
|
|
|
|
use App\Http\Logic\Aside\BaseLogic;
|
|
|
|
use App\Models\Manage\Manage;
|
|
|
|
use App\Models\Manage\Menu;
|
|
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -22,11 +23,19 @@ class ManageLogic extends BaseLogic |
|
|
|
$this->model = new Manage();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function save($param){
|
|
|
|
if(!empty($param['password'])){
|
|
|
|
$param['password'] = Hash::make($param['password']);
|
|
|
|
public function managerSave(){
|
|
|
|
if(isset($this->param['password']) && !empty($this->param['password'])){
|
|
|
|
$this->param['password'] = Hash::make($this->param['password']);
|
|
|
|
}
|
|
|
|
return parent::save($param);
|
|
|
|
if(isset($this->param['id']) && !empty($this->param['id'])){
|
|
|
|
$rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
|
|
|
|
}else{
|
|
|
|
$rs = $this->model->add($this->param);
|
|
|
|
}
|
|
|
|
if($rs === false){
|
|
|
|
$this->fail('error');
|
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
...
|
...
|
@@ -64,4 +73,6 @@ class ManageLogic extends BaseLogic |
|
|
|
}
|
|
|
|
return $this->success($info);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} |
...
|
...
|
|