增加了ai问题列表api
This commit is contained in:
@@ -2,6 +2,7 @@ import ResponseUtil from "../utils/responseUtil.js";
|
|||||||
import services from "../resource/services.js";
|
import services from "../resource/services.js";
|
||||||
import agreement from "../resource/agreement.js";
|
import agreement from "../resource/agreement.js";
|
||||||
import hospitalInfo from "../resource/hospital_info.js";
|
import hospitalInfo from "../resource/hospital_info.js";
|
||||||
|
import aiquick_questions from "../resource/aiquick_questions.js";
|
||||||
import { hospitalRanking, departmentRankings } from "../resource/fudan_hospital_ranking.js";
|
import { hospitalRanking, departmentRankings } from "../resource/fudan_hospital_ranking.js";
|
||||||
|
|
||||||
class HandlerResource {
|
class HandlerResource {
|
||||||
@@ -52,6 +53,15 @@ class HandlerResource {
|
|||||||
return ResponseUtil.internalError(ctx, err.message);
|
return ResponseUtil.internalError(ctx, err.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取陪诊服务问题
|
||||||
|
async getAiQuickQuestions(ctx) {
|
||||||
|
try {
|
||||||
|
return ResponseUtil.success(ctx, { aiquick_questions }, "查询成功");
|
||||||
|
} catch (err) {
|
||||||
|
return ResponseUtil.internalError(ctx, err.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export { HandlerResource };
|
export { HandlerResource };
|
||||||
|
|||||||
8
resource/aiquick_questions.js
Normal file
8
resource/aiquick_questions.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
const aiquick_questions = [
|
||||||
|
'陪诊服务的流程是什么?',
|
||||||
|
'如何预约陪诊服务?',
|
||||||
|
'陪诊服务收费标准?',
|
||||||
|
'怎么加客服微信?',
|
||||||
|
]
|
||||||
|
|
||||||
|
export default aiquick_questions
|
||||||
@@ -93,7 +93,7 @@ const services = [
|
|||||||
id: 3,
|
id: 3,
|
||||||
title: '代问诊',
|
title: '代问诊',
|
||||||
subtitle: '代您到医院与医生进行问诊',
|
subtitle: '代您到医院与医生进行问诊',
|
||||||
price: '268.00',
|
price: '260.00',
|
||||||
image: '/images/wz1.jpg',
|
image: '/images/wz1.jpg',
|
||||||
icon: 'heart',
|
icon: 'heart',
|
||||||
tag: '',
|
tag: '',
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ function registerRoutes(app) {
|
|||||||
router.get("/hospital-info", handlerResource.getHospitalInfo.bind(handlerResource));
|
router.get("/hospital-info", handlerResource.getHospitalInfo.bind(handlerResource));
|
||||||
router.get("/hospital-ranking", handlerResource.getHospitalRanking.bind(handlerResource));
|
router.get("/hospital-ranking", handlerResource.getHospitalRanking.bind(handlerResource));
|
||||||
router.get("/department-rankings", handlerResource.getDepartmentRankings.bind(handlerResource));
|
router.get("/department-rankings", handlerResource.getDepartmentRankings.bind(handlerResource));
|
||||||
|
router.get("/ai-quick-questions", handlerResource.getAiQuickQuestions.bind(handlerResource));
|
||||||
|
|
||||||
app.use(router.routes());
|
app.use(router.routes());
|
||||||
app.use(router.allowedMethods());
|
app.use(router.allowedMethods());
|
||||||
|
|||||||
Reference in New Issue
Block a user