diff --git a/app/adminapi/controller/shop/MerchantController.php b/app/adminapi/controller/shop/MerchantController.php new file mode 100644 index 00000000..dc070897 --- /dev/null +++ b/app/adminapi/controller/shop/MerchantController.php @@ -0,0 +1,69 @@ +request->get(); + $result = curl_post($this->shopUrl . '/middle/merchant/city/get_area',$params,$this->reqHeader); + if(($result['status'] ?? 500) != 200){ + return $this->fail($result['message'] ?? '非法请求'); + } + return json($result); + } + + public function count(): Json + { + $params=$this->request->get(); + $result = curl_post($this->shopUrl . '/middle/merchant/count',$params,$this->reqHeader); + if(($result['status'] ?? 500) != 200){ + return $this->fail($result['message'] ?? '非法请求'); + } + return json($result); + } + + public function categoryOptions(): Json + { + $params=$this->request->get(); + $result = curl_post($this->shopUrl . '/middle/merchant/category/options',$params,$this->reqHeader); + if(($result['status'] ?? 500) != 200){ + return $this->fail($result['message'] ?? '非法请求'); + } + return json($result); + } + + public function typeOptions(): Json + { + $params=$this->request->get(); + $result = curl_post($this->shopUrl . '/middle/merchant/type/options',$params,$this->reqHeader); + if(($result['status'] ?? 500) != 200){ + return $this->fail($result['message'] ?? '非法请求'); + } + return json($result); + } + + + public function lst(): Json + { + $params = $this->request->get(['keyword', 'date', 'status', 'statusTag', 'is_trader', 'category_id', 'type_id', 'area_id', 'street_id']); + $result = curl_post($this->shopUrl . '/middle/merchant/lst',$params,$this->reqHeader); + if(($result['status'] ?? 500) != 200){ + return $this->fail($result['message'] ?? '非法请求'); + } + return json($result); + } + +} \ No newline at end of file