request->isAjax()) { $get = $this->request->get(); $lists = LocalStoreLogic::lists(); return JsonServer::success('获取成功', $lists); } return View(); } public function add() { return view('', [ 'crftType1List' => LocalLifeICBCEnum::crftType1List(), // 商户证件类型列表 'crftType2List' => LocalLifeICBCEnum::crftType2List(), //法人/负责任人证件类型 'accntType1List' => LocalLifeICBCEnum::accntType1List(), // 消费结算账户类型 'tx_map_key' => ConfigServer::get('map', 'tx_map_key') ]); } public function edit() { $id = $this->request->get('id'); if ($this->request->isAjax()) { $post = $this->request->post(); } return view('', [ 'crftType1List' => LocalLifeICBCEnum::crftType1List(), // 商户证件类型列表 'crftType2List' => LocalLifeICBCEnum::crftType2List(), //法人/负责任人证件类型 'accntType1List' => LocalLifeICBCEnum::accntType1List(), // 消费结算账户类型 'tx_map_key' => ConfigServer::get('map', 'tx_map_key'), 'id' => $id ]); } /** * @notes 删除本地生活 */ public function del() { if ($this->request->isAjax()) { $id = $this->request->post('id'); try { if (LocalStoreLogic::del_data($id)) { return JsonServer::success('操作成功'); } } catch (\Exception $e) { return JsonServer::error('操作失败'); } } } /** * @notes 审核操作 */ public function operation() { if ($this->request->isAjax()) { $post = $this->request->post(); if (in_array($post['state'], LocalStoreLogic::$STATE_ENUM)) { if ($post['state'] == 1) { $data = LocalStoreLogic::get_data($post['id']); Request::post('https://dlh.hainings.com/shop/abutment/test', [ 'empowerPhone' => $data['empowerPhone'], 'crftNo1' => $data['crftNo1'] ]); } if (LocalStoreLogic::update_state($post['id'], $post['state'])) { return JsonServer::success('操作成功'); } } return JsonServer::error('操作失败'); } } }