...
|
...
|
@@ -204,4 +204,21 @@ class BookingController extends AdminBaseController |
|
|
$this->assign('page', $list->render());
|
|
|
return $this->fetch();
|
|
|
}
|
|
|
|
|
|
public function delete(){
|
|
|
$param = $this->request->param();
|
|
|
if(!$param){
|
|
|
return json(['code'=>'0','msg'=>'数据错误']);
|
|
|
}
|
|
|
$res = Db::name('yuyue')
|
|
|
->where(['id'=>$param['id']])
|
|
|
->delete();
|
|
|
|
|
|
if ($res){
|
|
|
return json(['code'=>'1','msg'=>'删除成功']);
|
|
|
}else{
|
|
|
return json(['code'=>'0','msg'=>'删除失败']);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|