Merge pull request 'fixed' (#32) from zhangwei into dev

Reviewed-on: #32
This commit is contained in:
weiz 2023-11-14 10:13:09 +08:00
commit 00fc93908b
8 changed files with 26 additions and 66 deletions

View File

@ -28,6 +28,7 @@ class BaseAdminController extends BaseLikeAdminController
{ {
protected int $adminId = 0; protected int $adminId = 0;
protected array $adminInfo = []; protected array $adminInfo = [];
protected array $reqHeader = [];
public function initialize() public function initialize()
{ {
@ -35,6 +36,11 @@ class BaseAdminController extends BaseLikeAdminController
$this->adminInfo = $this->request->adminInfo; $this->adminInfo = $this->request->adminInfo;
$this->adminId = $this->request->adminInfo['admin_id']; $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 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 public function lists(): Json
{ {

View File

@ -7,17 +7,6 @@
class BusinessController extends BaseAdminController 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 public function lists(): Json
{ {

View File

@ -7,17 +7,6 @@
class CompanyController extends BaseAdminController 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 public function lists(): Json
{ {

View File

@ -7,17 +7,6 @@
class MerchantController extends BaseAdminController 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 public function merchantRecordLists(): Json
{ {

View File

@ -7,17 +7,6 @@
class CompanyContractController extends BaseAdminController 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 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 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 public function lists(): Json
{ {