POST [Host Server]/api/v1/data/setVariantValue
| Path | [Host Server]/api/v1/data/setVariantValue |
|---|---|
| Summary | 变量控制 |
| Description | 控制变量值 |
| Consumes | application/json |
Parameters
| Name | Description | Parameter Type | Data Type | Default | Required |
|---|---|---|---|---|---|
| token | 1.请求令牌 | json | string | yes | |
| setValues | 2.批量设置变量值,格式: [{boxId:””,variantId:””,value:””}…] | json | Object | yes |
请求参数示例:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50Ijoic3VtbWVyIiwiZXhwIjoxNzU3NDg0OTcxLCJpc3MiOiJzY2lvdF9jbG91ZCIsIm5iZiI6MTc1Njg4MDA3MX0.XpzCwo_W0JGpjAg4rciG8pfOatjSuYuZsyaXUnX7Ye0",
"setValues": [
{
"boxId": "6ab728135e53485e9e42bf5595da5bba",
"variantId": "0",
"value": "123.456"
},
{
"boxId": "6ab728135e53485e9e42bf5595da5bba",
"variantId": "1",
"value": "1"
}
]
}Responses JsonResult«DataVo» :
| Properties | Type | Description |
|---|---|---|
| code | integer | 状态码 |
| data | DataVo | 数据集,状态success为true时返回,否则为空 |
| msg | string | 返回消息 |
| success | boolean | 状态 |
DataVo:
| Properties | Type | Description |
|---|---|---|
| failIds | stringList | 写入失败的变量id |
| successIds | stringList | 已经写入成功变量id |
作者:霜蝉科技 创建时间:2025-08-07 10:57
最后编辑:霜蝉科技 更新时间:2025-09-08 13:41
最后编辑:霜蝉科技 更新时间:2025-09-08 13:41