Procházet zdrojové kódy

增加咨询师删除

master
suiyi-erff před 2 roky
rodič
revize
53cd348dc4
1 změnil soubory, kde provedl 24 přidání a 0 odebrání
  1. 24
    0
      application/admin/controller/Zixun.php

+ 24
- 0
application/admin/controller/Zixun.php Zobrazit soubor

@@ -14,6 +14,7 @@ class Zixun extends BaseController
'put' => ['update' => ['pictures', 'poster']],
];

//获取全部数据
public function getZixunAll()
{
try {
@@ -27,6 +28,7 @@ class Zixun extends BaseController
}
}

//增加信息
public function save()
{
try {
@@ -135,6 +137,7 @@ class Zixun extends BaseController
}
}

//获取咨询师下拉框
public function getZixunSelect()
{
try {
@@ -148,6 +151,27 @@ class Zixun extends BaseController
}

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

}


}

Načítá se…
Zrušit
Uložit