From 541ed7fced5c2d260a3de0e02f2c46c2830e9c05 Mon Sep 17 00:00:00 2001 From: weiz Date: Sat, 11 Nov 2023 14:19:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A1=A3=E6=A1=88=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=A8=A1=E5=9D=97=E5=95=86=E6=9C=BA=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=AD=90=E6=A8=A1=E5=9D=97=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../archives/ArchivesController.php | 21 +++++ .../archives/BusinessController.php | 78 +++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 app/adminapi/controller/archives/ArchivesController.php create mode 100644 app/adminapi/controller/archives/BusinessController.php diff --git a/app/adminapi/controller/archives/ArchivesController.php b/app/adminapi/controller/archives/ArchivesController.php new file mode 100644 index 00000000..aa1dd4a4 --- /dev/null +++ b/app/adminapi/controller/archives/ArchivesController.php @@ -0,0 +1,21 @@ +reqHeader = [ + "appid:".env('app.app_id'), + "timestamp:".time(), + "sign:".makeSign(['appid'=>env('app.app_id'),'timestamp'=>time()],env('app.app_secret')) + ]; + } + + + } \ No newline at end of file diff --git a/app/adminapi/controller/archives/BusinessController.php b/app/adminapi/controller/archives/BusinessController.php new file mode 100644 index 00000000..00649d60 --- /dev/null +++ b/app/adminapi/controller/archives/BusinessController.php @@ -0,0 +1,78 @@ +reqHeader = [ + "appid:".env('app.app_id'), + "timestamp:".time(), + "sign:".makeSign(['appid'=>env('app.app_id'),'timestamp'=>time()],env('app.app_secret')) + ]; + } + + //商机分类列表 + public function lists(): Json + { + $params = $this->request->get(['page_no','page_size','name','status']); + $result = curl_post(env('project.worker_domain').'/middleapi/business/lists',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //商机分类详情 + public function detail(): Json + { + $params = $this->request->get(['id']); + if(empty($params['id'])){ + return $this->fail('参数错误'); + } + $result = curl_post(env('project.worker_domain').'/middleapi/business/detail',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //新增商机分类 + public function create(): Json + { + $params = $this->request->post(['name','pid','sort','status']); + $result = curl_post(env('project.worker_domain').'/middleapi/business/create',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //编辑商机分类 + public function edit(): Json + { + $params = $this->request->post(['id','name','pid','sort','status']); + $result = curl_post(env('project.worker_domain').'/middleapi/business/edit',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //删除商机分类 + public function delete(): Json + { + $params = $this->request->post(['id']); + $result = curl_post(env('project.worker_domain').'/middleapi/business/delete',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + } \ No newline at end of file