公共模块
获取文件上传参数
- 接口地址
POST /api/v1/file/getUploadParams- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| module | string | Y | "order" | 模块名称 order:订单 avatar:头像 pms_logo:pmslogo |
| pms_id | int | Y/N | 123 | 门店ID module:order/pms_logo时必传 |
| user_id | int | Y/N | 456 | 用户ID module:avatar时必传 |
| filename | string | Y | "abc.jpg" | 文件名 |
| size | int | Y | 1024 | 文件大小 |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| uploadUrl | string | 上传地址 |
| formData | array | 上传参数 |
| fileUrl | string | 文件地址 |
| fileField | string | 文件字段名 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"uploadUrl": "https://hotel.local.star-lock.cn/file/localUpload?path=order%2Ffa63a2f2-a724-4e4a-939b-235ba4f6c8eb.txt&timeout=1741580756&sign=7383831b89b08fa3539d70435aa2ec02",
"formData": [],
"fileUrl": "http://hotel.local.star-lock.cn/storage/order/fa63a2f2-a724-4e4a-939b-235ba4f6c8eb.txt",
"fileField": "file"
}
}星锁透传
- 接口地址
POST /api/v1/starlock/passthrough- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| pms_id | int | Y | 123 | 门店ID |
| request_method | string | Y | "GET" | 请求方法 GET/POST |
| request_uri | string | Y | "/api/lock/detail" | 请求星锁地址 |
| post_args | object | Y | 请求参数 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {}
}获取站点信息
- 接口地址
POST /api/v1/common/siteInfo- 请求参数
无
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| company | object | 公司信息 |
| company.name | string | 公司名称 |
| company.site_full_name | string | 公司全称 |
| company.site_short_name | string | 公司简称 |
| company.company_copyright | string | 公司版权 |
| company.icp | string | 公司icp |
| agreement | object | 协议信息 |
| agreement.user_url | string | 用户协议地址 |
| agreement.privacy_url | string | 隐私协议地址 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"company": {
"name": "深圳市星锁科技有限公司",
"site_full_name": "星酒店",
"site_short_name": "星酒店",
"company_copyright": "© 2021 Company",
"icp": "粤ICP备2021000000号"
},
"agreement": {
"user_url": "http://hotel.local.star-lock.cn/agreement/user",
"privacy_url": "http://hotel.local.star-lock.cn/agreement/privacy"
}
}
}获取国家列表
- 接口地址
POST /api/v1/common/listCountry- 请求参数
无
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| countryId | int | 国家ID |
| name | string | 国家名称 |
| code | string | 国家代码 |
| abbreviation | string | 国家简称 |
| group | string | 国家组 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": [
{
"countryId": 1,
"name": "中国",
"code": "86",
"abbreviation": "CN",
"group": "Z"
},
{
"countryId": 2,
"name": "阿富汗",
"code": "93",
"abbreviation": "AF",
"group": "A"
}
]
}