作者 xiaohu thinkpad

登录处理

@@ -204,4 +204,21 @@ class BookingController extends AdminBaseController @@ -204,4 +204,21 @@ class BookingController extends AdminBaseController
204 $this->assign('page', $list->render()); 204 $this->assign('page', $list->render());
205 return $this->fetch(); 205 return $this->fetch();
206 } 206 }
  207 +
  208 + public function delete(){
  209 + $param = $this->request->param();
  210 + if(!$param){
  211 + return json(['code'=>'0','msg'=>'数据错误']);
  212 + }
  213 + $res = Db::name('yuyue')
  214 + ->where(['id'=>$param['id']])
  215 + ->delete();
  216 +
  217 + if ($res){
  218 + return json(['code'=>'1','msg'=>'删除成功']);
  219 + }else{
  220 + return json(['code'=>'0','msg'=>'删除失败']);
  221 + }
  222 + }
  223 +
207 } 224 }