diff --git a/app/controller/Index.php b/app/controller/Index.php index 2f7fa0e..36ec575 100644 --- a/app/controller/Index.php +++ b/app/controller/Index.php @@ -258,6 +258,32 @@ class Index extends BaseController return json($this->json_data); } + /** + * 批量删除 + * @return Json + * @throws \Exception + */ + public function phoneReset() + { + // + $params = array_filter($this->request->param()); + $params_1 = $params; + unset($params_1['car_phone_empty'], $params['data_check'], $params['car_frame_check']); + if (empty($params_1)) { + $this->json_data['code'] = 0; + $this->json_data['msg'] = '搜索条件不能为空'; + return json($this->json_data); + } + $map = $this->getQueryCondition($params); + if($this->model->where($map)->update(['car_phone' => ''])){ + $this->json_data['msg'] = '请求成功'; + }else { + $this->json_data['code'] = 0; + $this->json_data['msg'] = '请求失败'; + } + return json($this->json_data); + } + /** * @param $id * @return Json diff --git a/app/view/index/index.html b/app/view/index/index.html index 656af34..4eb54b9 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -36,6 +36,7 @@ 重置条件 +