|
|
|
|
|
|
|
|
'put' => ['update' => ['pictures', 'poster']], |
|
|
'put' => ['update' => ['pictures', 'poster']], |
|
|
]; |
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
//获取全部数据 |
|
|
public function getZixunAll() |
|
|
public function getZixunAll() |
|
|
{ |
|
|
{ |
|
|
try { |
|
|
try { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//增加信息 |
|
|
public function save() |
|
|
public function save() |
|
|
{ |
|
|
{ |
|
|
try { |
|
|
try { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//获取咨询师下拉框 |
|
|
public function getZixunSelect() |
|
|
public function getZixunSelect() |
|
|
{ |
|
|
{ |
|
|
try { |
|
|
try { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
public function delete() |
|
|
|
|
|
{ |
|
|
|
|
|
{ |
|
|
|
|
|
try { |
|
|
|
|
|
$Doctor_model = new \app\admin\model\Zixun(); |
|
|
|
|
|
$check = $Doctor_model->where($Doctor_model->getPk(), $this->param[$Doctor_model->getPk()])->value($Doctor_model->getPk()); |
|
|
|
|
|
if (!$check) { |
|
|
|
|
|
tojson(10000, '记录不存在'); |
|
|
|
|
|
} |
|
|
|
|
|
$result = $Doctor_model->where($Doctor_model->getPk(), $this->param[$Doctor_model->getPk()])->delete(); |
|
|
|
|
|
if ($result) { |
|
|
|
|
|
tojson(200, '删除成功'); |
|
|
|
|
|
} else { |
|
|
|
|
|
tojson(10000, '删除失败'); |
|
|
|
|
|
} |
|
|
|
|
|
} catch (\Exception $e) { |
|
|
|
|
|
tojson(10000, $e->getMessage()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |