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