简要描述:
请求URL:
GET/plugin.hotel.frontend.hotel.hotel.get-hotel-list-to-page
参数:
| 参数名 |
是否必须 |
类型 |
说明 |
| lng |
是 |
float |
经度 |
| lat |
是 |
float |
纬度 |
| city_name |
是 |
string |
城市名称 |
| page |
否 |
int |
酒店分页 |
返回示例:
正确时返回:
{
"result": 1,
"msg": "成功",
"data": {
"total": 1,
"per_page": 15,
"current_page": 1,
"last_page": 1,
"next_page_url": null,
"prev_page_url": null,
"from": 1,
"to": 1,
"data": [
{
"id": 2,
"thumb": "http://www.web7.com/attachment/images/5/2019/01/WyCG5QCvXI7QQ7C7CxUCu6QXbu65q6.jpg",
"hotel_name": "1123123",
"category_id": 1,
"mobile": "123",
"longitude": "116.403851",
"latitude": "39.915177",
"average_score": "9.0",
"distance": 1885.3,
"hotel_point": {
"point_switch": 0,
"point": 0,
"point_deduct_switch": 0,
"max_point_deduct": 0
},
"hotel_love": {
"deduction": 0,
"deduction_proportion": "爱心值最高抵扣0%",
"award": 0,
"award_proportion": "赠送爱心值0%"
},
"address": {
"city": "广州市",
"detailed_address": "123"
},
"unit": "km",
"has_one_member": null,
"has_one_category": {
"id": 1,
"name": "我讨厌",
"is_open": 1
}
}
]
}
}
错误时返回:
{
"result": 0,
"msg": "城市不能为空",
"data": ""
}
or
{
"result": 0,
"msg": "没找到城市",
"data": ""
}
or
{
"result": 0,
"msg": "参数错误",
"data": ""
}
or
{
"result": 0,
"msg": "未找到酒店",
"data": ""
}
返回参数说明:
| 最外层 data |
类型 |
说明 |
| total |
int |
总条数 |
| per_page |
int |
每一页多少条数据 |
| current_page |
int |
现在第几页 |
| last_page |
int |
最后一页 |
| next_page_url |
string |
下一页地址 |
| prev_page_url |
string |
上一页地址 |
| from |
int |
从某某页 |
| to |
int |
到某某页 |
| 参数名 |
类型 |
说明 |
| id |
int |
酒店 id |
| thumb |
string |
酒店图片 |
| hotel_name |
string |
酒店名称 |
| distance |
float |
距离 |
| unit |
string |
距离单位m/km |
| average_score |
string |
评分 |
| order_time |
int |
最近预订时间 |
| order_total |
int |
消费数 |
| room_amount |
int |
房间金额 |
| 参数名 |
类型 |
说明 |
| address |
obj |
酒店地址 |
| city |
string |
城市 |
| detailed_address |
string |
详细地址 |
| 参数名 |
类型 |
说明 |
| has_one_category |
obj |
酒店所属分类 |
| id |
int |
分类id |
| name |
string |
分类名称 |
备注: