六合彩图片API接口

接口文档
请求基础地址
🔌 接口列表2
GET / POST · JSON 响应
POST/img单张海报生成

传入模板编号、期数与号码,服务端即时渲染并返回 Base64 图片,适合单张预览与下载。

请求参数
indexNumber必填模板编号,范围 1001 ~ 1421
qishuString必填期数,纯数字,如 "2026001"
peroidString必填号码,英文逗号分隔,如 "19,38,30,13,01,11,12"
img_keyString必填密钥,如 "742d35Cc6634C0532925a3b844"
axios.post 调用示例
axios.post('https://8188542.com/img', {
  index: 1058,
  qishu: '2026001',
  peroid: '19,38,30,13,01,11,12'
}, {
  timeout: 60000
}).then(res => {
  // res.data.image 为 Base64 图片
  document.querySelector('#preview')
    .src = res.data.image
}).catch(err => {
  console.error(
    err.response?.data?.error || err.message
  )
})
返回示例
{
  "code": 200,
  "index": 1058,
  "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg..."
}

失败时返回 HTTP 400 / 500:{ "error": "错误原因" }

GET/img_list 全部图片列表

返回全部图片的 JSON 数据(图片地址数组)。GET 接口可直接在浏览器打开,点击接口地址或右下角「新标签页打开」即可查看。

请求参数
无需请求参数,直接请求接口地址即可返回数据
axios.get 调用示例
axios.get('https://8188542.com/img_list', {
  timeout: 60000
}).then(res => {
  // res.data.img_list 为全部图片地址数组
  res.data.img_list.forEach(item => {
    console.log(item)
  })
}).catch(err => {
  console.error(
    err.response?.data?.error || err.message
  )
})
返回示例
{
  "code": 200,
  "total": 3,
  "img_list": [
    "https://8188542.com/xiazai/1058.png",
    "https://8188542.com/xiazai/1059.png",
    "https://8188542.com/xiazai/1060.png"
  ]
}

失败时返回 HTTP 400 / 500:{ "error": "错误原因" }