根据设备类型自动返回适配图片,支持手动指定设备与 JSON 格式。
请求参数
| 参数 | 类型 | 说明 |
| device | string | pc | mobile | tablet (可选) |
| format | string | 设为 json 返回 JSON 而非 302 重定向 (可选) |
调用示例
curl https://img-api.zyhh.qzz.io/api/image
curl "https://img-api.zyhh.qzz.io/api/image?device=pc&format=json"
curl "https://img-api.zyhh.qzz.io/api/image?device=mobile&format=json"
响应示例 (format=json)
{
"success": true,
"device": "pc",
"image": {
"filename": "wallpaper_001.jpg",
"directory": "PC",
"url": "https://cdn.zyhh.qzz.io/api?path=PC/wallpaper_001.jpg"
},
"total_images": 42
}