系统-验证码设置-保存

接口信息

  • 接口地址: {your-site-url}/api/skill/system-setting/captcha-set
  • 基础 URL: {your-site-url} 需替换为你自己的独立站 URL 地址,如 https://your-domain.com/apimanager666
  • 请求方式: POST
  • Content-Type: application/json
  • 说明: 此接口用于保存验证码相关设置

认证

请求头中需要携带 skill-access-token

Header
skill-access-token {your-skill-access-token} (请替换为你自己的 token)

请求参数 (JSON Body)

字段 类型 必填 说明
manager_login int ✅ 必填 商家端后台登录验证码。1 = 开启,2 = 关闭
front_register_account int ✅ 必填 前台商城注册账户验证码。1 = 开启,2 = 关闭
front_contacts int ✅ 必填 前台商城 Contacts 验证码。1 = 开启,2 = 关闭
product_review int ✅ 必填 前台商城商品评论验证码。1 = 开启,2 = 关闭
b2b_inquire int ✅ 必填 B2B 店铺前台商城询盘验证码。1 = 开启,2 = 关闭
b2b_inquire_sheet int ✅ 必填 B2B 店铺前台商城询盘表验证码。1 = 开启,2 = 关闭
b2c_inquire int ✅ 必填 B2C 店铺前台商城询盘验证码。1 = 开启,2 = 关闭
length int ✅ 必填 验证码长度,仅支持 456
str_type int ✅ 必填 验证码类型。1 = 仅数字,2 = 仅字母,3 = 数字和字母
expire int ✅ 必填 验证码过期时间,单位:秒
bg_color string ✅ 必填 验证码背景色。random 代表随机,或填写固定颜色值如 #F7F4F4
font_color string ✅ 必填 验证码字体颜色。random 代表随机,或填写固定颜色值如 #F7F4F4
vert_color string ✅ 必填 验证码干扰线颜色。random 代表随机,或填写固定颜色值如 #F7F4F4
text_position string ✅ 必填 验证码文本位置。random = 随机,center = 居中
text_angle string ✅ 必填 验证码旋转角度。rotate = 旋转,center = 常规

请求示例

cURL

curl --location --request POST '{your-site-url}/api/skill/system-setting/captcha-set' \
--header 'skill-access-token: {your-skill-access-token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "manager_login": 2,
    "front_register_account": 1,
    "front_contacts": 1,
    "product_review": 1,
    "b2b_inquire": 1,
    "b2b_inquire_sheet": 1,
    "b2c_inquire": 1,
    "length": 4,
    "str_type": 1,
    "expire": 480,
    "bg_color": "random",
    "font_color": "#F7F4F4",
    "vert_color": "random",
    "text_position": "random",
    "text_angle": "rotate"
}'

返回结果

code200 表示调用成功;code 不为 200 表示调用失败。

成功响应

{
    "code": 200,
    "data": [],
    "message": "success"
}

返回字段说明

字段 类型 说明
code Number 状态码,200 表示成功
message String 执行结果的文字描述
data Array 返回数据,目前为空数组

注意事项

  1. 所有字段均为必填
  2. length 仅支持 456,不可使用其他值
  3. bg_colorfont_colorvert_color 可填 random 随机或固定颜色值(如 #F7F4F4
  4. text_position 仅支持 randomcenter
  5. text_angle 仅支持 rotatecenter
  6. 调用本api,需要先调用:系统-验证码设置-获取 ,获取值后,再修改值,然后再保存
  7. 注意:api保存是全量保存,即时您只配置修改一个选项,也要进行全量保存,因此,先通过获取api得到数据,然后进行更改数据,然后进行保存
Copyright © fecify.com 2025 all right reserved,powered by Gitbook该文件修订时间: 2026-06-01 16:12:38

results matching ""

    No results matching ""