2023-11-11 14:19:26 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace app\adminapi\controller\archives;
|
|
|
|
|
|
|
|
use app\adminapi\controller\BaseAdminController;
|
2023-11-11 15:37:30 +08:00
|
|
|
use think\response\Json;
|
2023-11-11 14:19:26 +08:00
|
|
|
|
|
|
|
class ArchivesController extends BaseAdminController
|
|
|
|
{
|
2023-11-11 15:37:30 +08:00
|
|
|
//档案列表
|
|
|
|
public function lists(): Json
|
|
|
|
{
|
|
|
|
$params = $this->request->get(['page_no','page_size','name']);
|
|
|
|
$result = curl_post(env('project.worker_domain').'/middleapi/archives/lists',$params,$this->reqHeader);
|
|
|
|
if($result['code'] == 0){
|
|
|
|
return $this->fail($result['msg']);
|
|
|
|
}
|
|
|
|
return json($result);
|
|
|
|
}
|
2023-11-11 14:19:26 +08:00
|
|
|
|
2023-11-11 15:37:30 +08:00
|
|
|
public function detail(): Json
|
|
|
|
{
|
|
|
|
$params = $this->request->get(['id']);
|
|
|
|
if(empty($params['id'])){
|
|
|
|
return $this->fail('参数错误');
|
|
|
|
}
|
|
|
|
$result = curl_post(env('project.worker_domain').'/middleapi/archives/detail',$params,$this->reqHeader);
|
|
|
|
if($result['code'] == 0){
|
|
|
|
return $this->fail($result['msg']);
|
|
|
|
}
|
|
|
|
return json($result);
|
|
|
|
}
|
2023-11-11 14:19:26 +08:00
|
|
|
}
|