Browse Source

增加咨询师删除

master
suiyi-erff 2 years ago
parent
commit
53cd348dc4
1 changed files with 24 additions and 0 deletions
  1. 24
    0
      application/admin/controller/Zixun.php

+ 24
- 0
application/admin/controller/Zixun.php View File

'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());
}
}

}




} }

Loading…
Cancel
Save