This commit is contained in:
weiz 2023-11-14 10:12:16 +08:00
parent c830899860
commit b2f868983e
8 changed files with 26 additions and 66 deletions

View File

@ -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'))
];
}
}

View File

@ -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
{

View File

@ -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
{

View File

@ -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
{

View File

@ -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
{

View File

@ -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
{

View File

@ -0,0 +1,20 @@
<?php
namespace app\adminapi\controller\contract;
use app\adminapi\controller\BaseAdminController;
use think\response\Json;
class ShopContractController extends BaseAdminController
{
//商户合同列表
public function lists(): Json
{
$params = $this->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);
}
}

View File

@ -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
{