Merge pull request '新增档案列表接口和档案详情接口' (#29) from zhangwei into dev

Reviewed-on: #29
This commit is contained in:
weiz 2023-11-11 15:38:57 +08:00
commit e73aeb98e6
1 changed files with 23 additions and 0 deletions

View File

@ -3,6 +3,7 @@
namespace app\adminapi\controller\archives; namespace app\adminapi\controller\archives;
use app\adminapi\controller\BaseAdminController; use app\adminapi\controller\BaseAdminController;
use think\response\Json;
class ArchivesController extends BaseAdminController class ArchivesController extends BaseAdminController
{ {
@ -17,5 +18,27 @@
]; ];
} }
//档案列表
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);
}
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);
}
} }