perf: 搜索酒店: 增加`成人数`, `房间数`

main
Lei OT 10 months ago
parent 99b6e1591d
commit b132ce0150

@ -5,7 +5,7 @@ const { QuotedHotelsPrice } = require('../vendor/heytrip');
class Api extends BaseController { class Api extends BaseController {
hotelSearch = async(ctx) => { hotelSearch = async(ctx) => {
const { keyword, checkin, checkout } = ctx.query; const { keyword, checkin, checkout, adults, rooms } = ctx.query;
const page = ctx.query.page || 1; const page = ctx.query.page || 1;
const size = ctx.query.pagesize || 10; const size = ctx.query.pagesize || 10;
try { try {
@ -27,8 +27,8 @@ class Api extends BaseController {
nationality: 'CN', // 默认取中国报价 nationality: 'CN', // 默认取中国报价
CheckInDate: checkin, CheckInDate: checkin,
CheckOutDate: checkout, CheckOutDate: checkout,
adultNum: 1, adultNum: adults || 1,
roomCount: 1, roomCount: rooms || 1,
}; };
quoteRes = await QuotedHotelsPrice(basePriceParam); quoteRes = await QuotedHotelsPrice(basePriceParam);

Loading…
Cancel
Save