新增获取操作手册详情接口
This commit is contained in:
parent
9fc01059ef
commit
4f90c65e8a
@ -62,4 +62,15 @@ class BasicDataController extends AbstractController
|
|||||||
$data = $BasicDataService->getOperationManual();
|
$data = $BasicDataService->getOperationManual();
|
||||||
return $this->response->json($data);
|
return $this->response->json($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取操作手册详情
|
||||||
|
* @return ResponseInterface
|
||||||
|
*/
|
||||||
|
public function getOperationManualInfo(): ResponseInterface
|
||||||
|
{
|
||||||
|
$BasicDataService = new BasicDataService();
|
||||||
|
$data = $BasicDataService->getOperationManualInfo();
|
||||||
|
return $this->response->json($data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -59,6 +59,6 @@ class OperationManual extends Model
|
|||||||
*/
|
*/
|
||||||
public static function getList(array $params, array $fields = ['*']): object|null
|
public static function getList(array $params, array $fields = ['*']): object|null
|
||||||
{
|
{
|
||||||
return self::where($params)->get($fields);
|
return self::where($params)->orderBy('sort','desc')->get($fields);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -106,4 +106,24 @@ class BasicDataService extends BaseService
|
|||||||
|
|
||||||
return success($operation_manual->toArray());
|
return success($operation_manual->toArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取操作手册详情
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getOperationManualInfo(): array
|
||||||
|
{
|
||||||
|
$manual_id = $this->request->route('manual_id');
|
||||||
|
|
||||||
|
$params = array();
|
||||||
|
$params['manual_id'] = $manual_id;
|
||||||
|
$params['status'] = 1;
|
||||||
|
|
||||||
|
$operation_manual = OperationManual::getOne($params);
|
||||||
|
if (empty($operation_manual)){
|
||||||
|
return fail();
|
||||||
|
}
|
||||||
|
|
||||||
|
return success($operation_manual->toArray());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -16,13 +16,13 @@ class Auth
|
|||||||
$this->whiteApi = [
|
$this->whiteApi = [
|
||||||
"/" => "*",
|
"/" => "*",
|
||||||
"/patient/index" => "get",
|
"/patient/index" => "get",
|
||||||
"/login/wechat_mobile_login" => "post",
|
"/login/wechat_mobile_login" => "post", // 微信登陆
|
||||||
"/login/mobile_login" => "post",
|
"/login/mobile_login" => "post", // 手机号登陆
|
||||||
"/code/phone" => "post",
|
"/code/phone" => "post",// 获取手机号验证码
|
||||||
"/disease/expertise" => "get",
|
"/disease/expertise" => "get",// 疾病专长列表-搜索使用
|
||||||
"/area/province" => "get",
|
"/area/province" => "get",// 获取省份信息
|
||||||
"/area/city" => "get",
|
"/area/city" => "get", // 获取城市信息
|
||||||
"/area/county" => "get",
|
"/area/county" => "get", // 获取区县信息
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -263,5 +263,8 @@ Router::addGroup('/basic', function () {
|
|||||||
|
|
||||||
// 获取操作手册列表
|
// 获取操作手册列表
|
||||||
Router::get('/operation/manual', [BasicDataController::class, 'getOperationManual']);
|
Router::get('/operation/manual', [BasicDataController::class, 'getOperationManual']);
|
||||||
|
|
||||||
|
// 获取操作手册详情
|
||||||
|
Router::get('/operation/manual/{manual_id:\d+}', [BasicDataController::class, 'getOperationManualInfo']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user