From b2f868983e3544dde65d1a3635b1bd3ad82da312 Mon Sep 17 00:00:00 2001 From: weiz Date: Tue, 14 Nov 2023 10:12:16 +0800 Subject: [PATCH] fixed --- .../controller/BaseAdminController.php | 6 ++++++ .../archives/ArchivesController.php | 11 ---------- .../archives/BusinessController.php | 11 ---------- .../controller/company/CompanyController.php | 11 ---------- .../controller/company/MerchantController.php | 11 ---------- .../contract/CompanyContractController.php | 11 ---------- .../contract/ShopContractController.php | 20 +++++++++++++++++++ .../contract/VehicleContractController.php | 11 ---------- 8 files changed, 26 insertions(+), 66 deletions(-) create mode 100644 app/adminapi/controller/contract/ShopContractController.php diff --git a/app/adminapi/controller/BaseAdminController.php b/app/adminapi/controller/BaseAdminController.php index 66e8ccea..968f44fc 100644 --- a/app/adminapi/controller/BaseAdminController.php +++ b/app/adminapi/controller/BaseAdminController.php @@ -28,6 +28,7 @@ class BaseAdminController extends BaseLikeAdminController { protected int $adminId = 0; protected array $adminInfo = []; + protected array $reqHeader = []; public function initialize() { @@ -35,6 +36,11 @@ class BaseAdminController extends BaseLikeAdminController $this->adminInfo = $this->request->adminInfo; $this->adminId = $this->request->adminInfo['admin_id']; } + $this->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/ArchivesController.php b/app/adminapi/controller/archives/ArchivesController.php index 86078ddf..944a17dd 100644 --- a/app/adminapi/controller/archives/ArchivesController.php +++ b/app/adminapi/controller/archives/ArchivesController.php @@ -7,17 +7,6 @@ class ArchivesController extends BaseAdminController { - protected array $reqHeader = []; - public function initialize() - { - parent::initialize(); - $this->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 { diff --git a/app/adminapi/controller/archives/BusinessController.php b/app/adminapi/controller/archives/BusinessController.php index 00649d60..2eadff40 100644 --- a/app/adminapi/controller/archives/BusinessController.php +++ b/app/adminapi/controller/archives/BusinessController.php @@ -7,17 +7,6 @@ class BusinessController extends BaseAdminController { - protected array $reqHeader = []; - public function initialize() - { - parent::initialize(); - $this->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 { diff --git a/app/adminapi/controller/company/CompanyController.php b/app/adminapi/controller/company/CompanyController.php index 9151a68a..d24d3a9e 100644 --- a/app/adminapi/controller/company/CompanyController.php +++ b/app/adminapi/controller/company/CompanyController.php @@ -7,17 +7,6 @@ class CompanyController extends BaseAdminController { - protected array $reqHeader = []; - public function initialize() - { - parent::initialize(); - $this->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 { diff --git a/app/adminapi/controller/company/MerchantController.php b/app/adminapi/controller/company/MerchantController.php index 3f3163ea..c173d78e 100644 --- a/app/adminapi/controller/company/MerchantController.php +++ b/app/adminapi/controller/company/MerchantController.php @@ -7,17 +7,6 @@ class MerchantController extends BaseAdminController { - protected array $reqHeader = []; - public function initialize() - { - parent::initialize(); - $this->reqHeader = [ - "appid:".env('app.app_id'), - "timestamp:".time(), - "sign:".makeSign(['appid'=>env('app.app_id'),'timestamp'=>time()],env('app.app_secret')) - ]; - } - //商户档案列表 public function merchantRecordLists(): Json { diff --git a/app/adminapi/controller/contract/CompanyContractController.php b/app/adminapi/controller/contract/CompanyContractController.php index 19f9692a..1dd3c6b0 100644 --- a/app/adminapi/controller/contract/CompanyContractController.php +++ b/app/adminapi/controller/contract/CompanyContractController.php @@ -7,17 +7,6 @@ class CompanyContractController extends BaseAdminController { - protected array $reqHeader = []; - public function initialize() - { - parent::initialize(); - $this->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 { diff --git a/app/adminapi/controller/contract/ShopContractController.php b/app/adminapi/controller/contract/ShopContractController.php new file mode 100644 index 00000000..424bd20e --- /dev/null +++ b/app/adminapi/controller/contract/ShopContractController.php @@ -0,0 +1,20 @@ +request->get(['page_no','page_size','contract_no','party_a','party_b','status']); + $result = curl_post(env('project.worker_domain').'/middleapi/ShopContract/lists',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + } \ No newline at end of file diff --git a/app/adminapi/controller/contract/VehicleContractController.php b/app/adminapi/controller/contract/VehicleContractController.php index d47ea76b..983dca7d 100644 --- a/app/adminapi/controller/contract/VehicleContractController.php +++ b/app/adminapi/controller/contract/VehicleContractController.php @@ -7,17 +7,6 @@ class VehicleContractController extends BaseAdminController { - protected array $reqHeader = []; - public function initialize() - { - parent::initialize(); - $this->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 {