39 lines
998 B
JavaScript
39 lines
998 B
JavaScript
import ResponseUtil from "../utils/responseUtil.js";
|
|
import services from "../resource/services.js";
|
|
import agreement from "../resource/agreement.js";
|
|
import hospitalContact from "../resource/hospital_contact.js";
|
|
|
|
class HandlerResource {
|
|
constructor() {
|
|
}
|
|
|
|
// 获取所有启用的服务列表
|
|
async getServices(ctx) {
|
|
try {
|
|
return ResponseUtil.success(ctx, { services }, "查询成功");
|
|
} catch (err) {
|
|
return ResponseUtil.internalError(ctx, err.message);
|
|
}
|
|
}
|
|
|
|
// 获取陪诊服务协议
|
|
async getAgreement(ctx) {
|
|
try {
|
|
return ResponseUtil.success(ctx, { agreement }, "查询成功");
|
|
} catch (err) {
|
|
return ResponseUtil.internalError(ctx, err.message);
|
|
}
|
|
}
|
|
|
|
// 获取医院联系电话
|
|
async getHospitalContact(ctx) {
|
|
try {
|
|
return ResponseUtil.success(ctx, { hospitalContact }, "查询成功");
|
|
} catch (err) {
|
|
return ResponseUtil.internalError(ctx, err.message);
|
|
}
|
|
}
|
|
}
|
|
|
|
export { HandlerResource };
|