request->isAjax()) { $result = ConfigLogic::lists($this->shop_id); return JsonServer::success('', $result); } return view(); } /** * @notes 编辑打印机配置 * @return \think\response\Json|\think\response\View * @author 段誉 * @date 2022/1/19 17:09 */ public function edit() { $id = $this->request->get('id/d'); if ($this->request->isAjax()) { $post = $this->request->post(); (new ConfigValidate())->goCheck(); ConfigLogic::editConfig($post, $this->shop_id); return JsonServer::success('修改成功'); } return view('', [ 'detail' => ConfigLogic::getDetail($id, $this->shop_id), ]); } }