From 5668887a5cd2c713ce2ac4da89b00fdeaa76e685 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Mon, 4 Dec 2023 10:51:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=AD=E5=8F=B0=E5=95=86?= =?UTF-8?q?=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/shop/ProductController.php | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 app/adminapi/controller/shop/ProductController.php diff --git a/app/adminapi/controller/shop/ProductController.php b/app/adminapi/controller/shop/ProductController.php new file mode 100644 index 00000000..266c8621 --- /dev/null +++ b/app/adminapi/controller/shop/ProductController.php @@ -0,0 +1,68 @@ +request->get(); + $result = curl_post($this->shopUrl . '/middle/store/product/lst_filter',$params,$this->reqHeader); + if(($result['status'] ?? 500) != 200){ + return $this->fail($result['message'] ?? '非法请求'); + } + return json($result); + } + + public function categoryLlist(): Json + { + $params=$this->request->get(); + $result = curl_post($this->shopUrl . '/middle/store/category/list',$params,$this->reqHeader); + if(($result['status'] ?? 500) != 200){ + return $this->fail($result['message'] ?? '非法请求'); + } + return json($result); + } + + public function productMerSelect(): Json + { + $params=$this->request->get(); + $result = curl_post($this->shopUrl . '/middle/store/product/mer_select',$params,$this->reqHeader); + if(($result['status'] ?? 500) != 200){ + return $this->fail($result['message'] ?? '非法请求'); + } + return json($result); + } + + public function labelLoption(): Json + { + $params=$this->request->get(); + $result = curl_post($this->shopUrl . '/middle/product/label/option',$params,$this->reqHeader); + if(($result['status'] ?? 500) != 200){ + return $this->fail($result['message'] ?? '非法请求'); + } + return json($result); + } + + public function productLst(): Json + { + $params=$this->request->get(['type', 'star', 'svip_price_type', 'us_status', 'hot_type', 'keyword', 'is_trader', 'mer_id', 'page', 'limit', 'pid']); + $result = curl_post($this->shopUrl . '/middle/store/product/lst',$params,$this->reqHeader); + if(($result['status'] ?? 500) != 200){ + return $this->fail($result['message'] ?? '非法请求'); + } + return json($result); + } + +} \ No newline at end of file